-
Notifications
You must be signed in to change notification settings - Fork 929
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
Extend fallback handler documentation #532
Comments
It would also be helpful to include an explanation why |
I was not there when the original decision was made. Still, for me, |
You cannot extend the original contract in the same way with modules as you can with fallback handlers. With a fallback handler, you can add the ability to have the contract fulfill new interface requirements (add callbacks) like ERC-165 or ERC-777. With modules, you can add new ways of having your safe take actions (besides just executing things). I agree delegatecall is far more risky! But the same logic applies to modules, which already support delegate call. STATICCALL limitation would be relatively safe, but I feel like once you are giving something CALL ability, the step up to DELEGATECALL isn't a particularly big one as CALL lets you liquidate every asset the user owns except ETH. |
I’m not sure I follow... In particular, the Safe contract is |
Ah, I think you are right, my mistake! I still would like to see the ability to add DELEGATECALL fallback handlers, but the attack surface area is relatively small. I would also like to see the ability to install STATICCALL fallback handlers, so you could be very confident the installed handler couldn't do anything bad. |
* isL1SafeMasterCopy - isL1SingletonCopy * safeMasterCopyAddress - safeMasterCopyAddress safeMasterCopyAbi - safeMasterCopyAbi MASTER_COPY_ADDRESS - SINGLETON_ADDRESS MASTER_COPY_ABI - SINGLETON_ABI * type MasterCopyResponse - SafeSingletonResponse * masterCopy - singleton * type safeMasterCopyVersion - safeSingletonVersion type safeMasterCopyL2Version - safeSingletonL2Version * getServiceMasterCopiesInfo() - getServiceSingletonsInfo() * Rename some strings * Rename aliases in adapters folder * Update packages/protocol-kit/README.md Co-authored-by: Daniel <[email protected]> * Update packages/api-kit/tests/e2e/getServiceMastercopiesInfo.test.ts Co-authored-by: Daniel <[email protected]> * Commit suggestion --------- Co-authored-by: Daniel <[email protected]>
The
FallbackManager
contract forwards all calls to the handler contract via theCALL
opcode. Therefore in the next call frame themsg.sender
variable equals the Safe address. There's potential room for mistakes which has to be clear in the documentation.Example case:
Proposed solution
Add a warning in the contract documentation
The text was updated successfully, but these errors were encountered: