Send tokens to multiple addresses in optimized transactions. Supports batch transfers, gas optimization, and balance checking.
Scanned 9/7/2026
Install to Claude Code
npx -y skills add jiayaoqijia/cryptoskill --skill xspoonai-official-wallet-multisend --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Xspoonai Official Wallet Multisend?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/jiayaoqijia-xspoonai-official-wallet-multisend)More formats (shields.io, HTML) on the badges page.
---
name: wallet-multisend
track: web3-core-operations
version: 0.1.0
summary: Batch send tokens to multiple recipients with gas optimization
---
## Description
Send tokens to multiple addresses in optimized transactions. Supports batch transfers, gas optimization, and balance checking.
## Inputs
```json
{
"token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chain": "ethereum",
"sender": "0x1111111254fb6c44bac0bed2854e76f90643097d",
"recipients": [
{
"address": "0x2222222254fb6c44bac0bed2854e76f90643097d",
"amount": "100.50"
},
{
"address": "0x3333333254fb6c44bac0bed2854e76f90643097d",
"amount": "250.75"
}
]
}
```
**Response:**
```json
{
"success": true,
"multisend": {
"token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chain": "ethereum",
"sender": "0x1111111254fb6c44bac0bed2854e76f90643097d",
"decimals": 6,
"transfers": [
{
"to": "0x2222222254Fb6c44BAC0BeD2854e76F90643097d",
"amount": "100.500000",
"amount_wei": "100500000",
"calldata": "0xa9059cbb0000000000000000000000002222222254Fb6c44BAC0BeD2854e76F90643097d0000000000000000000000000000000000000000000000000000000005fd8220"
},
{
"to": "0x3333333254fB6C44bac0BED2854E76F90643097D",
"amount": "250.750000",
"amount_wei": "250750000",
"calldata": "0xa9059cbb0000000000000000000000003333333254fB6C44bac0BED2854E76F90643097D000000000000000000000000000000000000000000000000000000000ef22430"
}
],
"success_count": 2,
"failed_count": 0,
"total_amount": "351.250000",
"total_amount_wei": "351250000",
"current_block": 24399021,
"gas_estimate": "131000",
"gas_price_gwei": "1.26",
"estimated_cost_eth": "0.000166",
"sender_balance_wei": "0",
"sender_balance": "0.000000"
}
}
```
## Transaction Format
### ERC20 Transfer Calldata
All transfers use the standard ERC20 transfer function signature:
```
Function: transfer(address to, uint256 amount)
Selector: 0xa9059cbb
Encoding:
- 0xa9059cbb (4 bytes) - function selector
- recipient_address (32 bytes) - padded with zeros on left
- amount_wei (32 bytes) - transfer amount in wei
```
**Example Parsing:**
```
Calldata: 0xa9059cbb0000000000000000000000002222222254Fb6c44BAC0BeD2854e76F90643097d0000000000000000000000000000000000000000000000000000000005fd8220
Decoded:
- Function: transfer (a9059cbb)
- To: 0x2222222254Fb6c44BAC0BeD2854e76F90643097d
- Amount: 100500000 wei (100.50 USDC with 6 decimals)
```
## Gas Estimation Formula
For batch transfers, gas is calculated as:
```
Base: 21,000 (transaction base)
First transfer: 65,000
Additional per transfer: 45,000
Formula: 21000 + 65000 + (45000 * (n - 1))
Examples:
- 1 transfer: 86,000 gas
- 2 transfers: 131,000 gas
- 3 transfers: 176,000 gas
- 5 transfers: 266,000 gas
```
## Real-World Data
### Test Case 1: Ethereum USDC Batch (2 Recipients)
**Input:**
- Token: USDC (0xA0b8...)
- Chain: Ethereum
- Recipients: 100.50 + 250.75 USDC
**Real Results:**
- Block: 24399021
- Gas estimate: 131,000
- Gas price: 1.26 gwei
- Estimated cost: 0.000166 ETH (~$0.26 at $1500/ETH)
- Calldata valid: ✓
### Test Case 2: Arbitrum USDC Batch (2 Recipients)
**Input:**
- Token: USDC (0xFF97...)
- Chain: Arbitrum
- Recipients: 100 + 200 USDC
**Real Results:**
- Block: 429292139
- Gas estimate: 131,000
- Gas price: 0.02 gwei (100x cheaper than Ethereum)
- Estimated cost: 0.000003 ETH (~$0.0045)
- Calldata valid: ✓
## Error Handling
### Error Codes
| Status | Error Type | Cause | Recovery |
|--------|-----------|-------|----------|
| 400 | invalid_token | Token address format invalid | Use valid 0x... address |
| 400 | validation_error | Recipients invalid or empty | Check recipient addresses and amounts |
| 400 | missing_parameter | Required field absent | Provide token and recipients array |
| 400 | unsupported_chain | Chain not in supported list | Use: ethereum, arbitrum, optimism, base, bsc |
| 500 | rpc_error | RPC connection failed | Check network connectivity |
| 500 | invalid_json | Input not valid JSON | Verify JSON format |
### Example Errors
**Invalid recipients:**
```json
{
"success": false,
"error": "validation_error",
"message": "batch size limited to 100 recipients"
}
```
**Invalid token address:**
```json
{
"success": false,
"error": "invalid_token",
"message": "Token address is invalid"
}
```
**Unsupported chain:**
```json
{
"success": false,
"error": "unsupported_chain",
"message": "Unsupported chain: solana"
}
```
## Token Decimals
The skill automatically retrieves token decimals from the contract. Common values:
| Token | Decimals | 1 Token = |
|-------|----------|-----------|
| USDC | 6 | 1,000,000 wei |
| USDT | 6 | 1,000,000 wei |
| DAI | 18 | 1,000,000,000,000,000,000 wei |
| WMATIC | 18 | 1,000,000,000,000,000,000 wei |
## Supported Chains
| Chain | Network ID | RPC Provider | Block Time | Token |
|-------|-----------|-------------|-----------|-------|
| Ethereum | 1 | Blast | 13s | USDC (0xA0b8...) |
| Arbitrum | 42161 | Blast | 0.25s | USDC (0xFF97...) |
| Optimism | 10 | Blast | 2s | USDC (0x0b2c...) |
| Base | 8453 | Blast | 2s | USDC (0x833...) |
| BSC | 56 | Blast | 3s | USDC (0x8AC7...) |
## Features
### Implemented
✅ Real ERC20 transfer calldata encoding
✅ Multi-chain support (5 EVM chains)
✅ Token decimal detection
✅ Gas price queries from RPC
✅ Sender balance checking
✅ Batch validation (max 100 recipients)
✅ Real block information
✅ Proper amount wei conversion
### Not Implemented
❌ Transaction signing (returns calldata only)
❌ Transaction submission/broadcasting
❌ Nonce management
❌ Slippage protection
❌ Multisig contract integration
## Performance
**Real-World Measurements:**
- **Query latency**: 200-500ms per request
- **Gas estimation accuracy**: ±5% variance
- **Balance checking**: 100-300ms per account
- **Batch limit**: 100 recipients per request
- **Supported decimals**: 1-18
## Dependencies
**Python Packages:**
- `web3>=6.0.0` - Transaction building and encoding
- `eth-account>=0.9.0` - Implicit via web3
- `requests>=2.28.0` - HTTP library
**No API Keys Required** - All RPC providers are free public endpoints
## Limitations
1. **No Signing** - Returns calldata only, doesn't sign transactions
2. **No Broadcasting** - Doesn't submit transactions to network
3. **No Nonce Handling** - Sender must manage nonce manually
4. **Batch Only** - Multiple recipients per transaction (not single transfers)
5. **RPC-Only** - No fallback to block explorers
## Future Enhancements
- [ ] Transaction signing integration
- [ ] Broadcast to network option
- [ ] Nonce auto-management
- [ ] Multicall contract support
- [ ] MEV protection strategies
- [ ] Swap aggregation before multisend
## References
- [ERC20 Standard](https://eips.ethereum.org/EIPS/eip-20)
- [Solidity ABI Encoding](https://docs.soliditylang.org/en/latest/abi-spec.html)
- [web3.py Documentation](https://web3py.readthedocs.io/)
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!