Commit edf64537 authored by Maurelian's avatar Maurelian

fix(op-chain-ops): Move values out of storage in immutables.go and config.go

parent 43e89a48
......@@ -680,6 +680,7 @@ func NewL2ImmutableConfig(config *DeployConfig, block *types.Block) (immutables.
immutable["L2StandardBridge"] = immutables.ImmutableValues{
"otherBridge": config.L1StandardBridgeProxy,
"messenger": predeploys.L2CrossDomainMessengerAddr,
}
immutable["L2CrossDomainMessenger"] = immutables.ImmutableValues{
"otherMessenger": config.L1CrossDomainMessengerProxy,
......@@ -707,7 +708,9 @@ func NewL2ImmutableConfig(config *DeployConfig, block *types.Block) (immutables.
"minimumWithdrawalAmount": config.BaseFeeVaultMinimumWithdrawalAmount,
"withdrawalNetwork": config.BaseFeeVaultWithdrawalNetwork.ToUint8(),
}
immutable["OptimismMintableERC20Factory"] = immutables.ImmutableValues{
"bridge": predeploys.L2StandardBridgeAddr,
}
return immutable, nil
}
......@@ -732,9 +735,7 @@ func NewL2StorageConfig(config *DeployConfig, block *types.Block) (state.Storage
"xDomainMsgSender": "0x000000000000000000000000000000000000dEaD",
"msgNonce": 0,
}
storage["L2StandardBridge"] = state.StorageValues{
"messenger": predeploys.L2CrossDomainMessengerAddr,
}
storage["L2StandardBridge"] = state.StorageValues{}
storage["L1Block"] = state.StorageValues{
"number": block.Number(),
"timestamp": block.Time(),
......@@ -764,14 +765,6 @@ func NewL2StorageConfig(config *DeployConfig, block *types.Block) (state.Storage
storage["ProxyAdmin"] = state.StorageValues{
"_owner": config.ProxyAdminOwner,
}
storage["L2ERC721Bridge"] = state.StorageValues{
"messenger": predeploys.L2CrossDomainMessengerAddr,
}
storage["OptimismMintableERC20Factory"] = state.StorageValues{
"bridge": predeploys.L2StandardBridgeAddr,
"_initialized": InitializedValue,
"_initializing": false,
}
return storage, nil
}
......
......@@ -131,6 +131,7 @@ func BuildOptimism(immutable ImmutableConfig) (DeploymentResults, error) {
{
Name: "L2ERC721Bridge",
Args: []interface{}{
immutable["L2ERC721Bridge"]["messenger"],
immutable["L2ERC721Bridge"]["otherBridge"],
},
},
......@@ -216,11 +217,7 @@ func l2Deployer(backend *backends.SimulatedBackend, opts *bind.TransactOpts, dep
}
_, tx, _, err = bindings.DeployL1FeeVault(opts, backend, recipient, minimumWithdrawalAmount, withdrawalNetwork)
case "OptimismMintableERC20Factory":
bridge, ok := deployment.Args[0].(common.Address)
if !ok {
return nil, fmt.Errorf("invalid type for bridge")
}
_, tx, _, err = bindings.DeployOptimismMintableERC20Factory(opts, backend, bridge)
_, tx, _, err = bindings.DeployOptimismMintableERC20Factory(opts, backend, predeploys.L2StandardBridgeAddr)
case "DeployerWhitelist":
_, tx, _, err = bindings.DeployDeployerWhitelist(opts, backend)
case "LegacyMessagePasser":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment