This repository has been archived by the owner on Mar 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 505
fix: bridge ERC20 tokens from L1 to L2 using migrations
scripts
#486
Merged
marcello33
merged 14 commits into
mardizzone/node-16
from
fix/initialise-erc20-child-tokens
Nov 28, 2023
Merged
fix: bridge ERC20 tokens from L1 to L2 using migrations
scripts
#486
marcello33
merged 14 commits into
mardizzone/node-16
from
fix/initialise-erc20-child-tokens
Nov 28, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
leovct
changed the title
fix: initialise child ERC20 tokens
fix: bridge ERC20 tokens from L1 to L2 using Nov 24, 2023
migrations
scripts
marcello33
approved these changes
Nov 27, 2023
It failed after 6h but with no failed tests :/ will rerun it |
@marcello33 I believe these issues are not connected to the recent changes. The tests were failing in the same manner on the last commits. |
Yes, agreed @leovct |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The initial approach involved using
childChain.addToken
to createChildERC20
andChildERC721
contracts, but this rendered them unusable due to ownership issues. In this scenario, theChildChain
contract became the owner, preventing updates to the child chain address and leaving it set to0x0
. Consequently, attempts to bridge resulted in reverting transactions (with no explicit error message 😅) due to the restrictiveonlyChildChain
modifier (see maticnetwork/matic-cli#210).contracts/contracts/child/ChildChain.sol
Lines 55 to 76 in ba520b6
contracts/contracts/child/ChildERC20.sol
Lines 11 to 21 in ba520b6
contracts/contracts/child/ChildToken.sol
Lines 79 to 87 in ba520b6
The revised logic aligns with the updated scripts, employing
ChildERC20Proxified
andChildERC721Proxified
for token creation. This approach allows for proper initialisation, subsequent child chain address updates, and token mapping. As a result, theChildChain
contract can seamlessly send tokens to our L2 address as intended.Jira Ticket
Test
New deployment.
After bridging some ether and ERC20 tokens.