Doppler
Generator

Overview

Generate custom Doppler bytecode, manifests, and SDKs from a fixed-size payload schema.

The Doppler generator turns a payload schema into deployable artifacts for one oracle program.

payload.ts
  -> validate payload schema
  -> compute packed layout
  -> render sBPF assembly
  -> compile bytecode
  -> write manifest
  -> write SDKs

Inputs

A generator config can be TypeScript, JavaScript, or JSON:

payload.ts
export default {
  payload: {
    price: "u64",
  },
} as const;

Note

The generator defaults to arch: "v3", which emits bytecode with stricter SBPF ELF headers. Deploying that bytecode requires the cluster feature gate 5cC3foj77CWun58pC51ebHFUWavHWKarWyR5UUik7dnC to be activated. Use arch: "v0" if you need to deploy to a cluster where that gate is not yet enabled.

Outputs

The generator can emit:

OutputPurpose
<name>.soCompiled Solana program bytecode.
doppler.sGenerated sBPF assembly source when --assembly is provided.
manifest.jsonName, program ID, admin, arch, payload size, schema hash, and bytecode hash.
common/Shared TypeScript payload types, serializers, constants, and oracle helpers.
web3js/Generated client SDK for @solana/web3.js.
kit/Generated client SDK for @solana/kit.
rust/Generated Rust SDK with payload type, constants, and transaction helpers.

The current program embeds the admin address and payload size in bytecode. The program ID is written into the manifest and generated SDK constants.

One Program Per Payload

Each generated program is bound to exactly one payload layout. The bytecode embeds the admin address and payload size, and the SDKs are generated for that schema. A deployed program cannot accept a different payload shape.

If you need a different payload — new fields, different types, reordered layout, or a different size — do not regenerate artifacts for the existing program. Generate and deploy a new program instead:

new payload schema
  -> new program keypair
  -> generate new bytecode
  -> deploy new program
  -> create new oracle accounts

Treat each deployment as a separate feed. Consumers must point at the new program ID and oracle accounts before you deprecate the old feed.

The same rule applies when changing the embedded admin address or target sBPF arch. Those values are fixed at generation time and require a new program deployment.

You can re-run generate for an unchanged schema when you only need to refresh outputs, such as adding another SDK target, updating generator tooling, or emitting assembly alongside bytecode. That does not change the on-chain program unless you deploy the new bytecode to a different program address.

On this page