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

fix: use preprocessor in l1 contracts for native token checks #169

Open
SantiagoPittella opened this issue Feb 21, 2024 · 0 comments
Open
Assignees

Comments

@SantiagoPittella
Copy link

🌟 Feature Request

📝 Description

In the L1 contracts, we are currently sending msg.value AND the _amount field with the same values to catch both native token and native eth cases.

Use the preprocessor to add checks:
In the case of native ERC20: msg.value should be zero.
In the case of native ETH: _amount should be zero.

📋 Additional Context

Most of this changes should be done in Mailbox.sol and the bridges.

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

No branches or pull requests

1 participant