You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to deploy to the celo network but got the error
Version: viem@2.9.5atdelay.count.count(C:\Users\kiman\Development\minifundraiser\minifundraiser-hardhat\node_modules\viem\utils\buildRequest.ts:121:21)atprocessTicksAndRejections(node:internal/process/task_queues:95:5)atasyncattemptRetry(C:\Users\kiman\Development\minifundraiser\minifundraiser-hardhat\node_modules\viem\utils\promise\withRetry.ts:44:22){
details: 'invalid argument 0: json: cannot unmarshal non-string into Go struct field TransactionArgs.chainId of type *hexutil.Big',docsPath: undefined,metaMessages: [Array],shortMessage: 'Invalid parameters were provided to the RPC method.\n'+'Double check you have provided the correct parameters.',version: '[email protected]',cause: [RpcRequestError],code: -32602}
I'm not sure what parameters I provided wrong. I tried deploy to other networks like sepolia successfully. This is my helpers.ts file with public and wallet clients
import{toHex,createPublicClient,http,createWalletClient,formatEther,}from"viem";import*aschainsfrom"viem/chains";import{privateKeyToAccount}from"viem/accounts";import*asdotenvfrom"dotenv";dotenv.config();// imports Alchemy API key and metamask private keyconst{METAMASK_PRIVATE_KEY,ALCHEMY_API_KEY,INFURA_API_KEY,CELO_PRIVATE_KEY}=process.env;exportfunctioncreateClients(){// Transport for eth-sepolia networkconstsepoliaHttpTransport=http(`https://eth-sepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY??""}`);// Transport for celo alfajores networkconstceloAlfajoresHttpTransport=http(`https://celo-alfajores.infura.io/v3/${INFURA_API_KEY??""}`);// Creates a publicClientconstpublicClient=createPublicClient({chain: chains.celoAlfajores,transport: celoAlfajoresHttpTransport,});// Creates an Account from a private key.constaccount=privateKeyToAccount(`0x${CELO_PRIVATE_KEY??""}`);// create a walletClientconstdeployer=createWalletClient({account: account,chain: chains.celoAlfajores,transport: celoAlfajoresHttpTransport,});return{ publicClient, deployer };}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I was trying to deploy to the celo network but got the error
I'm not sure what parameters I provided wrong. I tried deploy to other networks like sepolia successfully. This is my
helpers.ts
file with public and wallet clientsBeta Was this translation helpful? Give feedback.
All reactions