Hi, here is a smart contract which has the multiple function definitions.
{
“inputs”: [
{
“internalType”: “address”,
“name”: “token”,
“type”: “address”
},
{
“internalType”: “uint256”,
“name”: “amount”,
“type”: “uint256”
}
],
“name”: “deposit”,
“outputs”: [],
“type”: “function”
},
{
“inputs”: [
{
“internalType”: “address”,
“name”: “token”,
“type”: “address”
},
{
“internalType”: “uint256”,
“name”: “amount”,
“type”: “uint256”
},
{
“internalType”: “address”,
“name”: “to”,
“type”: “address”
}
],
“name”: “deposit”,
“outputs”: [],
“type”: “function”
}
1’st function - deposit(address token, unit256 amount)
2’nd function - deposit(address token, unint256 amount, address to)
then I call “deposit” function on frontend like this:
from<ObservableInput>(Moralis.executeFunction({
contractAddress: “0xxxxxxx”,
abi: xxx.abi,
functionName: ‘deposit’,
params: {
token: tokenAddress,
amount: amount,
to: userAddress
},
}));
then it returns this error:
“Multiple function definitions found in the abi. Please include the topic in the functionName.
Possible funcationNames: deposit(address,uint256) ,deposit(address,uint256,address)”
any solution?