Skip to content

Commit 68069c2

Browse files
committed
test(e2e): ensure tests run on their valid environment
Signed-off-by: Tomás Migone <[email protected]>
1 parent 88398f3 commit 68069c2

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed

packages/contracts/e2e/deployment/config/l1/graphToken.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isGraphChainId } from '@graphprotocol/sdk'
1+
import { isGraphL2ChainId } from '@graphprotocol/sdk'
22
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'
33
import { expect } from 'chai'
44
import hre from 'hardhat'
@@ -10,7 +10,7 @@ describe('[L1] GraphToken', () => {
1010
let unauthorized: SignerWithAddress
1111

1212
before(async function () {
13-
if (isGraphChainId(graph.chainId)) this.skip()
13+
if (isGraphL2ChainId(graph.chainId)) this.skip()
1414
unauthorized = (await graph.getTestAccounts())[0]
1515
})
1616

packages/contracts/e2e/deployment/config/l2/l2GNS.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'
22
import { expect } from 'chai'
33
import hre from 'hardhat'
4-
import { isGraphL2ChainId } from '@graphprotocol/sdk'
4+
import { isGraphL1ChainId } from '@graphprotocol/sdk'
55

66
describe('[L2] GNS', () => {
77
const graph = hre.graph()
@@ -10,7 +10,7 @@ describe('[L2] GNS', () => {
1010
let unauthorized: SignerWithAddress
1111

1212
before(async function () {
13-
if (isGraphL2ChainId(graph.chainId)) this.skip()
13+
if (isGraphL1ChainId(graph.chainId)) this.skip()
1414
unauthorized = (await graph.getTestAccounts())[0]
1515
})
1616

packages/contracts/e2e/deployment/config/l2/l2Staking.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'
22
import { expect } from 'chai'
33
import hre from 'hardhat'
4-
import { isGraphL2ChainId } from '@graphprotocol/sdk'
4+
import { isGraphL1ChainId } from '@graphprotocol/sdk'
55

66
describe('[L2] Staking', () => {
77
const graph = hre.graph()
@@ -10,7 +10,7 @@ describe('[L2] Staking', () => {
1010
let unauthorized: SignerWithAddress
1111

1212
before(async function () {
13-
if (isGraphL2ChainId(graph.chainId)) this.skip()
13+
if (isGraphL1ChainId(graph.chainId)) this.skip()
1414
unauthorized = (await graph.getTestAccounts())[0]
1515
})
1616

packages/sdk/src/deployments/network/actions/bridge-config.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@ export const configureL1Bridge: GraphNetworkAction<{
2222
chainId: number
2323
},
2424
): Promise<void> => {
25-
const { l2GRTAddress, l2GRTGatewayAddress, l2GNSAddress, l2StakingAddress, arbAddressBookPath, chainId } = args
25+
const {
26+
l2GRTAddress,
27+
l2GRTGatewayAddress,
28+
l2GNSAddress,
29+
l2StakingAddress,
30+
arbAddressBookPath,
31+
chainId,
32+
} = args
2633
console.info(`>>> Setting L1 Bridge Configuration <<<\n`)
2734

2835
const arbAddressBook = new SimpleAddressBook(arbAddressBookPath, chainId)
@@ -83,7 +90,14 @@ export const configureL2Bridge: GraphNetworkAction<{
8390
chainId: number
8491
},
8592
): Promise<void> => {
86-
const { l1GRTAddress, l1GRTGatewayAddress, l1GNSAddress, l1StakingAddress, arbAddressBookPath, chainId } = args
93+
const {
94+
l1GRTAddress,
95+
l1GRTGatewayAddress,
96+
l1GNSAddress,
97+
l1StakingAddress,
98+
arbAddressBookPath,
99+
chainId,
100+
} = args
87101
console.info(`>>> Setting L2 Bridge Configuration <<<\n`)
88102

89103
const arbAddressBook = new SimpleAddressBook(arbAddressBookPath, chainId)

0 commit comments

Comments
 (0)