-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add ERC712
, ERC2330
, ERC3156x
, Ownable
& Ownable2Step
#114
base: main
Are you sure you want to change the base?
Conversation
EIP712
, Ownable
& Ownable2Step
ERC712
, ERC3156x
, Ownable
& Ownable2Step
Changes to gas cost
🧾 Summary (20% most significant diffs)
Full diff report 👇
|
ERC712
, ERC3156x
, Ownable
& Ownable2Step
ERC712
, ERC2330
, ERC3156x
, Ownable
& Ownable2Step
|
||
/// @dev Gas-optimized extsload getters to allow anyone to read storage from this contract. | ||
/// Enables the benefit of https://eips.ethereum.org/EIPS/eip-2330 without requiring changes to the execution layer. | ||
contract ERC2330 is IERC2330 { |
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.
Would it be appropriate to set these contracts as abstract?
|
||
/// @inheritdoc IOwnable2Step | ||
function acceptOwnership() public virtual { | ||
address sender = msg.sender; |
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.
No need to cache the sender because msg.sender is actually cheaper than using memory.
54116fe
to
4b11ba6
Compare
4b11ba6
to
74f1943
Compare
ERC712
: Gas-optimized alternative to OZ's. Solmate does not have an equivalent.Ownable*
: Gas-optimized equivalent to OZ's. Solmate only hasOwned
equivalent toOwnable
.ERC3156x
: No equivalent in OZ's or Solmate's.ERC2330
: No equivalent in OZ's or Solmate's.