Skip to content

Developer · viem

Generate the code to call it

TypeScript for viem, generated from the contract's verified ABI. Reconstructed (unverified) items are kept in a separate, clearly marked section.
01

SDK for a contract

Emit

abi.ts and client.ts are always generated

TypeScript · viem · public client only

No SDK generated yet.

Enter a contract address and press Generate SDK. Files appear here as editor tabs: abi.ts, client.ts, read.ts, encode.ts and events.ts.
02

Integration snippets

Plain viem against Robinhood Chain. Start from chain.ts; the other files import its client. Every example reads or encodes; none signs or sends.

Chain
4663 · Robinhood Chain
Public RPC
https://rpc.mainnet.chain.robinhood.com
Own RPC
process.env.ENTROPY_RPC_URL
Client
createPublicClient only
import { createPublicClient, defineChain, http } from "viem"; export const robinhoodChain = defineChain({  id: 4663,  name: "Robinhood Chain",  nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },  rpcUrls: { default: { http: ["https://rpc.mainnet.chain.robinhood.com"] } },  blockExplorers: { default: { name: "Blockscout", url: "https://robinhoodchain.blockscout.com" } },}); // The public RPC is rate-limited. In production, set ENTROPY_RPC_URL to your own provider.export const client = createPublicClient({  chain: robinhoodChain,  transport: http(process.env.ENTROPY_RPC_URL),});