Skip to content

Commit

Permalink
Merge branch 'develop' into gligneul/program-gas-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gzeoneth authored Sep 30, 2024
2 parents c35cdf1 + 10ba0af commit 6740300
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Additional Use Grant: You may use the Licensed Work in a production environment
Expansion Program Term of Use](https://docs.arbitrum.foundation/assets/files/Arbitrum%20Expansion%20Program%20Jan182024-4f08b0c2cb476a55dc153380fa3e64b0.pdf). For purposes of this
Additional Use Grant, the "Covered Arbitrum Chains" are
(a) Arbitrum One (chainid:42161), Arbitrum Nova (chainid:42170),
rbitrum Rinkeby testnet/Rinkarby (chainid:421611),Arbitrum Nitro
Arbitrum Rinkeby testnet/Rinkarby (chainid:421611),Arbitrum Nitro
Goerli testnet (chainid:421613), and Arbitrum Sepolia Testnet
(chainid:421614); (b) any future blockchains authorized to be
designated as Covered Arbitrum Chains by the decentralized autonomous
Expand Down
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 6740300

Please sign in to comment.