https://docs.moralis.io/moralis-server/web3/web3#example-of-calling-a-send-contract-method
How do I specify value in a payable function using Moralis?
Here is the source on the function https://github.com/avolabs-io/nft-auction/blob/master/contracts/NFTAuction.sol
const ABI = {
"inputs": [
{
"internalType": "address",
"name": "_nftContractAddress",
"type": "address"
},
{
"internalType": "uint256",
"name": "_tokenId",
"type": "uint256"
},
{
"internalType": "address",
"name": "_erc20Token",
"type": "address"
},
{
"internalType": "uint128",
"name": "_tokenAmount",
"type": "uint128"
}
],
"name": "makeBid",
"outputs": [],
"stateMutability": "payable",
"type": "function"
}
const options = {
chain: "polygon",
contractAddress: AUCTION_CONTRACT_ADDRESS,
functionName: "makeBid",
abi: ABI,
params: {
_nftContractAddress: TOKEN_CONTRACT_ADDRESS,
_erc20Token: ZERO_ADDRESS (TO Specifiy the native MATIC token with this contract),
_tokenId: _tokenId,
_tokenAmount: ZERO, only applicable to ERC20s,
Do I add an additional param such as value, in wei?
value: 10000
},
};