11 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
Best practices
0
votes
1
replies
30
views
Is there a way to reference contracts deployed on anvil in a typescript test?
Right now, I am deployed contracts on anvil with a script, logging the addresses, and hardcoding it into my viem typescript test. Is there a more seamless way to do ts tests in conjunction with smart ...
0
votes
0
answers
138
views
Expo SDK 53 upgrade: unable to resolve module ../core/AbiParameters.js
I am using viem, which uses ox library.
While upgrading to Expo SDK 53, hit this issue with OX below, and cannot figure out the right way to resolve this.
Unable to resolve module ../core/...
1
vote
1
answer
533
views
How do I get Privy sendTransaction to work with external wallets?
I'm using the Privy React SDK (@privy-io/react-auth v2.17.3) configured with the following setting:
<BasePrivyProvider
appId={AUTH_VENDOR_PRIVY_APP_ID}
clientId={AUTH_VENDOR_PRIVY_CLIENT_ID}...
0
votes
0
answers
26
views
How to Fully Infer Return Type from a Nested Field Transformer Schema
I'm building a strongly-typed schemas to decode and transform eth event logs using Viem-style ABIs. I use a createAbiSchema helper to define a transformation schema for each event, where each field ...
1
vote
1
answer
65
views
Typescript type for viem WalletClient with "account" defined?
When using the viem library's createWalletClient function, you can optionally provide an account parameter (to hoist it), and thereafter it's not needed to be specified on calls like walletClient....
3
votes
1
answer
853
views
Viem: use simulateContract to get values return from a smart contract write function
In the viem docs, it mentions that writeContract only returns the transaction hash and to use simulateContract to get the values returned from a writeContract call.
https://viem.sh/docs/contract/...
0
votes
2
answers
120
views
simulateContract vs prepareContract, and the purpose of these?
I just want to check my understanding of the purpose of the two:
simulateContract, is the purpose of this, is to check whether or not the transaction would go through? And the reason we would want to ...
0
votes
1
answer
1k
views
sendTransaction vs writeContract, with functionName "transfer"
I'm a bit confused on sending tokens from one address to another.
Say for example, I want to send AVAX native from one address to another,
I can successfully do it with sendTransaction which is just
...
0
votes
1
answer
447
views
Over 300 errors simply from importing 'viem'
I've installed viem
npm install viem
Then I've simply added two imports to a new .ts file.
import { createPublicClient, createWalletClient, http } from 'viem';
import { baseSepolia } from 'viem/chains'...
0
votes
0
answers
210
views
Nuxt 2 Viem TypeError: Cannot convert a BigInt value to a number at Math.pow
I have a project with Nuxt 2, and I want to support WalletConnect v2. For this reason, I added the WalletConnect dependencies, but it doesn't compile. I added WalletConnect and related dependencies to ...
0
votes
2
answers
621
views
wagmi : calling `await getAccount()` keeps returning undefined
I am working with wagmi core in svelte and am looking to make a basic wallet connect and disconnect flow.
I am able to successfully connect by pressing the connect button, and having it call ...