You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mitigation: Change the visibility for the mentioned functions from public to external
2. Unnecessary storage retrieval
Summary: Storage values retrieved repeatedly in the same function can be cached to optimize gas usage.
Details: In _startBridge, 6 storage calls are made that can be replaced by chaching 1 variables, reducing gas usage significantly. For example, _bridge(hopData.asset).token can be replaced by s.hopBridges[hopData.asset] where s is stored in memory.
Mitigation: Output of getStorage can be cahced in memory and later calls to _bridge can be replaced with queries to the Storage struct saved in the cache.
The text was updated successfully, but these errors were encountered:
1. Functions visibility
2. Unnecessary storage retrieval
The text was updated successfully, but these errors were encountered: