-
Notifications
You must be signed in to change notification settings - Fork 969
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 #277
Gas optimizations #277
Conversation
ff7c725
to
b5b4168
Compare
@@ -9,6 +9,8 @@ import "../GnosisSafe.sol"; | |||
/// @title Compatibility Fallback Handler - fallback handler to provider compatibility between pre 1.3.0 and 1.3.0+ Safe contracts | |||
/// @author Richard Meissner - <[email protected]> | |||
contract CompatibilityFallbackHandler is DefaultCallbackHandler, ISignatureValidator { | |||
bytes4 internal constant SIMULATE_SELECTOR = bytes4(keccak256("simulate(address,bytes)")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not hardcoded? It's already translated by the compiler? Then why on other places we are using the hardcoded version of a keccak256 hash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Runtime gas costs are not affected only the deployment gas costs ... and I did not care about them here (as the contract is far from the limit). This way it would be easier to adjust if necessary.
@@ -3,7 +3,7 @@ pragma solidity >=0.7.0 <0.9.0; | |||
|
|||
import "../handler/HandlerContext.sol"; | |||
contract TestHandler is HandlerContext { | |||
function dudududu() external returns (address sender, address manager) { | |||
function dudududu() external view returns (address sender, address manager) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
de da da da
Support CreateCall contract library
simulateDelegatecall
intoCompatibilityFallbackHandler