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

Merged
merged 4 commits into from
Feb 3, 2025

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 force-pushed the remove-storage-deposit branch from 2140d4e to 441f004 Compare October 17, 2024 16:51
@karim-en karim-en changed the title fix: reduce the gas usage fix: fix broken backward compatibility of storage deposit logic Oct 17, 2024
@karim-en karim-en requested review from olga24912 and kiseln October 17, 2024 22:07
@kiseln
Copy link

kiseln commented Oct 18, 2024

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

@karim-en karim-en merged commit 8150d74 into master Feb 3, 2025
6 of 7 checks passed
@karim-en karim-en deleted the remove-storage-deposit branch February 3, 2025 17:55
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.

3 participants