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

Optimization: check if msg.value == 0 forces a storage cell re-write #8

Open
SergioDemianLerner opened this issue Feb 14, 2021 · 0 comments

Comments

@SergioDemianLerner
Copy link
Contributor

Storage cell writes are very expensive in RSK. If msg.value is zero this write would be unnecessary. Check that Solidity performs the zero check or not (by disassembling or by executing with zero msg.value and checking gas usage).

balances[params.liquidityProviderRskAddress] += msg.value;

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