Skip to main content

Questions tagged [wagmi-react]

The tag has no usage guidance.

8 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
0 answers

ContractFunctionExecutionError: The contract function "createCommitment" returned no data ("0x")

I am using WalletConnect's Web3Modal together with Wagmi. I am trying to use the hook provided by Wagmi -- usePrepareContractWrite and useContractWrite. Here is their documentation I applied the code ...
0xNike's user avatar
  • 23
0 votes
1 answer

Getting 403 forbidden error when useWatchContractEvent hook is used in next, wagmi, react

I am getting 403 forbidden on every interval multiple times. I used the useWatchContractEvent() hook from wagmi in my next js app. Getting same error multiple times in intervals: POST https://sepolia....
mari0's user avatar
  • 1
0 votes
1 answer

Why wagmi with react returns object with numeric keys when fetch data from contract?

I have the issue that when I use useReadContract with abi , address an function name i receive the data like this: [{result: {0: value, 1: value}}]. The question is why this is possible when I have ...
blockchainer's user avatar
0 votes
0 answers

Cannot read properties of undefined (reading 'getDefaultChain')

in this code when i want call the function from contract i get this error: Cannot read properties of undefined (reading 'getDefaultChain') i use walletConnect V2 for connecting wallet and use etherjs ...
Elham Bahrami's user avatar
0 votes
0 answers

Getting error during setup when doing "npm i wagmi viem"

npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/typescript npm ERR! typescript@"^4....
Indul's user avatar
  • 29
0 votes
0 answers

Wagmi write contract

I have this code here import React from 'react'; import { usePrepareContractWrite, useContractWrite } from 'wagmi'; import lottoABI from './lottoABI.json'; import { parseEther } from 'viem'; // ...
Joe Code's user avatar
0 votes
0 answers

ABI encoding params/values length mismatch usePrepareContractWrite

I am using wagmi-react hooks to write contract data. Everything works fine with the useContractWrite() but having this issue when using usePrepareContractWrite() ABI encoding params/values length ...
Sagar Atalatti's user avatar
0 votes
1 answer

write is not a function from useContractWrite

I am getting this error in runtime when using usePrepareContractWrite my code is as follows from the wagmi documentation: const { config } = usePrepareContractWrite({ address: "...
Sagar Atalatti's user avatar