Skip to content

Add ERC20 Cross-Chain Bridging, SuperchainERC20 #436

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

Merged
merged 81 commits into from
Mar 13, 2025

Conversation

ericglau
Copy link
Member

@ericglau ericglau commented Jan 31, 2025

Adds "Cross-Chain Bridging" feature for ERC20 (and Stablecoin and RWA tabs), with the selectable options being "Custom" or "SuperchainERC20".

These are based on ERC20Bridgeable from OpenZeppelin Community Contracts, where:

Wizard UI Preview

@ericglau ericglau changed the title Add ERC20 Bridgeable, SuperchainERC20 Add ERC20 Cross-Chain Bridging, SuperchainERC20 Feb 25, 2025
@ericglau
Copy link
Member Author

@SocketSecurity ignore npm/ws@7.4.6
Unrelated to this PR, see #421 (comment)

@ericglau
Copy link
Member Author

@SocketSecurity ignore npm/undici@5.28.4

Unrelated to this PR, see #430 (comment)

@ericglau
Copy link
Member Author

Added a Chain ID field under Premint, which only appears and is only required when both Premint has a value and Cross-Chain Bridging is enabled.

@ericglau
Copy link
Member Author

Ready for review.

Copy link
Member

@ernestognw ernestognw left a comment

Choose a reason for hiding this comment

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

Looking good. I would suggest setting the default chainId 1 instead of the current input focus.

Captura de pantalla 2025-02-26 a la(s) 9 43 10 a m

The reason is that the copy button on top is still enabled, allowing to copy the code without the premint option.

@ericglau
Copy link
Member Author

ericglau commented Feb 26, 2025

@ernestognw I changed it to disable the action buttons (Copy etc.) and make the code non-selectable when there are errors in the input.
Screenshot 2025-02-26 at 1 47 01 PM

I'm not sure if we should set the default chainId to 1, in case users want to use a ERC-7802 bridge that not available on Ethereum L1.

For example, if using the predeployed SuperchainTokenBridge, the ERC-7802 mints and burns would only be on Superchain networks and not on Ethereum. I think we should require the user to specify a chainId, since they may want to premint on something like OP Mainnet instead.

Copy link
Contributor

Thank you for your contribution to OpenZeppelin Contracts Wizard. Before being able to integrate those changes, we would like you to sign our Contributor License Agreement.
You can sign the CLA by just posting a Pull Request Comment with the sentence below. Thanks.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@ericglau
Copy link
Member Author

I have read the CLA Document and I hereby sign the CLA

@ericglau ericglau merged commit bdec576 into OpenZeppelin:master Mar 13, 2025
12 of 13 checks passed
@ericglau ericglau deleted the erc20bridgeable branch March 13, 2025 20:27
@github-actions github-actions bot locked and limited conversation to collaborators Mar 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants