A TypeScript toolkit for Ethereum and EVM-compatible chains, featuring utilities for ERC20 token management, Uniswap interactions, and wallet operations.
- Token Approval Tool: Easily approve unlimited token spending for Uniswap and other protocols
- Multi-Mnemonic Support: Configure and manage wallets from multiple mnemonic phrases
- Multi-wallet Support: Derive multiple wallets from each mnemonic
- TypeScript: Fully typed for better development experience
- Modular Architecture: Easy to extend with additional tools and utilities
- Clone the repository:
git clone <your-repo-url>
cd evm_tools- Install dependencies using pnpm:
pnpm install- Set up your environment variables:
cp .env.example .env- Edit
.envand add your configuration:
ALCHEMY_API_KEY=your_alchemy_api_key_here
MNEMONIC_1=your first twelve word mnemonic phrase goes here
MNEMONIC_2=your second twelve word mnemonic phrase goes here
WALLETS_PER_MNEMONIC=1The approval tool allows you to pre-approve tokens (USDC, VULT, WETH) for both the Uniswap V3 Position Manager and Swap Router across multiple wallets from multiple mnemonics. This is useful for setting up sniper bots or preparing wallets for trading.
pnpm approveThis command will:
- Connect to Ethereum Mainnet via Alchemy
- Load all configured mnemonics (MNEMONIC_1, MNEMONIC_2, etc.)
- Derive wallets from each mnemonic (configurable via
WALLETS_PER_MNEMONIC) - Display wallet addresses and balances grouped by mnemonic
- Interactive token selection - choose which tokens to approve (USDC, VULT, WETH)
- Show approval configuration with selected tokens
- Ask for final confirmation - review everything before proceeding
- Approve unlimited token spending for:
- Uniswap V3 Position Manager
- Uniswap V3 Swap Router
- Smart skip: Already approved tokens are automatically skipped (no unnecessary transactions)
- Wait for transaction confirmations
- Display a detailed summary showing successful, skipped, and failed approvals
Key Features:
- Interactive Token Selection: Choose which tokens to approve each time you run the script (all selected by default)
- Interactive Confirmation: The tool shows you all wallet addresses with their ETH balances and asks you to confirm before proceeding
- Smart Approval Checking: Automatically detects existing unlimited approvals and skips them to save gas fees
- Comprehensive Coverage: Approves for both Position Manager (for liquidity) and Swap Router (for swaps)
- WETH Support: Included for scenarios involving wrapped ETH
Example: With 3 mnemonics, WALLETS_PER_MNEMONIC=1, and all 3 tokens selected, you'll have 3 total wallets. Each wallet will process up to 6 approvals (3 tokens Γ 2 contracts = 6 total).
======================================================================
WALLET INFORMATION
======================================================================
Wallet 1 (MNEMONIC_1, Derivation Index: 0):
Address: 0x1234...5678
Balance: 0.125000 ETH
Wallet 2 (MNEMONIC_2, Derivation Index: 0):
Address: 0xabcd...ef01
Balance: 0.089000 ETH
Wallet 3 (MNEMONIC_3, Derivation Index: 0):
Address: 0x9876...4321
Balance: 0.210000 ETH
======================================================================
======================================================================
π Select tokens to approve:
? Select tokens to approve (space to select/deselect, enter to confirm) βΊ
β USDC
β VULT
β WETH
β Selected tokens: USDC, VULT, WETH
π Approval Configuration:
- Tokens: USDC, VULT, WETH
- Spenders:
β’ Uniswap V3 Position Manager: 0xC36442...11FE88
β’ Uniswap V3 Swap Router: 0xE59242...861564
- Approval Amount: Unlimited (max uint256)
- Total approvals per wallet: 6
β οΈ WARNING: This will send transactions from your wallets.
Make sure you have sufficient ETH for gas fees.
? Do you want to proceed with the approval process? βΊ (y/N)
======================================================================
APPROVING FOR: UNISWAP V3 POSITION MANAGER
======================================================================
[Wallet 1/3] 0x1234567890abcdef1234567890abcdef12345678
β Approving USDC...
β USDC already has unlimited approval - skipping
β Approving VULT...
β³ Transaction sent: 0xabc...def
β VULT approval confirmed (Block: 19123456)
...
======================================================================
APPROVAL SUMMARY
======================================================================
Total approvals processed: 12
β Successful: 6
β Already Approved (Skipped): 5
β Failed: 1
======================================================================
Compile TypeScript to JavaScript:
pnpm buildevm_tools/
βββ src/
β βββ config/
β β βββ contracts.ts # Contract addresses and ABIs
β βββ utils/
β β βββ wallet.ts # Wallet derivation utilities
β β βββ provider.ts # Alchemy provider setup
β βββ tools/
β β βββ approve.ts # Token approval functionality
β βββ scripts/
β β βββ approve-uniswap.ts # Executable approval script
β βββ index.ts # Main entry point & exports
βββ .env.example # Example environment variables
βββ .gitignore # Git ignore rules
βββ package.json # Project dependencies
βββ tsconfig.json # TypeScript configuration
βββ README.md # This file
The following contracts are pre-configured in src/config/contracts.ts:
- USDC:
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 - VULT:
0xb788144DF611029C60b859DF47e79B7726C4DEBa - WETH:
0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 - Uniswap V3 Position Manager:
0xC36442b4a4522E871399CD717aBDD847Ab11FE88 - Uniswap V3 Swap Router:
0xE592427A0AEce92De3Edee1F18E0157C05861564 - USDC/VULT Pair:
0x6Df52cC6E2E6f6531E4ceB4b083CF49864A89020
ALCHEMY_API_KEY(required): Your Alchemy API key for Ethereum MainnetMNEMONIC_1,MNEMONIC_2, etc. (required): Your 12 or 24-word mnemonic phrases- Add as many as you need, numbered sequentially starting from 1
- The tool will automatically detect all mnemonics (stops at the first gap)
WALLETS_PER_MNEMONIC(optional): Number of wallets to derive from each mnemonic (default: 1)
Example 1: Two separate wallets (one from each mnemonic)
MNEMONIC_1=first mnemonic phrase here...
MNEMONIC_2=second mnemonic phrase here...
WALLETS_PER_MNEMONIC=1Result: 2 total wallets
Example 2: Four wallets total (two from each of three mnemonics)
MNEMONIC_1=first mnemonic phrase here...
MNEMONIC_2=second mnemonic phrase here...
WALLETS_PER_MNEMONIC=2Result: 4 total wallets
Example 3: Single mnemonic with multiple wallets
MNEMONIC_1=your mnemonic phrase here...
WALLETS_PER_MNEMONIC=5Result: 5 total wallets (all from the same mnemonic)
This repository is designed to be easily extensible. Here's how to add new tools:
- Create a new file in
src/tools/your-tool.ts - Implement your tool's functionality
- Export it from
src/index.ts - Create a script in
src/scripts/if needed - Add a new script command to
package.json
Example structure for a new tool:
// src/tools/swap.ts
import { Wallet, Contract } from 'ethers';
export async function swapTokens(
wallet: Wallet,
tokenIn: string,
tokenOut: string,
amountIn: bigint
) {
// Your implementation here
}Edit src/config/contracts.ts to add new contract addresses:
export const CONTRACTS = {
// Existing contracts...
YOUR_TOKEN: '0x...',
YOUR_CONTRACT: '0x...',
} as const;- Never commit your
.envfile - it contains sensitive information - Keep your mnemonic phrase secure - anyone with access can control your wallets
- Test with small amounts first - especially when trying new features
- Review transactions - always verify what you're approving or signing
- Node.js >= 18
- pnpm >= 8
- Alchemy API key
- ETH for gas fees in your wallets
Make sure you've created a .env file and added your Alchemy API key.
Add at least one mnemonic to your .env file as MNEMONIC_1. Make sure it's a valid 12 or 24-word phrase. You can add more as MNEMONIC_2, etc.
Ensure your wallets have enough ETH to cover gas fees for the approval transactions.
Check your WALLETS_PER_MNEMONIC setting. The total number of wallets = (number of mnemonics) Γ (wallets per mnemonic).
MIT
This software is provided "as is" without warranty of any kind. Use at your own risk. Always verify transactions before confirming them on the blockchain.