Skip to main content

Questions tagged [viem]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
32 views

Seeking DApps that use personal_sign, eth_signTypedData, and eth_signTypedData_v3 with ERC-1271 signature validation

I am currently working on a wallet and encountering challenges with testing signature verification locally. When using viem's verifyTypedData/verifyMessage methods in a local environment, I'm only ...
cmptrwizard's user avatar
0 votes
0 answers
186 views

Getting `Connector not connected` error with wagmi

I'm integrating Wagmi into my Next.js application to handle contract simulation in the backend with tRPC. However, I'm encountering an error message stating Connector not connected. I've attempted to ...
Mohit's user avatar
  • 124
0 votes
1 answer
52 views

Viem's PublicClient#watchContractEvent with WSS transport: Socket closed

New PublicClient instances created with WSS transport immediately fail to watch contract events if created after a period of the app inactivity - i.e. if no PublicClient was created or used for a few ...
Utgarda's user avatar
  • 791
0 votes
1 answer
66 views

AbiFunctionNotFoundError: Function "mint" not found on ABI. Make sure you are using the correct ABI and that the function exists on it

I get this error when I call the mint() function "biFunctionNotFoundError: Function "mint" not found on ABI. Make sure you are using the correct ABI and that the function exists on it.&...
soso.eth's user avatar
0 votes
1 answer
74 views

get multiple balances with viem getBalance function

I want to fetch multiple balances with viem getBalance function. At this moment, i am doing multiple getBalance calls (one per address) Is there a way to do it with a single call ? Thanks
Bob5421's user avatar
  • 1,477
1 vote
1 answer
435 views

How to fix error with deploy my Next.js project?

I have my project that I want to deploy to Vercel but when I'm trying to deploy it I got error Failed to compile. ./node_modules/@wagmi/core/dist/esm/actions/getProof.js Attempted import error: '...
Victor's user avatar
  • 45
1 vote
1 answer
126 views

Listening to events in unit test using Viem

I want to be able to tell how many approval event were sent during my test as I cannot tell how many where sent since they are auto-approved by hardhat Running Environment.
codekoriko's user avatar
1 vote
1 answer
116 views

Why does Metamsk display the sign data as unicode question marks and other various characters when signing a message with Viem?

I'm trying to sign a message in Viem and recover the signer in Solidity, it works as expected, however, the Metamask pop-up window displays the data to be signed incorrectly. Here is my Viem ts code: ...
Rohan Nero's user avatar
  • 1,607
1 vote
1 answer
310 views

How can I create a message hash in Solidity that matches Viem?

I'm creating a message hash with Viem in typescript and in Solidity, however, I can't seem to get the hash in Solidity to match the one created with Viem. My viem code: const hashedMessage = ...
Rohan Nero's user avatar
  • 1,607
1 vote
0 answers
156 views

How to I solve fetch has been blocked by CORS policy when fetch data from contract

I'm trying to fetch campaign data and display it to the user. I'm using Nextjs in the front-end and solidity & hardhat in the back-end. The contract data seems to be fetched but when being ...
Kihiu's user avatar
  • 11
0 votes
2 answers
315 views

How to pass blockNumber to viem call?

I'm trying to view the owner of a certain NFT at a specific blockNumber, when I make the viem call without the blockNumber parameter it works perfectly, however, once I try to pass a blockNumber with ...
Rohan Nero's user avatar
  • 1,607
0 votes
0 answers
576 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
1 answer
126 views

ethers.js library version to use to learn Ethereum development

Which version of the Ethers.js library, either v5 or v6, is recommended for me to learn and work with? I'm seeking advice on which version would be more beneficial for my current needs and future ...
Israel Ogunsola's user avatar
1 vote
1 answer
201 views

ViemAdapter for @safe-global/protocol-kit?

I was trying to use @safe-global modules but found that in the protocol kit, only Ethers.js (<v6) and Web3.js are supported. I tend to use Viem and Wagmi because of their advantages in development. ...
Abhik Banerjee's user avatar