You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the documentation web3.Contract methods.myMethod.estimateGas(),
the estimateGas() function, defined in the DeployTransactionResponse interface expects 0 - 3 arguments and returns Promise<number>
Actual behavior
estimateGas() expects 1 - 2 arguments and returns void.
Steps to reproduce the behavior
let deployTx : DeployTransactionResponse = databaseSyncContract.deploy({
data: contractJson.bytecode,
arguments: []
});
let tx : Transaction = {
from: nodemanager.getAccountAddress(),
data: deployTx.encodeABI(),
gas : await deployTx.estimateGas(),
value : 0
};
await deployTx.estimateGas() requires as an argument: An object with the property gas.
This works but doesn't make any sense: await deployTx.estimateGas( { gas : 1000 } )
Incorrect Types Definition
This is the incorrect types definition of DeployTransactionResponse node_modules/web3-eth-contract/types/index.d.ts.
options should be optional. The return type should be number instead of void.
Expected behavior
According to the documentation web3.Contract methods.myMethod.estimateGas(),
the
estimateGas()
function, defined in theDeployTransactionResponse
interface expects 0 - 3 arguments and returnsPromise<number>
Actual behavior
estimateGas()
expects 1 - 2 arguments and returnsvoid
.Steps to reproduce the behavior
await deployTx.estimateGas()
requires as an argument: An object with the propertygas
.This works but doesn't make any sense:
await deployTx.estimateGas( { gas : 1000 } )
Incorrect Types Definition
This is the incorrect types definition of DeployTransactionResponse
node_modules/web3-eth-contract/types/index.d.ts
.options
should be optional. The return type should benumber
instead ofvoid
.Versions
web3 v1.0.0-beta.38
The text was updated successfully, but these errors were encountered: