Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deployer script to provide multicall #48

Merged
merged 1 commit into from
Oct 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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