const ABI = [{
"constant": true,
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}];
const options = {
chain: "bsc",
address: "0x...16",
function_name: "allowance",
abi: ABI
};
const allowance = await Moralis.Web3API.native.runContractFunction(options);
How to call the same way the contract function with params?
This “allowance” function call is from Moralis Docs. How does it work without specifying params since the “allowance” function requires two params (owner, spender) to call it?