Skip to content

Commit

Permalink
Merge pull request #48 from OffchainLabs/update-deployer-script
Browse files Browse the repository at this point in the history
Update depluyer script to provide multicall
  • Loading branch information
gvladika authored Oct 21, 2023
2 parents ca105d9 + 74eb6e0 commit b5b64b0
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions scripts/atomicTokenBridgeDeployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,20 @@ export const deployL1TokenBridgeCreator = async (
verifyContracts: boolean = false
) => {
/// deploy creator behind proxy
const l2MulticallAddressOnL1Fac = await new ArbMulticall2__factory(
l1Deployer
).deploy()
const l2MulticallAddressOnL1 = await l2MulticallAddressOnL1Fac.deployed()

const l1TokenBridgeCreatorProxyAdmin = await new ProxyAdmin__factory(
l1Deployer
).deploy()
await l1TokenBridgeCreatorProxyAdmin.deployed()

const l1TokenBridgeCreatorLogic =
await new L1AtomicTokenBridgeCreator__factory(l1Deployer).deploy()
await new L1AtomicTokenBridgeCreator__factory(l1Deployer).deploy(
l2MulticallAddressOnL1.address
)
await l1TokenBridgeCreatorLogic.deployed()

const l1TokenBridgeCreatorProxy =
Expand Down Expand Up @@ -346,7 +353,6 @@ export const deployL1TokenBridgeCreator = async (
}

/// deploy L2 contracts as placeholders on L1

const l2TokenBridgeFactoryOnL1 =
await new L2AtomicTokenBridgeFactory__factory(l1Deployer).deploy()
await l2TokenBridgeFactoryOnL1.deployed()
Expand Down Expand Up @@ -374,11 +380,6 @@ export const deployL1TokenBridgeCreator = async (
const l2WethAddressOnL1 = await new AeWETH__factory(l1Deployer).deploy()
await l2WethAddressOnL1.deployed()

const l2MulticallAddressOnL1 = await new ArbMulticall2__factory(
l1Deployer
).deploy()
await l2MulticallAddressOnL1.deployed()

const l1Multicall = await new Multicall2__factory(l1Deployer).deploy()
await l1Multicall.deployed()

Expand All @@ -397,7 +398,6 @@ export const deployL1TokenBridgeCreator = async (
l2CustomGatewayAddressOnL1.address,
l2WethGatewayAddressOnL1.address,
l2WethAddressOnL1.address,
l2MulticallAddressOnL1.address,
l1WethAddress,
l1Multicall.address,
deployFactoryGasParams.gasLimit
Expand Down Expand Up @@ -509,10 +509,7 @@ export const deployL1TokenBridgeCreator = async (
l2MulticallAddressOnL1.address
)

await l1Verifier.verifyWithAddress(
'l1Multicall',
l1Multicall.address
)
await l1Verifier.verifyWithAddress('l1Multicall', l1Multicall.address)

await new Promise(resolve => setTimeout(resolve, 2000))
console.log('\n\n Contract verification done \n\n')
Expand Down

0 comments on commit b5b64b0

Please sign in to comment.