Batch Transaction
Combine multiple transactions and make them atomic
Introduction
Usage
A. EIP-1193 (Recommended)
import Web3 from 'web3';
// Use the Ethereum provider injected by Blocto app
const txHash = await window.ethereum.request({
method: 'blocto_sendBatchTransaction',
params: [
web3.eth.sendTransaction.request(SOME_REQUEST),
web3.eth.sendTransaction.request(SOME_OTHER_REQUEST)
]
})
console.log(txHash) // ex: 0x12a45b...B. Web3 Batch Request
Example
A. EIP-1193
B. Web3 Batch Request
Last updated
Was this helpful?