Add ERC712, ERC2330, ERC3156x, Ownable & Ownable2Step#114
Draft
Add ERC712, ERC2330, ERC3156x, Ownable & Ownable2Step#114
ERC712, ERC2330, ERC3156x, Ownable & Ownable2Step#114Conversation
EIP712, Ownable & Ownable2StepERC712, ERC3156x, Ownable & Ownable2Step
Changes to gas cost
🧾 Summary (20% most significant diffs)
Full diff report 👇
|
ERC712, ERC3156x, Ownable & Ownable2StepERC712, ERC2330, ERC3156x, Ownable & Ownable2Step
pakim249CAL
reviewed
Jun 20, 2023
|
|
||
| /// @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 { |
Contributor
There was a problem hiding this comment.
Would it be appropriate to set these contracts as abstract?
pakim249CAL
reviewed
Jun 20, 2023
|
|
||
| /// @inheritdoc IOwnable2Step | ||
| function acceptOwnership() public virtual { | ||
| address sender = msg.sender; |
Contributor
There was a problem hiding this comment.
No need to cache the sender because msg.sender is actually cheaper than using memory.
54116fe to
4b11ba6
Compare
4b11ba6 to
74f1943
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ERC712: Gas-optimized alternative to OZ's. Solmate does not have an equivalent.Ownable*: Gas-optimized equivalent to OZ's. Solmate only hasOwnedequivalent toOwnable.ERC3156x: No equivalent in OZ's or Solmate's.ERC2330: No equivalent in OZ's or Solmate's.