Batch Transactions
Combine multiple transaction calls into a single on-chain transaction using Tachyon’s multicall feature. Reduce gas costs, improve efficiency, and ensure atomic execution of related operations.
Overview
Batch Transactions allow you to group multiple contract calls into a single transaction using the shouldBatchInMulticall parameter. Tachyon automatically optimizes compatible transactions for gas savings.
How It Works
When you enable batching, Tachyon groups your transaction with other compatible transactions and executes them together using a multicall contract, providing:
- Gas Optimization: Significant savings by reducing per-transaction overhead
- Automatic Grouping: Tachyon intelligently batches compatible transactions
Usage
API
Terminal
curl -X POST "https://api.tachyon.rath.fi/api/submit-tx" \
-H "Content-Type: application/json" \
-H "apikey: YOUR_API_KEY" \
-d '{
"chainId": 8453,
"to": "0x3dbE34f2C21b3B2980d4dc53f3c7E51e39663F49",
"value": "1",
"callData": "0x",
"shouldBatchInMulticall": true,
"gasLimit": "30000",
"label": "Batched Transfer"
}'Use Cases
- DeFi Operations: Approve + swap, multiple token transfers
- NFT Operations: Batch minting, bulk transfers
- Multi-token Actions: Distribute tokens to multiple recipients
- Contract Interactions: Execute multiple contract calls atomically
Benefits
- Gas Savings: Typically 10-20% reduction in gas costs
- Atomic Execution: All operations succeed or fail together
- Simplified Flow: Single transaction for multiple operations
- Automatic Optimization: Tachyon handles the batching logic
Key Parameters
| Parameter | Description |
|---|---|
shouldBatchInMulticall: true | Enable transaction batching |
Same chainId | All batched transactions must be on same network |
Last updated on