-
Notifications
You must be signed in to change notification settings - Fork 7
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
Smr 1813 withdraw erc20s #16
Merged
Merged
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
13e66f1
WIP
Benjimmutable 3c5b7c7
Merge branch 'proxies-on-deployment' of github.com:immutable/zkevm-br…
Benjimmutable 080dedc
ERC20 Bridging pre-tests
Benjimmutable 7493221
WIP
Benjimmutable 40c4992
Merge branch 'proxies-on-deployment' of github.com:immutable/zkevm-br…
Benjimmutable ec43e7d
lint
Benjimmutable 939b088
Adding initial tests for withdrawals
Benjimmutable b98a961
Add test for unset root token
Benjimmutable 8a01761
All tests except integration
Benjimmutable eb1c5bc
Integration tests
Benjimmutable 024b4d9
Merge branch 'main' of github.com:immutable/zkevm-bridge-contracts in…
Benjimmutable ff6b92d
Address PR comment
Benjimmutable File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
// SPDX-License-Identifier: Apache 2.0 | ||
pragma solidity ^0.8.21; | ||
|
||
// TODO to be used when sending messages L2 -> L1 | ||
interface IChildERC20BridgeAdaptor {} | ||
interface IChildERC20BridgeAdaptor { | ||
/** | ||
* @notice Send an arbitrary message to the root chain via the message passing protocol. | ||
* @param payload The message to send, encoded in a `bytes` array. | ||
* @param refundRecipient Used if the message passing protocol requires fees & pays back excess to a refund recipient. | ||
* @dev `payable` because the message passing protocol may require a fee to be paid. | ||
*/ | ||
function sendMessage(bytes calldata payload, address refundRecipient) external payable; | ||
} |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// SPDX-License-Identifier: Apache 2.0 | ||
// Adapted from OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol) | ||
pragma solidity ^0.8.21; | ||
|
||
import "../../child/ChildERC20.sol"; | ||
|
||
/** | ||
* @title ChildERC20FailOnBurn | ||
* @author Immutable (@Benjimmutable) | ||
* @notice ChildERC20 contract, except burn always returns false. Used for testing. | ||
* @dev USED FOR TESTING | ||
*/ | ||
// solhint-disable reason-string | ||
contract ChildERC20FailOnBurn is ChildERC20 { | ||
function burn(address account, uint256 amount) public virtual override returns (bool) { | ||
return false; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// SPDX-License-Identifier: Apache 2.0 | ||
pragma solidity ^0.8.21; | ||
|
||
contract MockChildAxelarGasService { | ||
function payNativeGasForContractCall( | ||
address sender, | ||
string calldata destinationChain, | ||
string calldata destinationAddress, | ||
bytes calldata payload, | ||
address refundAddress | ||
) external payable {} | ||
} |
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should never happen, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct, it's copied from here as an extra safety check: https://github.com/immutable/poly-core-contracts/blob/main/contracts/child/ChildERC20Predicate.sol#L171-L172