feat(docs): enable run button on create-token-with-metadata cookbook#1470
Conversation
Surfpool now clones the Metaplex Token Metadata program lazily, so the snippet can execute end-to-end in the docs code runner. Refs: DEV-596
|
The latest updates on your projects. Learn more about Vercel for GitHub.
5 Skipped Deployments
|
Greptile SummaryThis PR enables the interactive "Run" button on the
Confidence Score: 5/5Safe to merge — the change is a one-attribute addition that gates the run button, with no logic or content modified. The diff is a single-attribute change (flags="r") on a documentation component. The underlying kit.ts example was already in the repo and correctly targets the surfpool sandbox RPC. No application logic, routing, or data handling is affected. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
actor User
participant Browser
participant Surfpool as Surfpool Sandbox(localhost:8899)
participant Metaplex as Metaplex Token Metadata Program
User->>Browser: Click Run button
Browser->>Surfpool: Airdrop 1 SOL to payer
Surfpool-->>Browser: Airdrop confirmed
Browser->>Surfpool: sendTransaction(createV1Instruction)
Note over Surfpool,Metaplex: Lazy-clones Metaplex program on first use
Surfpool->>Metaplex: Execute CreateV1
Metaplex-->>Surfpool: Metadata PDA created
Surfpool-->>Browser: Transaction Signature
Browser->>Surfpool: fetchMetadataFromSeeds(mint)
Surfpool-->>Browser: name, symbol, uri
Browser->>User: Logs signature, mint address, name, symbol, uri
Reviews (1): Last reviewed commit: "feat(docs): enable run button on create-..." | Re-trigger Greptile |
Summary
flags="r"to the<CodeTabs>block oncreate-token-with-metadata.mdxso the snippet is executable via the docs code runner.Test Plan
pnpm --filter @workspace/docs-examples test -- create-token-with-metadataagainst surfpool.Audit notes
Other
/en/cookbook pages still missingflags="r"were reviewed; most are intentional (filesystem access, long-running subscriptions, offline flow, RPC-only construction).tokens/fetch-token-metadata.mdxis a candidate for a follow-up if we want to enable it (uses a mainnet USDC mint that surfpool would need to clone).Closes DEV-596