Skip to content

useContract can't call contract's functions. #93

Answered by dnjooiopa
dnjooiopa asked this question in Q&A
Discussion options

You must be logged in to vote
  const [{data: signerData}] = useSigner()
  const contract = useContract({
    addressOrName: String(process.env.NEXT_PUBLIC_GREETER_ADDRESS),
    contractInterface: Greeter.abi,
    signerOrProvider: signerData,
  });

I solved it by replacing useProvider withuseSigner.
ref: #93 (reply in thread)

Replies: 3 comments 11 replies

Comment options

You must be logged in to vote
7 replies
@tmm
Comment options

@dnjooiopa
Comment options

@liho00
Comment options

@dnjooiopa
Comment options

@liho00
Comment options

Comment options

You must be logged in to vote
4 replies
@lsbyerley
Comment options

@lsbyerley
Comment options

@dnjooiopa
Comment options

@oveddan
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by dnjooiopa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants