-
Notifications
You must be signed in to change notification settings - Fork 20
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
Gather the declaration of errors #256
Comments
hey @clearloop, assign me |
@clearloop is there an existing error handling infrastructure? |
we currently just have the main difference are:
#[derive(Error)]
pub enum Error {
Error0,
Error1(Bytes32),
Error2(Bytes32, Bytes32),
Error3(Bytes32, Bytes32, Bytes32),
Error4(Bytes32, Bytes32, Bytes32, Bytes32)
}
// which generates
impl Error {
fn error0() {
zink::revert!("Error");
}
fn error1(param: Bytes32) {
zink::revert!("Error", param)
}
// ...
} for the revert macro, see revert!, and for the example, feel free to ask anything in the telegram channel! |
great! thanks |
see my implementation in a8a3eec, it's actually the same for this issue ^ ^ |
@clearloop assign me |
Describe the feature
Error has not been implemented yet, ABIs are also required but considered in a separated PR
Solution
This solution could be similar as the events, see #281 (review)
The text was updated successfully, but these errors were encountered: