Skip to main content

Questions tagged [wagmi-hooks]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
3 views

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
0 answers
21 views

Error: Missing or invalid parameters. Double check you have provided the correct parameters. Even with correct type casting

I am using latest Next.js and written a function to write to a contract. But i when i call the function it is returnin this error message 'Error: Missing or invalid parameters. Double check you have ...
delledev's user avatar
0 votes
1 answer
34 views

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
91 views

Error Invalid parameters were provided to the RPC method in sendtransaction wagmi

I'm trying to do a simple BNB sending on an html+js site. It sends successfully, but for some reason it throws an error and I can't track the condition of successful sending using the code ...
Madis Conner's user avatar
1 vote
2 answers
584 views

WAGMI: useWriteContract is unresponsive

I have a simple form where I'm asking the user for a token address, token id and it's price. On submitting these values I want to call a function on my smart contract for which I'm using wagmi's ...
Sam Hawkz's user avatar
0 votes
0 answers
26 views

Need help with Session Management for Decentralized Nextjs app using wagmi Library

Please find github gist to the source code. where i have implemented Wallet connection using WagmiProvider. I dont want to repeat adding WagmiProvider to all the pages in my application, instead i ...
gtrharish's user avatar
0 votes
0 answers
580 views

Error : Cannot read properties of null (reading 'useContext') in frontend

import contracts from '../RPSLS.sol/RPSLSFinal.json' import { ChangeEvent, useContext, useEffect, useRef, useState } from 'react'; import { useNavigate, useLocation } from 'react-router-dom'; import { ...
Indul's user avatar
  • 29
2 votes
0 answers
420 views

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
0 answers
65 views

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
462 views

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
158 views

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
515 views

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