I have created a DApp. In all my functions where I have used send() function of web3, I am facing above error.
I have a function in which I used call() and it worked fine but all send() using functions are failing with above error.
I have seen all possible answers online but no help, can someone please help me? I have very quick submission please
Moreover, the read functions are working fine on DAPP, so Im sure contract is initialized correctly and contract functions works fine as well without Dapp, so metamask is correct too.
web3 version in DApp = 1.0 Please someone help.
This is my failing transaction:
Contract.methods.AuctionInfo(deadline, maxBids).send({from: accounts[0], gas: '21000', value: (0.1*maxBids) * 1000000000000000000}, (error, result) => {
if (result) console.log(result);
if (error) console.log(error);
});
.methods
and.send
are from v1.0. Also gas 21000 is too low and to calculate value it is better to use BigNumber. – Ismael Nov 17 '19 at 0:581000000000000000000 > Number.MAX_SAFE_INTEGER
. – goodvibration Nov 17 '19 at 7:06(0.1*maxBids) * 1000000000000000000
to`${maxBids}e17`
. – goodvibration Nov 17 '19 at 7:09