[object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object]Use Viem with Degen Layer 3 Chain | dTech Zum Inhalt springen

Use Viem with Degen Layer 3 Chain

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Viem supports the degen chain so if you already have viem installed update it, else install it using npm install viem and then create a PublicClient.

import { createPublicClient, http } from 'viem'
import { degen } from 'viem/chains';
export const degenClient = createPublicClient({
chain: degen,
transport: http(process.env.DEGEN_RPC_URL || "https://rpc.degen.tips")
})

Now you can use degenClient like any other viem client to read from, write to and watch SmartContracts.