Commit f9ad035f authored by clabby's avatar clabby

Chain ops changes

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