-
Notifications
You must be signed in to change notification settings - Fork 197
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
🎨 Style nits #51
🎨 Style nits #51
Conversation
src/DomainSeparator.sol
Outdated
/// @notice Returns the domain separator for the current chain. | ||
/// @dev Uses cached version if chainid and address are unchanged from construction. | ||
function DOMAIN_SEPARATOR() public view returns (bytes32) { | ||
if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) { | ||
return _CACHED_DOMAIN_SEPARATOR; | ||
} else { | ||
return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME); | ||
} | ||
return | ||
block.chainid == _CACHED_CHAIN_ID | ||
? _CACHED_DOMAIN_SEPARATOR | ||
: _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME); |
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.
as discussed the this address(this) stuff isnt rly needed
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.
and removing it should give us a lil gas savings
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.
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 should we care about supporting delegatecalls at our own expense? this case is unique from OZ's convo because it is logical that tokens could want to delegatecall ERC20 impls with EIP712 mixed in, but no one should be delegatecaling permit2
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.
that's fair - happy to leave it out then
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.
sorry some conflicts from today but feel free to merge !
No description provided.