diff --git a/src/content/cre/guides/workflow/using-solana-client/onchain-write-ts.mdx b/src/content/cre/guides/workflow/using-solana-client/onchain-write-ts.mdx index 2e15f736862..f3f42f0e9ea 100644 --- a/src/content/cre/guides/workflow/using-solana-client/onchain-write-ts.mdx +++ b/src/content/cre/guides/workflow/using-solana-client/onchain-write-ts.mdx @@ -7,7 +7,7 @@ date: Last Modified metadata: description: "Write verified CRE workflow results to Solana programs using TypeScript: step-by-step guide with generated Anchor bindings." datePublished: "2026-07-06" - lastModified: "2026-07-13" + lastModified: "2026-07-20" --- import { Aside, CopyText } from "@components" @@ -29,7 +29,7 @@ For IDL layout, generator output, and what each `writeReportFrom...` method does ## Prerequisites - A CRE project initialized with `cre init`. See [Part 1: Project Setup](/cre/getting-started/part-1-project-setup-ts) if you are starting from scratch. -- CRE CLI **v1.24.0 or later** (`cre version` / `cre update`) with TypeScript Solana binding generation. +- CRE CLI **vTBD or later** (`cre version` / `cre update`) with TypeScript Solana binding generation and the Solana simulate account-trim fix. - A funded Solana Devnet keypair for `CRE_SOLANA_PRIVATE_KEY` (required even for dry-run). Generate one with `solana-keygen new`, fund it with `solana airdrop` (or a transfer), and put the 64-byte base58 keypair in your project `.env`. See [Step 4](#step-4-run-the-simulation). ## What you need: a receiver program @@ -38,43 +38,106 @@ Your Solana program must implement an `on_report` instruction that accepts the p forwarder CPIs into your program after verifying the DON signatures. Your Anchor IDL's `types` section defines the struct(s) you will write; the generator turns each into a `writeReportFrom()` method. -This guide uses a minimal `DataStorage` / `UserData` IDL with a receiver program already deployed to Solana Devnet at -`64Q1Xu7AEbc2xgaN21zZU1y1mkaLJNnP5cHFkthGuW31`. You can simulate against it without deploying your own program. Swap in -your IDL and call the generated helpers for your structs when you are ready. - -