A comprehensive test suite for testing Gelato middleware endpoints including Smart Wallets, Relay, and Bundler functionality.
Configure the target chain in chains/index.ts:
export const chain = megaETHMainnet; // Change to your desired chainAvailable chains are defined in chains/customChains.ts. You can add custom chains there or modify existing ones.
Ensure your .env file contains:
RPC_URL- RPC endpoint for the chainTESTNET_API_KEYorMAINNET_API_KEY- Gelato API keyPRIVATE_KEY- Private key for signing transactions
Edit the include array in run-all.ts to specify which scripts to run:
const include: string[] = [
"smartwallet:gelato",
"relay:sponsored",
"bundler:estimate:gas-tank",
];Then run:
yarn run-all
# or
npx tsx run-all.tsSmart Wallet:
smartwallet:gelatosmartwallet:kernel:4337smartwallet:kernel:4337+7702
Relay:
relay:sponsoredrelay:sponsored:erc2771relay:sponsored:erc2771:signaturerelay:sponsored:erc2771:concurrentrelay:syncfeerelay:syncfee:erc2771
Bundler:
bundler:estimate:gas-tankbundler:estimate:nativebundler:estimate:erc20bundler:estimate:sponsoredbundler:send:gas-tankbundler:send:nativebundler:send:erc20bundler:send:sponsored
All available script IDs are defined in scripts.config.ts.
Scripts run sequentially - each script must complete before the next one starts. If a script fails, execution stops.