Skip to content
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

Use validateZRC20Withdrawal for revert case #3135

Closed
lumtis opened this issue Nov 11, 2024 · 0 comments · Fixed by #3149
Closed

Use validateZRC20Withdrawal for revert case #3135

lumtis opened this issue Nov 11, 2024 · 0 comments · Fixed by #3149
Assignees

Comments

@lumtis
Copy link
Member

lumtis commented Nov 11, 2024

The following check in evm_hook validates withdrawals:

func (k Keeper) validateZRC20Withdrawal(ctx sdk.Context, chainID int64, value *big.Int, to []byte) error {

Since a revert should be treated as a withdrawal as well, the same check should be included when a new outbound is being created from a revert.

If the check doesn't pass, the CCTX should be aborted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants