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

Gas Optimizations #53

Open
code423n4 opened this issue Mar 9, 2022 · 1 comment
Open

Gas Optimizations #53

code423n4 opened this issue Mar 9, 2022 · 1 comment
Labels
bug Something isn't working G (Gas Optimization)

Comments

@code423n4
Copy link
Contributor

G-01:

The contracts use unlocked pragma. As different compiler versions have critical behavior specifics if the contract gets accidentally deployed using another compiler version compared to one they tested with, various types of undesired behavior can be introduced by using the unlocked pragma.

G-02:

use uint256 instead of uint8,16,32,64.. in CrossAnchorBridge.sol

G-03:

use ++i instead of i++ in CrossAnchorBridge.sol,L#149

G-04:

Use short reason strings can save gas. Every reason string takes at least 32 bytes.Use short reason strings that fits in 32 bytes or it will become more expensive. can use custom errors or custom codes. CrossAnchorBridge.sol

@code423n4 code423n4 added bug Something isn't working G (Gas Optimization) labels Mar 9, 2022
code423n4 added a commit that referenced this issue Mar 9, 2022
@GalloDaSballo
Copy link
Collaborator

Less than 100 gas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working G (Gas Optimization)
Projects
None yet
Development

No branches or pull requests

2 participants