-
Notifications
You must be signed in to change notification settings - Fork 504
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
Recipient mapping! #246
Recipient mapping! #246
Conversation
src/base/BaseActionsRouter.sol
Outdated
/// @notice Calculates the address for a action | ||
/// @param recipient The address or address-flag for the action | ||
/// @return output The resultant address for the action | ||
function map(address recipient) internal view returns (address) { |
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.
wouldve been nice in a library but sadly it needs _msgSender
to work. Open to suggestions about where the function should live, and where the constants should live
@@ -0,0 +1 @@ | |||
127508 |
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.
Having a recipient of a specific address (not a helper constant) is now ~90 more expensive than before. But taking to the msg.sender
is now ~50 cheaper than before.
And most importantly - our sdks will be much easier to write haha
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.
previously taking to any address: 127419
now taking to specific address: 127508
now taking to msg.sender: 127370
closes #202
mapping recipients with constants for 2 reasons