stake.link

stake.link
DeFiHardhatBridge
27,500 USDC
View results
Submission Details
Severity: low
Invalid

Avoid Unnecessary state changes to save gas

The setRESDLTokenBridge function sets the address of the reSDLTokenBridge. To optimize this function, we can ensure that the new address is different from the current one before proceeding with the update. This prevents unnecessary state changes and gas usage when the new address is the same as the current one.

function setRESDLTokenBridge(address _reSDLTokenBridge) external onlyOwner {
require(_reSDLTokenBridge != reSDLTokenBridge, "Address already set as reSDLTokenBridge");
reSDLTokenBridge = _reSDLTokenBridge;
}
Updates

Lead Judging Commences

0kage Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.