Commit 03d8e304 authored by Maurelian's avatar Maurelian

op-chain-ops: Remove additional SystemConfig interface

parent 79ca544e
...@@ -315,13 +315,6 @@ func SystemConfig(batch *safe.Batch, implementations superchain.ImplementationLi ...@@ -315,13 +315,6 @@ func SystemConfig(batch *safe.Batch, implementations superchain.ImplementationLi
return err return err
} }
// If we want to be able to override these based on the values in the config,
// the logic below will need to be updated. Right now the logic prefers the
// on chain values over the offchain values. This to maintain backwards compatibility
// in the short term.
startBlock := big.NewInt(0)
batchInboxAddress := common.HexToAddress(chainConfig.BatchInboxAddr.String())
var gasPriceOracleOverhead, gasPriceOracleScalar *big.Int var gasPriceOracleOverhead, gasPriceOracleScalar *big.Int
var batcherHash common.Hash var batcherHash common.Hash
var p2pSequencerAddress, finalSystemOwner common.Address var p2pSequencerAddress, finalSystemOwner common.Address
...@@ -357,16 +350,6 @@ func SystemConfig(batch *safe.Batch, implementations superchain.ImplementationLi ...@@ -357,16 +350,6 @@ func SystemConfig(batch *safe.Batch, implementations superchain.ImplementationLi
if err != nil { if err != nil {
return err return err
} }
// StartBlock is a new property, we want to explicitly set it to 0 if there is an error fetching it
systemConfigStartBlock, err := systemConfig.StartBlock(&bind.CallOpts{})
if err != nil && systemConfigStartBlock != nil {
startBlock = systemConfigStartBlock
}
// BatchInboxAddress is a new property, we want to set it to the offchain value if there is an error fetching it
systemConfigBatchInboxAddress, err := systemConfig.BatchInbox(&bind.CallOpts{})
if err != nil && systemConfigBatchInboxAddress != (common.Address{}) {
batchInboxAddress = systemConfigBatchInboxAddress
}
p2pSequencerAddress, err = systemConfig.UnsafeBlockSigner(&bind.CallOpts{}) p2pSequencerAddress, err = systemConfig.UnsafeBlockSigner(&bind.CallOpts{})
if err != nil { if err != nil {
return err return err
...@@ -377,15 +360,6 @@ func SystemConfig(batch *safe.Batch, implementations superchain.ImplementationLi ...@@ -377,15 +360,6 @@ func SystemConfig(batch *safe.Batch, implementations superchain.ImplementationLi
} }
} }
addresses := bindings.SystemConfigAddresses{
L1CrossDomainMessenger: common.HexToAddress(list.L1CrossDomainMessengerProxy.String()),
L1ERC721Bridge: common.HexToAddress(list.L1ERC721BridgeProxy.String()),
L1StandardBridge: common.HexToAddress(list.L1StandardBridgeProxy.String()),
L2OutputOracle: common.HexToAddress(list.L2OutputOracleProxy.String()),
OptimismPortal: common.HexToAddress(list.OptimismPortalProxy.String()),
OptimismMintableERC20Factory: common.HexToAddress(list.OptimismMintableERC20FactoryProxy.String()),
}
calldata, err := systemConfigABI.Pack( calldata, err := systemConfigABI.Pack(
"initialize", "initialize",
finalSystemOwner, finalSystemOwner,
...@@ -395,9 +369,6 @@ func SystemConfig(batch *safe.Batch, implementations superchain.ImplementationLi ...@@ -395,9 +369,6 @@ func SystemConfig(batch *safe.Batch, implementations superchain.ImplementationLi
l2GenesisBlockGasLimit, l2GenesisBlockGasLimit,
p2pSequencerAddress, p2pSequencerAddress,
genesis.DefaultResourceConfig, genesis.DefaultResourceConfig,
startBlock,
batchInboxAddress,
addresses,
) )
if err != nil { if err != nil {
return err return err
......
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