Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Hot answers tagged

1 vote
Accepted

swapTokensForExactETH, execution reverted: null

You forgot to convert the amounts from ether to wei. https://web3js.readthedocs.io/en/v1.2.11/web3-utils.html#towei Amounts sent in ethereum contracts are uint256, you must convert your floating point ...
user avatar
  • 1,546
1 vote

How to check if a transaction is pending?

This function returns all pending transactions in a node's mempool, but it doesn't work in Web3.js. To read a node's mempool using Web3.js, you need to add a custom call - //add txpool support web3....
user avatar
  • 1,546
1 vote

connecting geth to web3.js 1.0 via websockets or HTTP

If anyone is using the Geth 1.10.17-stable-25c9b49f, command line options have changed a bit. To enable the HTTP server, we now use the --http flag. And using the following code will achieve the same ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible