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

Verify that address is not a contract #1378

Open
luizstacio opened this issue Jun 13, 2024 · 0 comments
Open

Verify that address is not a contract #1378

luizstacio opened this issue Jun 13, 2024 · 0 comments

Comments

@luizstacio
Copy link
Member

luizstacio commented Jun 13, 2024

Motivation

Right now, if the user creates a normal transfer to a contract, it will transfer to the contract address, but the contract will not be able to access that balance, burning the amount transferred.

To improve this, we could add a check on the review transaction phase to verify if the address on the output coin is a contract we could display or throw an error, letting the user know that the amount will be lost.

To check if an address is a contract, we can query the network and see if the contract exists on the chain if query returns a contract id, them we show/throw the error.

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