-
Notifications
You must be signed in to change notification settings - Fork 12.1k
IndirectCall library #5630
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
base: master
Are you sure you want to change the base?
IndirectCall library #5630
Conversation
|
4d8b726
to
d31d407
Compare
Some contract are required to perform arbitrary action controlled by user input. This is dangerous if the contract has special permissions, or holds assets. In such cases, using a relay contract can be useful to change the msg.sender of the outgoing call. This pattern is used in the ERC-4337 entrypoint that relies on a helper called the "senderCreator" when calling account factories. Similarly ERC-6942 does factory calls that could be dangerous if performed directly.
This contract provides a
indirectCall
that can be used to perform dangerous calls. These calls are indirect through a minimal relayer.Edit: this can also be usefull for some construction that use a singleton with "satellites" contract that hold assets/permissions.
PR Checklist
npx changeset add
)