Skip to content

Commit

Permalink
add idle test + make e2e endpoints configurable (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
siosw authored Mar 18, 2024
1 parent c2a7ccf commit c323d1e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
20 changes: 12 additions & 8 deletions contracts/scripts/e2e/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,37 @@ 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";
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,
);

Expand Down
4 changes: 4 additions & 0 deletions sbin/run_e2e_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c323d1e

Please sign in to comment.