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

feat: Add FMA superchainerc20 standard #102

Conversation

Joxess
Copy link
Contributor

@Joxess Joxess commented Oct 2, 2024

Description

This PR introduces the FMA for the SuperchainERC20 standard.

Additional context

It will allow the use of the SuperchainERC20 standard without requiring interop functionalities to be enabled at that time.

@tynes
Copy link
Contributor

tynes commented Oct 2, 2024

There is another possible failure mode of different token addresses between chains. The fix for this would be to have good deterministic deployment tooling around battle tested create2 deployers

@Ethnical Ethnical self-assigned this Oct 3, 2024
@zchn zchn requested a review from Ethnical October 3, 2024 21:35
@Joxess
Copy link
Contributor Author

Joxess commented Oct 4, 2024

The FMA has been updated to reflect the latest changes made in the specs and to include a the case suggested by @tynes.

Copy link

@Ethnical Ethnical left a comment

Choose a reason for hiding this comment

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

This make sense with the current
https://github.com/ethereum-optimism/design-docs/blob/main/protocol/superchainERC20/superc20Redesign.md

  • I would like to know also what happen if people are sending token directly to the SuperchainERC20Bridge do we have method to rescue them?
    Can this put the bridge in a inconsistent state (like if this is using SuperTokenERC20.balanceOf(this);). This probably bit out of the scope but I am interested in it.

Otherwise looks go to me 🚀

@Joxess
Copy link
Contributor Author

Joxess commented Oct 4, 2024

Sure, @Ethnical. Currently, there is no plan to add a rescue method yet; for now, we prefer to stick with minimal logic around the contract. Regarding the possibility of an inconsistent state, the bridge doesn’t hold state or care about its token balance, so it shouldn’t be a problem. Here is a reference implementation.

Copy link
Contributor

@tynes tynes left a comment

Choose a reason for hiding this comment

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

This looks good to me, cannot think of any other real risks

@skeletor-spaceman skeletor-spaceman merged commit ba5fbd0 into ethereum-optimism:main Oct 7, 2024
@skeletor-spaceman skeletor-spaceman deleted the feat/fma-superchainerc20-standard branch October 7, 2024 21:42
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.

4 participants