useContractRead returns abi.map is not a function. While useContractReads works.
Is there an existing issue for this?
- [X] I have searched the existing issues
Package Version
^0.5.1
Current Behavior
useContractRead Function returns TypeError: abi.map is not a function.
Expected Behavior
while useContractReads Successfully returns the said data. Which is the expected returned value with the same input arguments as useContractRead
Steps To Reproduce
const contract = {
addressOrName: address,
contractInterface: abi
};
const { data: borrowBalance } = useContractRead({
...contract,
functionName: "borrowBalanceStored",
args: address,
chainId: chainId,
});
const { data } = useContractReads({
contracts: [
{
...contract,
args: address,
functionName: "borrowBalanceStored",
chainId: chainId,
},
],
});
Thanks for reporting. This issue is temporarily closed due to lack of information. Please provide a minimal reproducible example via a CodeSandbox (feel free to use this template) and reopen this issue. Other information is also helpful, like framework (e.g. Next.js), browser, etc.
I got the same error while using useContractWrite function. Why is there no solution to this?
@realsbd We need a minimal reproducible example to look into it more. Feel free to add one.
This issue has been locked since it has been closed for more than 14 days.
If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest wagmi version. If you have any other comments you can create a new discussion.