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
const contract = new web3.eth.Contract(abi, address);
const batch = new web3.BatchRequest();
function callback(err,res){
console.log(err,res)
}
batch.add(contract.methods.balance(address).call.request({from: '0x0000000000000000000000000000000000000000'}, callback));
batch.execute();
work fine with web3.eth.getBalance.request( "0x0000000000000000000000000000000000000000", "latest", callback )
Expected behavior
execute batch and log callback properly
Actual behavior
throw Error
Steps to reproduce the behavior
[First step]
[Second step]
[and so on...]
Error Logs
Error: Given input "function callback(err,res){
console.log(err,res)
}" is not a number.
at Object.numberToHex (node_modules/web3-utils/dist/web3-utils.cjs.js:114:11)
at inputBlockNumberFormatter (node_modules/web3-core-helpers/dist/web3-core-helpers.cjs.js:37:16)
at Object.inputDefaultBlockNumberFormatter (node_modules/web3-core-helpers/dist/web3-core-helpers.cjs.js:25:10)
at CallContractMethod.beforeExecution (node_modules/web3-core-method/dist/web3-core-method.cjs.js:1217:44)
work fine with
web3.eth.getBalance.request( "0x0000000000000000000000000000000000000000", "latest", callback )
Expected behavior
execute batch and log callback properly
Actual behavior
throw Error
Steps to reproduce the behavior
Error Logs
Versions
[NPM@6.4.1, Node@v8.12.0, Web3.js@1.0.0-beta.41, OS:macOs@10.14.2]
The text was updated successfully, but these errors were encountered: