20,000 USDC
View results
Submission Details
Severity: gas
Valid

Use `assembly` to write address storage values

Summary

Vulnerability Details

Where it does not affect readability,
using assembly for simple setters allows to save gas not only on deployment,
but also on function calls.

There are 6 instances of this issue:

Impact

Tools Used

Recommendations

Using assembly update address to save gas.

For example:

contract Contract1 {
address owner;
function assemblyUpdateOwner(address newOwner) public {
assembly {
sstore(owner.slot, newOwner)
}
}
}

Support

FAQs

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