A browser-only React + Vite template for sending one ERC20 token to many recipients with Uniswap Permit2.
The app lets a sender choose any ERC20 token on the configured network, approve Permit2 once for that token, paste or upload recipient rows, and send the batch with one Permit2 signature plus one transaction.
- Any ERC20 token address can be entered in the UI.
- Recipient rows use a strict
address,amountformat with no header row. - Duplicate recipients are detected before sending.
- Balance, allowance, gas, and block-limit checks run before broadcast.
- No backend, no server-held keys, and no token-specific config.
- Ready for Vercel or Cloudflare Workers static-assets deployment.
This template is not audited. It is useful starter code, but you should review and test it before using valuable tokens. The setup step grants Permit2 a high allowance for the selected token. Users can revoke that allowance later with a wallet or allowance management tool.
- Connect an injected wallet such as MetaMask.
- Enter an ERC20 token contract address on the selected network.
- The app reads token metadata, balance, and the wallet's Permit2 allowance.
- Approve Permit2 once with standard ERC20
approve. - Paste or upload recipient rows.
- Sign the Permit2 batch transfer and submit one transaction.
Private keys stay in the wallet. The app runs fully in the browser.
Use one recipient per line with two comma-separated values: recipient address, then token amount.
0x0000000000000000000000000000000000000000,100
0x1111111111111111111111111111111111111111,250.5Do not include a header row. Every non-empty row is parsed as a recipient row.
The template uses the canonical Uniswap Permit2 contract:
0x000000000022D473030F116dDEE9F6B43aC78BA3
Generic ERC20 tokens cannot be assumed to support EIP-2612 permit, so setup
uses a normal ERC20 approve(Permit2, max) transaction. The actual multisend
uses Permit2 permitTransferFrom: the sender signs typed data for the batch,
then submits one transaction that transfers every row.
npm ci
cp .env.example .env
npm run devThe default app runs on Ethereum Mainnet. Change VITE_CHAIN in .env to use
another configured network.
src/config.js defines supported networks. The template currently includes:
mainnetsepolia
To add another EVM network, add a chain entry with:
keychainIdhexChainIdnamenativeexplorer
npm test
npm run build
npm run audit:prodnpm run audit:prod audits production dependencies only. Development tooling
may report transitive audit warnings depending on the npm registry state.
Vercel works with the included vercel.json.
For Cloudflare Workers static assets:
npm run build
npm run deploySet VITE_CHAIN in your hosting provider's environment variables if you do not
want the default mainnet setting.
Do not commit:
.envfiles- private keys or API secrets
node_modulesdist.wrangler
MIT