Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Feature request: Support fetching the transaction ID for not-yet-mined transactions #652

Closed
Arachnid opened this issue Nov 1, 2017 · 2 comments · May be fixed by sgryphon/truffle#1
Closed

Comments

@Arachnid
Copy link

Arachnid commented Nov 1, 2017

At present, the promise returned from contract functions only resolves when the transaction is mined. To provide users with more insight into transaction processing, it'd be ideal if it were possible to fetch the transaction ID as soon as it's submitted, instead of only when it's mined.

It's possible to explicitly call sendTransaction on a contract method, which resolves as soon as the transaction is submitted, but no functionality is exposed to then provide a promise that resolves when the transaction is later mined.

@cgewecke
Copy link
Contributor

cgewecke commented May 16, 2018

This feature is included in an upgrade to web3 1.0 now available as an experimental nightly build here: darq-truffle@next.

$ npm install -g darq-truffle@next
$ darq-truffle test # Example command

Usage docs here

@gnidan
Copy link
Contributor

gnidan commented Jan 16, 2019

This should be fixed in v5 via the contract.myFunction().on('transactionHash', () => { ... }) mechanism. Thanks for raising the issue!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants