Skip to content
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

Add immutable wallet proxy hook #632

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ScreamingHawk
Copy link
Contributor

@ScreamingHawk ScreamingHawk commented Dec 19, 2024

Requires: 0xsequence/wallet-contracts#191

Immutable ERC721/1155s have an OperatorAllowlist that prevent contracts owning tokens. For wallets to own tokens they must have an approved bytecode and implementation address returned by a PROXY_getImplementation() function.

This PR adds the PROXY_getImplementation() function to a wallet via the hooks module. This is added whenever the user interacts with an immutable chain. The hook is only added once.

@ScreamingHawk ScreamingHawk requested a review from a team as a code owner December 19, 2024 01:35
]),
gasLimit: 50000, // Expected ~28k gas. Buffer added
delegateCall: false,
revertOnError: false,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revertOnError: false, is intentional. We don't want a failure adding the hook to prevent whatever the user's intended transaction is.

to: this.address,
data: hooksInterface.encodeFunctionData(hooksInterface.getFunction('addHook')!, [
'0x90611127',
'0x1f56dbAD5e8319F0DE9a323E24A31b5077dEB1a4'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets move this hardcoded address somewhere else, maybe context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants