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

Domain separator is miscalculated when delegatecalled #415

Open
Shungy opened this issue Jun 21, 2024 · 0 comments
Open

Domain separator is miscalculated when delegatecalled #415

Shungy opened this issue Jun 21, 2024 · 0 comments

Comments

@Shungy
Copy link

Shungy commented Jun 21, 2024

There should be a check here comparing cached address(this) against the address(this) of the current context. If the compared addresses don't match, it should recalculate the domain separator:

return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();

Currently any delegatecalls will result in incorrect domain separator due to the difference in the actual address of the context and the address when the domain separator was cached.

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

No branches or pull requests

1 participant