I'm trying to learn web3js and all that stuff about ethereum blockchain by developing a frontend client to interact with decantraland contracts but I'm struggling when I want to buy a nft from my javascript.
But i'm getting this error: Error: Can not send value to non-payable contract method or constructor
And indeed, looking at the ABI this is marked as nonpayble... So how should I use this method ?
An other error happens when I try to call estimateGas() on the executeOrder methods of the contract like :
Hi,
I'm trying to learn web3js and all that stuff about ethereum blockchain by developing a frontend client to interact with decantraland contracts but I'm struggling when I want to buy a nft from my javascript.
I'm using the function below to buy a nft:
But i'm getting this error:
Error: Can not send value to non-payable contract method or constructor
And indeed, looking at the ABI this is marked as nonpayble... So how should I use this method ?An other error happens when I try to call
estimateGas()
on theexecuteOrder
methods of the contract like :This call result in
Error: Returned error: gas required exceeds allowance (9990231) or always failing transaction
.Could you please help me to get this code working ?
Thanks in advance.