Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

getCodes

List stored Wasm codes, paginated.

Signature

function getCodes(
  client: Client,
  parameters?: {
    startAfter?: string
    limit?: number
    height?: number
  },
): Promise<CodesResponse>

Example

import { createPublicClient, createTransport, testnet } from "@left-curve/sdk"
 
const client = createPublicClient({ chain: testnet, transport: createTransport() })
const codes = await client.getCodes({ limit: 50 })

Parameters

startAfterstring, optional. Hash to start after (exclusive).

limitnumber, optional. Maximum entries to return.

heightnumber, optional. Block height to query at. Default 0 (latest).

Returns

CodesResponseRecord<Hex, Code> keyed by hash.

See also