Hi I am getting error
Error: [ethjs-query] while formatting inputs '[{"0":false}]' for method 'getTransactionReceipt' error: Error: [ethjs-format] hex string '[object Object]' must be an alphanumeric 66 utf8 byte hex (chars: a-fA-F) string, is 0 bytes
at ethjs.min.js:11
at new Promise (<anonymous>)
at i.getTransactionReceipt (ethjs.min.js:11)
at i.e.<computed> [as getTransactionReceipt] (ethjs.min.js:11)
at ethjs.min.js:11
Im calling the smartcontract invest function :
function invest()public payable onlyAmount() firstExist returns(bool){
// balances[msg.sender]=msg.value;
invested[msg.sender]+= msg.value;
isInvested[msg.sender]=true;
users[msg.sender].creationTime=now;
commission=(msg.value.mul(10)).div(100);
forCreators(commission);
emit Invest(msg.sender,msg.value);
return true;
}
Where As Im calling the function from web3.js like
tokenContract.invest({
from: user_address,
gasLimit: web3.toHex(8000000),
gasPrice: web3.toHex(web3.toWei('10', 'gwei')),
value : web3.toHex( web3.toWei(0.25, 'ether'))
})
.then(txHash => eth.getTransactionSuccess(txHash)
.then(receipt => {
alert("Sigup Has been successful",receipt);
})
)
.catch((err) => {
alert("Error couldnot signUp");
console.log(err);
})
this error is showing on all write functions .. Read is working just fine. I have never encountered this error before. I tried deploying contract on Ropsten and Rinkeby same error. And these contract functions are working just fine on etherscan and remix. In web3js Even Metamask doesnt appears for transactions. What might be the issue?