-
Notifications
You must be signed in to change notification settings - Fork 336
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 require macro #1103
Comments
Makes sense. It's a pitty we don't get panic messages when compiling to Wasm because Rust already provides those types of tings ( |
Maybe for 1.0? |
This is a compatible addition and can be done at any time |
This is basically what |
Sure, no need to get it in 1.0. I want to use it soonish... will add to cw-plus |
Happy to pull it in for maintenance from CosmWasm/cw-plus#469 when we see it works well in the caller code and devs like it. |
Great idea. |
Suggestion from Twitter: https://twitter.com/gakonst/status/1440428252267376659?s=21
A more concrete example where we could do codeine, taking:
require!(info.sender == cfg.admin, ContractErr::Unauthorized{});
that generates something like:
Maybe this macro exists in a standard Rust package already and using it in sample contracts we could highlight it.
The text was updated successfully, but these errors were encountered: