Files
Andrei A. 390d6ff860 Feat/122 Add TokenBridge e2e tests (#210)
* fix: add mutex in account manager to avoid nonce issue

* fix: optimize global setup

* Limiting number of concurrent traces API requests for the local stack to avoid occasional OOM-s

* Limiting number of verticles for Traces API node

* Add E2E TokenBridge tests

* fixing test and adding concurency

* fixing test and adding concurency

* fixing test and adding concurency

* fixing test and adding concurency

* fixing nonce management

* deploying l2token for the L2 -> L1 test

* adjusting accounts for L2->L1 test

* adjusting l2TestContractAddress

* use nonce management for L1->L2 test

* adjusting the TestERC20 contract and tests

* rebasing with fix/133-improve-e2e-tests-performance

* fix: update jest config to exit even if there are open handles

* Trying out Besu untuned and raising limit per endpoint to 2 for traces

* Trying out Besu untuned and raising limit per endpoint to 2 for traces and Shomei node

* Using besu untuned for arithmetization as well

* Compile once and parallelise setRemoteTokenBridge

* feat: deploy smart contracts from artifacts + change e2e tests setup

* fix: update pnpm

* fix: remove compile contracts gradle task

* fix: remove compileContracts gradle task

* fix: refactor genesis generator dockerfile + downgrade l1-el-node besu version

* fix: move abi from e2e folder to contract folder + refactor contracts deployments scripts

* feat: add deployment script from artifacts for LineaRollupV6

* update pnpm version in get-started.md

* fix: update console log in deployment scripts

* fix: update besu version + fix deployment scripts

* correct addresses

* fix import

* use abi and bytecode for deployments

* use upgradable beacon for BridgedToken ABI deploys

* use saved abi and bytecode for TestERC20 deploy

* correct deployBridgedTokenAndTokenBridge casing

* optimize token bridge e2e calls

* use explicit message event data

* use precomputed nonces for e2e stack

---------

Co-authored-by: VGau <victorien.gauch@consensys.net>
Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
Co-authored-by: Roman <4833306+Filter94@users.noreply.github.com>
Co-authored-by: thedarkjester <grant.southey@consensys.net>
Co-authored-by: The Dark Jester <thedarkjester@users.noreply.github.com>
2024-10-31 18:03:53 +01:00

34 lines
849 B
TypeScript

import { JsonRpcProvider, Wallet } from "ethers";
import yargs from "yargs";
import { hideBin } from "yargs/helpers";
import { sanitizePrivKey } from "../scripts/cli";
const argv = yargs(hideBin(process.argv))
.option("rpc-url", {
describe: "RPC url",
type: "string",
demandOption: true,
})
.option("wallet-priv-key", {
describe: "deployer private key",
type: "string",
demandOption: true,
coerce: sanitizePrivKey("priv-key"),
})
.parseSync();
async function main(args: typeof argv) {
const provider = new JsonRpcProvider(args.rpcUrl);
const wallet = new Wallet(args.walletPrivKey, provider);
const nonce = await wallet.getNonce();
process.env.L1_NONCE = nonce.toString();
process.stdout.write(process.env.L1_NONCE);
}
main(argv).catch((error) => {
console.error(error);
process.exit(1);
});