-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to alias cosmwasm_std
when using #[entry_point]
#1539
Conversation
Thank you for bringing this up and the PR. Two things:
|
|
Thinking about it a bit more - this is a bit of a problem. And if that's not a concern, why not just move |
We need
However, maybe it is possible to turn this re-export in cosmwasm_std into something clever that preserves the namespace? // Re-exports
pub use cosmwasm_derive::entry_point; |
@webmaster128 couldn't find anything of that sort. extern crate cw_std as cosmwasm_std; This works with the current Do you think it's a better solution for this? |
What's the motivation for renaming cosmwasm_std in the first place? By the way, this was documented in #1420 for a different macro as well. |
Things like this. |
Done in #2068. Thank you for bringing this up and proposing the solution which inspired the follow-up PR. |
Pretty basic Rust functionality that is not possible currently, since there's a hardcoded value in the
entry_point
macro.This simple change gives you the ability to provide an optional alias.
Example: