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

Swap: add gas amount checking and throw an error #117

Open
fadeev opened this issue Jan 24, 2024 · 0 comments
Open

Swap: add gas amount checking and throw an error #117

fadeev opened this issue Jan 24, 2024 · 0 comments

Comments

@fadeev
Copy link
Member

fadeev commented Jan 24, 2024

Right now when the tokens you submitted are not enough to get enough gas, the contract doesn't throw an error and the tokens are lost.

This was supposed to be swapped for BTC, and it obviously failed, but it didn't revert:

https://explorer.zetachain.com/cc/tx/0xb77350a13c830ff251e22b95ac6fe473cd042ec96ff2146b7c92f7ce4a91891b

Instead, it should compare the output amount for gas with the needed gas and throw if it's less than what's needed.

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

No branches or pull requests

1 participant