-
Notifications
You must be signed in to change notification settings - Fork 37
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
Implement Reject
trait for CallContractError
so that they can be returned in entrypoint methods.
#408
Comments
HI @dhruvja, thanks for the input. I'm not opposed to implementing this in principle, but there is a general challenge that it's not really possible to have an injective implementation of this trait for This is usually a lot simpler to accept on a case by case basis rather than in a generic implementation. |
Do you mean its difficult to include the generics when we implement the trait? |
No, I meant that to implement |
Moving this over to the correct repository. |
Description
When a cross contract call is made, it returns
CallContractError
which doesnt seem to implementReject
trait which the entrypoint method expect to return. So aFrom
trait has to be implemented.Solution
Implementing
Reject
trait onCallContractError
itself will help users just return those errors directly from entrypoint without needing to write wrappers.A From trait for Cis2ClientError which itself is a wrapper for CallContractError looks like below.
Would love to know what you guys think regarding having this trait implemented?
The text was updated successfully, but these errors were encountered: