Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] upgrade web3 #124

Closed
wants to merge 17 commits into from
Closed

[WIP] upgrade web3 #124

wants to merge 17 commits into from

Conversation

jellegerbrandy
Copy link
Contributor

@jellegerbrandy jellegerbrandy commented Mar 4, 2019

This PR is failing because of this issue in ganache: trufflesuite/ganache#339

@jellegerbrandy jellegerbrandy mentioned this pull request Mar 4, 2019
tibetsprague
tibetsprague previously approved these changes Mar 11, 2019
@jellegerbrandy jellegerbrandy changed the title upgrade web3 [WIP] upgrade web3 Mar 12, 2019
@ellis2323
Copy link

ellis2323 commented Apr 17, 2019

Is there any progress ? I tried too but without success.

In my case, the sendTransaction is blocking.

let provider = ganache.provider()
web3 = new Web3(provider)
await web3.eth.sendTransaction({ from: ACCOUNTS[0], to: ACCOUNTS[1], value: 1 })

With this version:

    web3.eth.sendTransaction({ from: ACCOUNTS[0], to: ACCOUNTS[1], value: 1 })
      .once('transactionHash', function (hash) { console.log('transactionHash') })
      .once('receipt', function (receipt) { console.log('receipt') })
      .on('confirmation', function (confNumber, receipt) { console.log('confirmation') })
      .on('error', function (error) { console.log('error', error) })
      .then(function (receipt) {
        // will be fired once the receipt is mined
        console.log('mined', receipt)
      })

I see these messages:

transactionHash
confirmation
confirmation

So, to have the same behaviour, i could define options in provider:

let web3 = new Web3(provider, null, { transactionConfirmationBlocks: 1 })

@jellegerbrandy
Copy link
Contributor Author

obsolete, will create a new one

@jellegerbrandy jellegerbrandy deleted the 115-upgrade-web3 branch October 9, 2019 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants