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

fix: fix broken backward compatibility of storage deposit logic #93

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

karim-en
Copy link
Collaborator

@karim-en karim-en commented Oct 17, 2024

Description

The Eth wallet contract fails to call the ft_transfer due to a gas error.
This PR includes two fixes:
1- Reduce the gas consumption of the ft_transfer
2- storage_balance_of now returns 0 instead of None so the wallet contract will not fail during the storage_deposit call.

Example of the failed transactions:
https://testnet.nearblocks.io/txns/0xb0dfd4298715ff8b0cc721fa23e9bc3921755f9d432865ce84275183bde97ca0#enhanced

https://testnet.nearblocks.io/txns/CTyZWBzs3bep8qT3V2xrfBRKCNLUpcvjcnPkABCUzTAH#enhanced

Tx after this fix:
https://testnet.nearblocks.io/txns/0x2c2c5736f3f2600de814aee19108472c24aeb450a1d9eeb6ac7aff0b7a1db338#enhanced

Performance / NEAR gas cost considerations

Testing

How should this be reviewed

Additional information

@karim-en karim-en changed the title fix: reduce the gas usage fix: fix broken backward compatibility of storage deposit logic Oct 17, 2024
@kiseln
Copy link

kiseln commented Oct 18, 2024

Gas is reduced because we check whether storage deposit is required?

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

Successfully merging this pull request may close these issues.

2 participants