-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: multisend contract detection #58
Conversation
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.
btw we can probably refactor to using a manifest bundled with the package a la ApeWorX/uniswap-sdk@bd6b26e
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.
Maybe manifests/
instead of data/
multisend call only doesn't enforce being delegatecalled
Head branch was pushed to by a user without write access
cfcc7dc
to
c79cb90
Compare
What I did
instead of hardcoding the addresses of multisend contracts on different networks, one can observe there are ever only two addresses, with pre-signed deployment transactions available for both.
instead, we just check the code of all addresses and use the first one that matches the expected code.
i also switched
MultiSend
forMultiSendCallOnly
contract as it doesn't allow making delegatecalls that can modify the safe storage, potentially bricking it or stealing all funds.both brownie-safe and safe web ui have switched to
MultiSendCallOnly
as the default.we only ever delegatecall to the multisend contract itself, which we know is stateless and has the code we matched against the hardcoded bytecode.
fixes: #51
How I did it
How to verify it
Checklist