So I have two function with the same name but different parameter in my solidity smart contract functionName(args1) and functionName(args1, args2)
And because of this function overloading, the ABI of the smart contract has 2 function with exactly the same name, functionName with 1 argument and functionName with 2 arguments
When I try to use wagmi useContractWrite to call the first function with:
const functionWrite = useContractWrite({ ...ContractInstance, functionName: 'functionName', args: [args1], }); or calling second function
const functionWrite = useContractWrite({ ...ContractInstance, functionName: 'functionName', args: [args1, args2], }); It seems wagmi didn't detect the function because of the duplicate name and it gave me this error: 'functionName' doesn't exist in interface for contract "{my contract address}"
Does anyone know how to use overloaded function with wagmi?