UNPKG

@coinbase/onchaintestkit

Version:

End-to-end testing toolkit for blockchain applications, powered by Playwright

32 lines (31 loc) 1.23 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.metamaskWalletConfig = exports.DEFAULT_SEED_PHRASE = exports.DEFAULT_PASSWORD = void 0; const chains_1 = require("wagmi/chains"); const configBuilder_1 = require("../../../../src/configBuilder"); exports.DEFAULT_PASSWORD = "PASSWORD"; exports.DEFAULT_SEED_PHRASE = process.env.E2E_TEST_SEED_PHRASE; // Configure the test with MetaMask setup without adding network yet const baseConfig = (0, configBuilder_1.configure)() .withLocalNode({ chainId: chains_1.baseSepolia.id, forkUrl: process.env.E2E_TEST_FORK_URL, forkBlockNumber: BigInt(process.env.E2E_TEST_FORK_BLOCK_NUMBER ?? "0"), hardfork: "cancun", }) .withMetaMask() .withSeedPhrase({ seedPhrase: exports.DEFAULT_SEED_PHRASE ?? "", password: exports.DEFAULT_PASSWORD, }) // Add the network with the actual port in a custom setup .withNetwork({ name: "Base Sepolia", chainId: chains_1.baseSepolia.id, symbol: "ETH", // placeholder for the actual rpcUrl, which is auto injected by the node fixture rpcUrl: "http://localhost:8545", }); // Build the config const config = baseConfig.build(); exports.metamaskWalletConfig = config;