Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add idle test + make e2e endpoints configurable #350

Merged
merged 2 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading