1

Hello everyone,

I use wagmi with rainbowkit and I wanna check wallet address status with function "isApprovedForAll" response will be true or false, but I got undefined and error everytime same.

information source about address: Guide for DApp Developers

Code:

  const { address } = useAccount();
  const contractRead = useContractRead({
    address: ensContractAddress,
    functionName: 'isApprovedForAll',
    abi: ENSAbi,
    args: [address, true],
    chainId: goerli.id,
  });

this code must return for me ONLY TRUE or FALSE value.

Version:

@rainbow-me/rainbowkit: ^0.7.3
wagmi: ^0.7.5

Error:

ContractMethodDoesNotExistError: Function "isApprovedForAll" on contract 
"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" does not exist. 
Etherscan: https://goerli.etherscan.io/address/0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e#readContract

then I use old address: 0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85 I got error:

Error: invalid address or ENS name (argument="name", value=true, 
code=INVALID_ARGUMENT, version=contracts/5.7.0

few fun fact:

goerli.etherscan.io ENS contract result screenshot

Any ideas? Thank you

Docs:

2 Answers 2

0

Problem solved!.

isApprovedForAll() is a nft api and I used bad function signature, becouse will be (address, address), but not (address, bool). More information about registry api here

0

Wagmi is nice for small dapps but they hooks are lame

3
  • Can you recommend better? thanks
    – dromey
    Nov 2, 2022 at 15:50
  • Using ethers to your send and call functions. Write it yourself. Nov 2, 2022 at 18:54
  • you offer write almost everything from zero? :D It's sound not good, becouse it waste time
    – dromey
    Nov 2, 2022 at 20:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.