web3.js icon indicating copy to clipboard operation
web3.js copied to clipboard

Legacy gas fee estimation

Open florianib opened this issue 5 years ago • 4 comments

I am currently testing a created web app which uses web3.js. When I am trying to send a transaction, I receive following warning message: image

Before continuation, I need to manually change the gas fee. Is there a way to use another gas calculation, so that the webapp correctly calculates the fee?

Currently it calculates it way too low.

image

florianib avatar Aug 17 '21 12:08 florianib

Which web application are you using?

luu-alex avatar Aug 17 '21 19:08 luu-alex

It's just a plain HTML page which includes the .js file and calls a contract function:

await window.contract.methods.testFunction().send({ from: account, value: web3.utils.toWei('0.03', "ether") });

The .js file is included like this:

 <script src='./web3.min.js'></script>

florianib avatar Aug 17 '21 20:08 florianib

@0x00xx Please could you share following info:

Steps to reproduce the behavior

  1. [First step]
  2. [Second step]
  3. [and so on...]

Environment

Versions used of: (applicable) Web3.js, npm, Node, OS, device , browser, wallet ..... etc

jdevcs avatar Aug 24 '21 15:08 jdevcs

No 'Steps to reproduce' provided so closing, until.

jdevcs avatar Sep 06 '21 17:09 jdevcs