TevmRpcSchema
TevmRpcSchema: [
...PublicRpcSchema, …TestRpcSchema<“anvil” | “ganache” | “hardhat”>,JsonRpcSchemaTevm["tevm_call"],JsonRpcSchemaTevm["tevm_dumpState"],JsonRpcSchemaTevm["tevm_loadState"],JsonRpcSchemaTevm["tevm_getAccount"],JsonRpcSchemaTevm["tevm_setAccount"]]
The JSON-RPC schema for TEVM. This type represents the JSON-RPC requests that the EIP-1193 client can handle when using TEVM. It includes public, test, and TEVM-specific methods.
Example
import { createClient, http } from 'viem'import { optimism } from 'tevm/common'import { createTevmTransport } from 'tevm'
const client = createClient({  transport: createTevmTransport({    fork: { transport: http('https://mainnet.optimism.io')({}) }  }),  chain: optimism,})
async function example() {  const result = await client.request({    method: 'tevm_call',    params: [{ to: '0x123...', data: '0x123...' }],  })  console.log(result)}
example()