When I send a transaction using Truffle's contract wrappers - or using plain web3 sendTransaction() - I get a tx hash back that I can use to confirm the tx has completed. While using batch requests (https://github.com/ethereum/wiki/wiki/JavaScript-API#batch-requests), I'm unable to find a way to get the tx hash of any of the requests in the batch. Is there a way? It doesn't look like batch.execute() returns anything or supports any callbacks - so I'm a bit stuck.

I'm using batch requests to make sure my transactions get sent in a fixed order.


  • Transactions from the same account are always serialized because the nonces have to be consecutive numbers. I've only used batch previously with calls, so I didn't expect hashes in return. – Ismael Nov 3 '17 at 16:32
  • I saw cases where I'd call async functions (without await) in one order and the transactions would get sent in a different order. I'm using truffle contract wrappers to promisify sendTransaction(). I'll try await before the calls to make sure they run in the order I'm specifying. Thanks for your help. – Craig Austin Nov 3 '17 at 17:08
  • I have the same issue, how did you handle it? – Or Bachar Dec 12 '17 at 17:20
  • I didn't find a way to get any tx hashes using batch requests. But as @Ismael says above, the txs do get sent in the expected order after all. – Craig Austin Dec 18 '17 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.