Commit f9ad035f authored by clabby's avatar clabby

Chain ops changes

parent 904dfd50
...@@ -140,7 +140,7 @@ func main() { ...@@ -140,7 +140,7 @@ func main() {
return err return err
} }
period, err := contracts.OptimismPortal.FINALIZATIONPERIODSECONDS(&bind.CallOpts{}) period, err := contracts.L2OutputOracle.FINALIZATIONPERIODSECONDS(&bind.CallOpts{})
if err != nil { if err != nil {
return err return err
} }
......
...@@ -285,6 +285,7 @@ func deployL1Contracts(config *DeployConfig, backend *backends.SimulatedBackend) ...@@ -285,6 +285,7 @@ func deployL1Contracts(config *DeployConfig, backend *backends.SimulatedBackend)
uint642Big(uint64(config.L1GenesisBlockTimestamp)), uint642Big(uint64(config.L1GenesisBlockTimestamp)),
config.L2OutputOracleProposer, config.L2OutputOracleProposer,
config.L2OutputOracleChallenger, config.L2OutputOracleChallenger,
uint642Big(config.FinalizationPeriodSeconds),
}, },
}, },
{ {
...@@ -295,7 +296,6 @@ func deployL1Contracts(config *DeployConfig, backend *backends.SimulatedBackend) ...@@ -295,7 +296,6 @@ func deployL1Contracts(config *DeployConfig, backend *backends.SimulatedBackend)
Args: []interface{}{ Args: []interface{}{
predeploys.DevL2OutputOracleAddr, predeploys.DevL2OutputOracleAddr,
config.FinalSystemOwner, config.FinalSystemOwner,
uint642Big(config.FinalizationPeriodSeconds),
true, // _paused true, // _paused
}, },
}, },
...@@ -353,15 +353,15 @@ func l1Deployer(backend *backends.SimulatedBackend, opts *bind.TransactOpts, dep ...@@ -353,15 +353,15 @@ func l1Deployer(backend *backends.SimulatedBackend, opts *bind.TransactOpts, dep
deployment.Args[3].(*big.Int), deployment.Args[3].(*big.Int),
deployment.Args[4].(common.Address), deployment.Args[4].(common.Address),
deployment.Args[5].(common.Address), deployment.Args[5].(common.Address),
deployment.Args[6].(*big.Int),
) )
case "OptimismPortal": case "OptimismPortal":
_, tx, _, err = bindings.DeployOptimismPortal( _, tx, _, err = bindings.DeployOptimismPortal(
opts, opts,
backend, backend,
deployment.Args[0].(common.Address), deployment.Args[0].(common.Address),
deployment.Args[2].(*big.Int),
deployment.Args[1].(common.Address), deployment.Args[1].(common.Address),
deployment.Args[3].(bool), deployment.Args[2].(bool),
) )
case "L1CrossDomainMessenger": case "L1CrossDomainMessenger":
_, tx, _, err = bindings.DeployL1CrossDomainMessenger( _, tx, _, err = bindings.DeployL1CrossDomainMessenger(
......
...@@ -445,7 +445,7 @@ func (s *CrossLayerUser) ActCompleteWithdrawal(t Testing) { ...@@ -445,7 +445,7 @@ func (s *CrossLayerUser) ActCompleteWithdrawal(t Testing) {
// CompleteWithdrawal creates a L1 withdrawal finalization tx for the given L2 withdrawal tx, returning the tx hash. // CompleteWithdrawal creates a L1 withdrawal finalization tx for the given L2 withdrawal tx, returning the tx hash.
// It's an invalid action to attempt to complete a withdrawal that has not passed the L1 finalization period yet // It's an invalid action to attempt to complete a withdrawal that has not passed the L1 finalization period yet
func (s *CrossLayerUser) CompleteWithdrawal(t Testing, l2TxHash common.Hash) common.Hash { func (s *CrossLayerUser) CompleteWithdrawal(t Testing, l2TxHash common.Hash) common.Hash {
finalizationPeriod, err := s.L1.env.Bindings.OptimismPortal.FINALIZATIONPERIODSECONDS(&bind.CallOpts{}) finalizationPeriod, err := s.L1.env.Bindings.L2OutputOracle.FINALIZATIONPERIODSECONDS(&bind.CallOpts{})
require.NoError(t, err) require.NoError(t, err)
// Figure out when our withdrawal was included // Figure out when our withdrawal was included
......
...@@ -54,7 +54,7 @@ func WaitForFinalizationPeriod(ctx context.Context, client *ethclient.Client, po ...@@ -54,7 +54,7 @@ func WaitForFinalizationPeriod(ctx context.Context, client *ethclient.Client, po
} }
l2BlockNumber = l2BlockNumber.Mul(l2BlockNumber, submissionInterval) l2BlockNumber = l2BlockNumber.Mul(l2BlockNumber, submissionInterval)
finalizationPeriod, err := portal.FINALIZATIONPERIODSECONDS(opts) finalizationPeriod, err := l2OO.FINALIZATIONPERIODSECONDS(opts)
if err != nil { if err != nil {
return 0, err return 0, err
} }
......
...@@ -168,11 +168,7 @@ contract Portal_Initializer is L2OutputOracle_Initializer { ...@@ -168,11 +168,7 @@ contract Portal_Initializer is L2OutputOracle_Initializer {
function setUp() public virtual override { function setUp() public virtual override {
super.setUp(); super.setUp();
opImpl = new OptimismPortal({ opImpl = new OptimismPortal({ _l2Oracle: oracle, _guardian: guardian, _paused: true });
_l2Oracle: oracle,
_guardian: guardian,
_paused: true
});
Proxy proxy = new Proxy(multisig); Proxy proxy = new Proxy(multisig);
vm.prank(multisig); vm.prank(multisig);
proxy.upgradeToAndCall( proxy.upgradeToAndCall(
...@@ -231,11 +227,7 @@ contract Messenger_Initializer is L2OutputOracle_Initializer { ...@@ -231,11 +227,7 @@ contract Messenger_Initializer is L2OutputOracle_Initializer {
super.setUp(); super.setUp();
// Deploy the OptimismPortal // Deploy the OptimismPortal
op = new OptimismPortal({ op = new OptimismPortal({ _l2Oracle: oracle, _guardian: guardian, _paused: false });
_l2Oracle: oracle,
_guardian: guardian,
_paused: false
});
vm.label(address(op), "OptimismPortal"); vm.label(address(op), "OptimismPortal");
// Deploy the address manager // Deploy the address manager
......
...@@ -28,7 +28,7 @@ const deployFn: DeployFunction = async (hre) => { ...@@ -28,7 +28,7 @@ const deployFn: DeployFunction = async (hre) => {
0, 0,
hre.deployConfig.l2OutputOracleProposer, hre.deployConfig.l2OutputOracleProposer,
hre.deployConfig.l2OutputOracleChallenger, hre.deployConfig.l2OutputOracleChallenger,
hre.deployConfig.finalizationPeriodSeconds hre.deployConfig.finalizationPeriodSeconds,
], ],
postDeployAction: async (contract) => { postDeployAction: async (contract) => {
await assertContractVariable( await assertContractVariable(
......
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