I'm trying to make a contract call that requires an amount of tezos to be sent in. I've done this before and it has worked, but now I get this error every time.
Here's the code I'm running:
const costOfNFT = 0.1
const value = { amount: costOfNFT }
const purchaseNFTOperation = await contract.methods
.buy(nftId)
.send(value)
Here's the error:
[amount] Value is not a number: undefined
undefined
NatValidationError
NatToken {
val: { prim: 'nat', annots: [ '%amount' ] },
idx: 1,
fac: [Function: createToken],
createToken: [Function: createToken]
}
It seems like somehow it's not recognizing the amount I'm sending. I've tried as well:
const value = { amount: costOfNFT*1000000, mutez:true }
Let me know if there's another way to send tezos in a contract call. I'm super confused how this works in another contract call I'm doing.
Thanks
nat
calledamount
. Could you share the entrypoint type signature in Michelson?