-
Notifications
You must be signed in to change notification settings - Fork 10
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
[R4R]~{feature} set native token as MNT #2
Conversation
2. finish deploy process change
2. finish cross domain process change.
* @dev The ETH predeploy provides an ERC20 interface for ETH deposited to Layer 2. Note that | ||
* unlike on Layer 1, Layer 2 accounts do not have a balance field. | ||
*/ | ||
contract BVM_ETH is OptimismMintableERC20 { |
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.
BVM_ETH already exist on mainnet. Do we need to upgrade the contract code with setCode
?
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 file which in contracts-bedrock
path is used for local dev network.And I think it still need to be upgraded by setCode
, it rely on a new abstract contract named OptimismMintableERC20
.
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 file which in
contracts-bedrock
path is used for local dev network.
What do you mean by this? All the contracts locate in this path.
Why do we need to upgrade the old BVM_ETH contract code? Do the old code missing any methods? Could you clarify this?
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.
bedrock upgrade will write all precompile contracts into genesis, and at meantime, it can be set as a upgradable contract. so we can jump the setcode step when we achieve this by a new genesis.json
packages/contracts-bedrock/contracts/libraries/BridgeConstants.sol
Outdated
Show resolved
Hide resolved
packages/contracts-bedrock/contracts/universal/CrossDomainMessenger.sol
Outdated
Show resolved
Hide resolved
op-e2e/withdrawal_lib.go
Outdated
) | ||
|
||
func ProveAndFinalizeWithdrawalForSingleTx(t *testing.T, l1Client *ethclient.Client, ethPrivKey *ecdsa.PrivateKey, l2WithdrawalReceipt *types.Receipt) (*types.Receipt, *types.Receipt) { | ||
params, proveReceipt := ProveWithdrawalForSingleTx(t, l1Client, ethPrivKey, l2WithdrawalReceipt) |
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.
After ProveWithdrawalForSingleTx
, wait for some L1 blocks, then FinalizeWithdrawalForSingleTx
- add a duration?
packages/contracts-bedrock/contracts/universal/CrossDomainMessenger.sol
Outdated
Show resolved
Hide resolved
Co-authored-by: shijiang.guo <shijiang@192.168.0.101>
* remove redundant parameters * update bindings * bugfix
* modify _localToken check in _initiateBridgeERC20 * refactor BridgeERC20 * update bindings
packages/contracts-bedrock/contracts/L2/L2CrossDomainMessenger.sol
Outdated
Show resolved
Hide resolved
fix all the unitests for contracts on MantleV2
@@ -105,11 +107,12 @@ func MigrateWithdrawal( | |||
} | |||
|
|||
gasLimit := MigrateWithdrawalGasLimit(data, chainID) | |||
|
|||
// TODO just put zero amount on the `NewWithdrawal` function for fixing compile error. |
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.
The above three TODO
will be resolved in #12
@@ -237,6 +237,14 @@ func BuildL1DeveloperGenesis(config *DeployConfig) (*core.Genesis, error) { | |||
memDB.SetState(*proxyAddr, common.Hash{31: 0x01}, symbol) | |||
memDB.SetState(*proxyAddr, common.Hash{31: 0x02}, decimals) | |||
} | |||
if name == "L1MantleToken" { | |||
name, _ := state.EncodeStringValue("Mantle Token", 0) | |||
symbol, _ := state.EncodeStringValue("MNT", 0) |
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.
Does the error here need to be handled?
"github.com/ethereum/go-ethereum/ethclient" | ||
"github.com/ethereum/go-ethereum/ethclient/gethclient" | ||
"github.com/ethereum/go-ethereum/rpc" | ||
"github.com/stretchr/testify/require" |
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.
go fmt imports
Core changes:
Issue link: