-
Notifications
You must be signed in to change notification settings - Fork 48
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
fix: catch instantiate reversion #512
Conversation
✅ Deploy Preview for contracts-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Passing run #208 ↗︎
Details:
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm. Was a bit confused about the word reversion
but seems to be the correct one to use here. Maybe checkInstantiateReverted
& hasReverted
? Fine either way. 👍
|
||
export function checkInstantiateReversion(dryRunResult: ContractInstantiateResult | undefined) { | ||
return dryRunResult?.result.isOk | ||
? dryRunResult.result.asOk.result.flags.toHuman().includes('Revert') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dryRunResult.result.asOk.result.flags
has no field/flag hasReverted
or so?
Not familiar pjs to deeply still and can't find anything in the docs. Not sure if this is somehow available. Just did fire and forget search before our meeting.
Inspect the flags and disallow instantiation in case a reversion took place
closes #494