diff --git a/contracts/scripts/e2e/utils.ts b/contracts/scripts/e2e/utils.ts index bb2cf1d76..42aaac8f2 100644 --- a/contracts/scripts/e2e/utils.ts +++ b/contracts/scripts/e2e/utils.ts @@ -2,12 +2,12 @@ import * as addresses from "./addresses"; import { Wallet, BigNumber, Contract } from "ethers"; import { ethers } from "hardhat"; -const l2Provider = new ethers.providers.JsonRpcProvider( - "http://localhost:4011", +const l1Provider = new ethers.providers.JsonRpcProvider( + process.env.L2_RPC_URL || "http://localhost:8545", ); -const l1Provider = new ethers.providers.JsonRpcProvider( - "http://localhost:8545", +const l2Provider = new ethers.providers.JsonRpcProvider( + process.env.L1_RPC_URL || "http://localhost:4011", ); const l1BridgeAddress = process.env.L1STANDARD_BRIDGE_ADDR || "invalid address"; @@ -15,20 +15,24 @@ const rollupAddress = process.env.ROLLUP_ADDR || "invalid address"; export async function getSignersAndContracts() { const l1Bridger = new ethers.Wallet( - "0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6", + process.env.BRIDGER_PRIVATE_KEY || + "0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6", l1Provider, ); const l2Bridger = new ethers.Wallet( - "0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6", + process.env.BRIDGER_PRIVATE_KEY || + "0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6", l2Provider, ); const l1Relayer = new ethers.Wallet( - "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a", + process.env.BRIDGER_PRIVATE_KEY || + "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a", l1Provider, ); const l2Relayer = new ethers.Wallet( - "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a", + process.env.BRIDGER_PRIVATE_KEY || + "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a", l2Provider, ); diff --git a/sbin/run_e2e_tests.sh b/sbin/run_e2e_tests.sh index c7f4f1f2c..39e1e09ad 100755 --- a/sbin/run_e2e_tests.sh +++ b/sbin/run_e2e_tests.sh @@ -102,6 +102,10 @@ erc20) npx hardhat run scripts/e2e/bridge/test_standard_bridge_erc20.ts RESULT=$? ;; +idle) + while true; do sleep 86400; done + RESULT=$? + ;; *) echo "unknown test" RESULT=1