This script is designed to run stress tests for the TNOP program on the Biconomy Network. It broadcasts multiple supertransactions and tracks their execution status.
- Node.js v23
- Bun v1.2.5
If you don't have Bun installed, you can install it using one of the following methods:
Using curl:
curl -fsSL https://bun.sh/install | bash
Using npm:
npm install -g bun
Using Homebrew (macOS):
brew tap oven-sh/bun
brew install bun
After installation, verify the version:
bun --version
# Should output: 1.2.5
- Clone the repository:
git clone https://github.com/bcnmy/tnop-script.git
cd tnop-script
- Install dependencies:
bun i
- Create environment file:
cp .env.example .env
- Configure your
.env
file with the following variables:
# Your private key
PRIVATE_KEY=your_private_key_here
# Number of supertransactions to broadcast
STX_COUNT=20
# Chain ID for the network to use (e.g., 11155420 for Op Sepolia)
CHAIN_ID=11155420
The script supports multiple networks through the CHAIN_ID
environment variable. Some common chain IDs:
- Base Sepolia: 84532
- Base Mainnet: 8453
- Ethereum Sepolia: 11155111
- Ethereum Mainnet: 1
Make sure to set the appropriate CHAIN_ID
for your target network.
To run the stress test:
bun run index.ts
- Initializes a smart account using your private key
- Checks the account balance on Base Sepolia
- Broadcasts the specified number of supertransactions
- Monitors the execution status of each transaction
- Reports success/failure for each transaction
The script provides detailed output including:
- EOA (Externally Owned Account) address
- Nexus Account address
- Base Sepolia balance
- Transaction status for each supertransaction
- Batch processing results
- The script handles timeouts gracefully
- Failed transactions are marked as "FAILED"
- Successful transactions are marked as "SUCCESS"
- The script continues processing even if some transactions fail
- Make sure your account has sufficient ETH on Base Sepolia
- The script uses a 3-second timeout for transaction confirmation
- Transactions are processed in batches of 10 for better performance
If you encounter any issues:
- Verify your Node.js version:
node --version
# Should be v23.x.x
- Check your Bun version:
bun --version
# Should be 1.2.5
- Ensure your
.env
file is properly configured - Verify you have sufficient ETH in your account
- Check your internet connection