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

L2StandardERC20 not being initialized correctly #3

Open
0xnakato opened this issue Mar 1, 2023 · 4 comments
Open

L2StandardERC20 not being initialized correctly #3

0xnakato opened this issue Mar 1, 2023 · 4 comments

Comments

@0xnakato
Copy link

0xnakato commented Mar 1, 2023

Hello, I'm testing the ERC20 permit feature with USDC and DAI on the zkSync Era testnet. However, a permit signature created with the token name will not work and returns the error Invalid signature.

And it looks like the bridge token contract is not correctly initialized the ERC20PermitUpgradeable and only ERC20Upgradeable is initialized.

https://github.com/matter-labs/era-contracts/blob/main/zksync/contracts/bridge/L2StandardERC20.sol#L82

The DOMAIN_SEPARATOR() of the testnet DAI token will return 0x630ae2e0feb87df0136547b778ed1ad7bb1fdc555ac24d3a61b55432a339fe12 which is the exact value of the uninitialized domain separator.

Example codes to generate the same/uninitialized domain separator
https://gist.github.com/0xnakato/2c803385ac4c47c0455d6d0de105538f

@vladbochok
Copy link
Member

Hello @0xnakato, thank you for reporting the issue!
We are aware of it and plan to implement the fix in the upcoming upgrade.

@SensationalShubham
Copy link

Hey @vladbochok, can i work on this issue?

StanislavBreadless pushed a commit that referenced this issue Sep 14, 2023
@thekera404
Copy link

Hey @vladbochok, can i work on this issue?

@haylas

This comment was marked as off-topic.

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

5 participants