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

Wrong implementation of the EIP712 signatures #143

Open
irux opened this issue Mar 19, 2023 · 1 comment
Open

Wrong implementation of the EIP712 signatures #143

irux opened this issue Mar 19, 2023 · 1 comment

Comments

@irux
Copy link

irux commented Mar 19, 2023

Hello, I am having problems to make EIP3009 from usdc polygon pos to work and it seems it uses the contracts from this repo.

It seems the EIP712 is wrong implemented: https://github.com/maticnetwork/pos-portal/blob/master/contracts/common/EIP712Base.sol#L36

First, the order from the domain separator should be in the order they give you here: https://eips.ethereum.org/EIPS/eip-712

Moreover the calculation of the EIP712_DOMAIN_TYPEHASH is wrong. We are using salt but we are not encoding any salt at all. EIP712Domain(string name,string version,address verifyingContract,bytes32 salt) this gives problems when you want to calculate the signature with standards like signTypedData from metamask.

@BertsLifee

This comment was marked as outdated.

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

2 participants