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
var web3 = new Web3(new Web3.providers.HttpProvider(NODE_URL));
Then contract method sending:
let paramObj = { from: <addr>, gas: 20000, gasPrice: 0 };
var contract = new web3.eth.Contract(<abi>, <address>);
var invokeTx = contract.methods[methodName](...methodParams);
invokeTx.send(paramObj)
.on('transactionHash', (hash) => {
console.log("ON transactionHash:", hash); })
.on('confirmation', (confirmationNumber, receipt) => {
console.log("ON confirmation:", confirmationNumber, receipt); })
.then(response => {
// NEVER GET HERE !!!
})
.catch(err => {
console.log(err);
// GOT error after some period of time:
// Timeout exceeded during the transaction confirmation process. Be aware the transaction could still get confirmed!
}) ;
Expected behavior
Contract method invocation and getting the response in Web3js client code.
Actual behavior
Just one "ON confirmation" emit, web3.eth.transactionPollingTimeout delay and error:
Timeout exceeded during the transaction confirmation process. Be aware the transaction could still get confirmed!
Assumptions
In web3.js/packages/web3-core-method/src/observers/TransactionObserver.js:153:
The code below will work if you configure the transactionConfirmationBlocks to one. We have an open issue regarding the block number with an Http connection here. I will fix and release it asap.
Description
I got
web3
instance for http provider:Then contract method sending:
Expected behavior
Contract method invocation and getting the response in Web3js client code.
Actual behavior
Just one "ON confirmation" emit,
web3.eth.transactionPollingTimeout
delay and error:Assumptions
In
web3.js/packages/web3-core-method/src/observers/TransactionObserver.js:153
:It looks like
increaseBlockNumber(blockNumber)
funciton (line 283) asserts thatblockNumber
is a string in 16 radix, but it parsed to number in
outputBlockFormatter
(web3.js/packages/web3-core-helpers/src/Formatters.js:305
):Versions
The text was updated successfully, but these errors were encountered: