Skip to content

Commit

Permalink
fix: format
Browse files Browse the repository at this point in the history
  • Loading branch information
gzeoneth committed Feb 5, 2024
1 parent 96dc0f0 commit 3cf7433
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions scripts/atomicTokenBridgeDeployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -567,15 +567,21 @@ export const registerGateway = async (
tokens: string[],
gateways: string[]
) => {
const l2GatewayRouter = await L1GatewayRouter__factory.connect(gatewayRouter, l1Executor).counterpartGateway()
if (await l2Provider.getCode(l2GatewayRouter) == '0x') {
const l2GatewayRouter = await L1GatewayRouter__factory.connect(
gatewayRouter,
l1Executor
).counterpartGateway()
if ((await l2Provider.getCode(l2GatewayRouter)) == '0x') {
throw new Error('L2GatewayRouter not yet deployed')
}
const l1GatewayRouter = await L2GatewayRouter__factory.connect(l2GatewayRouter, l2Provider).counterpartGateway()
const l1GatewayRouter = await L2GatewayRouter__factory.connect(
l2GatewayRouter,
l2Provider
).counterpartGateway()
if (l1GatewayRouter != gatewayRouter) {
throw new Error('L2GatewayRouter not properly initialized')
}

const executorAddress = await l1Executor.getAddress()

const buildCall = (params: OmitTyped<L1ToL2MessageGasParams, 'deposit'>) => {
Expand Down

0 comments on commit 3cf7433

Please sign in to comment.