Skip to content

Commit

Permalink
fix: orbit e2e (#257)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Buckland <[email protected]>
  • Loading branch information
gzeoneth and yahgwai committed Sep 30, 2024
1 parent a8f0c9f commit 10ba0af
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions test/e2e/orbitChain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ import {
import { getLocalNetworks } from '../../scripts/testSetup'
import { applyAlias } from '../contract/utils'
import { BigNumber, ContractTransaction, Wallet, ethers } from 'ethers'
import {
l1Networks,
l2Networks,
} from '@arbitrum/sdk/dist/lib/dataEntities/networks'

const LOCALHOST_L2_RPC = 'http://127.0.0.1:8547'
const LOCALHOST_L3_RPC = 'http://127.0.0.1:3347'
Expand Down Expand Up @@ -69,10 +73,18 @@ describe('Orbit Chain', () => {
l2WethGateway: '',
},
}
addCustomNetwork({
customL1Network: l1Network,
customL2Network: l2Network,
})
if (!l2Networks[l2Network.chainID.toString()]) {
if (!l1Networks[l2Network.chainID.toString()]) {
addCustomNetwork({
customL1Network: l1Network,
customL2Network: l2Network,
})
} else {
addCustomNetwork({
customL2Network: l2Network,
})
}
}

l1Provider = new JsonRpcProvider(LOCALHOST_L2_RPC)
l2Provider = new JsonRpcProvider(LOCALHOST_L3_RPC)
Expand Down Expand Up @@ -643,7 +655,10 @@ describe('Orbit Chain', () => {

const inbox = l2Network.ethBridge.inbox
const maxFeePerGas = BigNumber.from('100000000') // 0.1 gwei
let fee = await deployHelper.getDeploymentTotalCost(inbox, maxFeePerGas)
let fee = await deployHelper.getDeploymentTotalCost(inbox, maxFeePerGas, {
from: userL1Wallet.address,
gasPrice: maxFeePerGas,
})

if (nativeToken) {
const decimals = await nativeToken.decimals()
Expand Down Expand Up @@ -688,7 +703,6 @@ describe('Orbit Chain', () => {
).wait()
}

// deploy factories
const receipt = await (
await deployHelper
.connect(userL1Wallet)
Expand Down Expand Up @@ -737,7 +751,10 @@ describe('Orbit Chain', () => {

const inbox = l2Network.ethBridge.inbox
const maxFeePerGas = BigNumber.from('100000000') // 0.1 gwei
let fee = await deployHelper.getDeploymentTotalCost(inbox, maxFeePerGas)
let fee = await deployHelper.getDeploymentTotalCost(inbox, maxFeePerGas, {
from: userL1Wallet.address,
gasPrice: maxFeePerGas,
})
if (nativeToken) {
const decimals = await nativeToken.decimals()
if (decimals < 18) {
Expand Down

0 comments on commit 10ba0af

Please sign in to comment.