This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Documentation: contract.deploy.estimateGas arguments and return type incorrect #2543
Labels
Bug
Addressing a bug
Description
If you want to estimate the gas of an contract you need to pass an callback to the function according to the documentation: https://web3js.readthedocs.io/en/1.0/web3-eth-contract.html#deploy.
But this is not working. The function returns a promise instead.
Expected behavior
Documentation says:
Actual behavior
estimateGas
returns a promise and doesn't accept a callback. The following code is working:Error Logs
Uncaught (in promise) DOMException: Failed to execute 'postMessage' on 'Window': (e, g) => console.log (g) could not be cloned.
Versions
web3.beta.46
Chromium
The text was updated successfully, but these errors were encountered: