Skip to content

docs: remove the orphaned custom tokens page and fix the surviving one - #1243

Merged
SanabriaRusso merged 1 commit into
mainfrom
docs/merge-custom-tokens
Sep 16, 2026
Merged

SanabriaRusso merged 1 commit into
mainfrom
docs/merge-custom-tokens

Conversation

@dkijania

@dkijania dkijania commented Sep 6, 2026

Copy link
Copy Markdown
Member

Closes #1226.

We had two custom-token pages that both ended with the same Token id / Token Accounts / Token Owner section. Checking them against o1js turned up something worse than duplication: the duplicate teaches an API that no longer exists.

What I verified against the library

Used on o1js/custom-tokens.mdx Reality
this.token.mint() / .burn() / .send() / .id Neither SmartContract nor TokenContract has a token property. TokenContract exposes internal and deriveTokenId.
Experimental.Callback Not exported
Experimental.createChildAccountUpdate Not exported

Experimental currently exports: ActionBatch, BatchReducer, OffchainState, OffchainStateCommitments, ProvableBigInt, Recursive, V2, ZkFunction, createProvableBigInt, memoizeWitness.

All four code blocks on that page were broken, and its three linked GitHub examples all 404. Nothing on it was salvageable as written, so this is a deletion rather than a content merge.

It was already orphaned

  • sidebars.js lists only the feature-overview page.
  • vercel.json has redirected /zkapps/o1js/custom-tokens/zkapps/writing-a-zkapp/feature-overview/custom-tokens since some earlier change.

So the file was unreachable, and the deletion needs no new redirect and no sidebar change. Its only remaining effect was feeding a broken API into static/llms-full.txt — where an LLM reading our docs would pick it up as current. That is the part worth fixing quickly.

Fixes to the surviving page

It documents the current TokenContract / internal API, and was mostly fine. While consolidating into it:

  • Rendering bug: the opening :::info was opened twice and never closed.
  • Broken link: o1js moved its token sources under src/lib/mina/v1/; the linked path 404s. Repointed.
  • Added the TokenContract API reference — the page had no o1Labs link at all.
  • Added the o1js source and example files as further reading, in place of the deleted page's examples. These are compiled and tested with the library, unlike hand-written snippets — which is how this drift happened in the first place. I deliberately did not write replacement examples by hand.
  • Ethereum Request for customElements was a find/replace artefact.

All new links verified live (HTTP 200) on 2026-09-06. static/llms-full.txt regenerated.

Context

From the docs2 ↔ o1Labs overlap comparison indexed in #1237. o1Labs has no custom-token concept page — only the TokenContract API reference — so this page stays canonical on Mina docs and is out of scope for the #1208 delegation. The duplication here was internal to this repo, not against o1Labs.

🤖 Generated with Claude Code

https://claude.ai/code/session_012A5LmAdLpUcPELjgHg3C5e

docs/zkapps/o1js/custom-tokens.mdx duplicated
writing-a-zkapp/feature-overview/custom-tokens.mdx — both ended with the
same Token id / Token Accounts / Token Owner section. Checking the two
against o1js showed the duplicate was also teaching an API that no
longer exists. Verified against the library:

  this.token.mint/burn/send/id  SmartContract and TokenContract have no
                                `token` property; TokenContract exposes
                                `internal` and `deriveTokenId`
  Experimental.Callback         not exported
  Experimental.createChild...   not exported

All four of its code blocks were broken, and its three GitHub example
links 404. Nothing on the page was salvageable as written.

It was also already orphaned: sidebars.js lists only the feature-overview
page, and vercel.json has redirected /zkapps/o1js/custom-tokens to it
since some earlier change. The file was unreachable — its only remaining
effect was to feed a broken API into static/llms-full.txt, where an LLM
reading our docs would pick it up as current. So the deletion needs no
new redirect and no sidebar change.

The surviving page documents the current TokenContract / internal API.
Fixed while consolidating into it:

- The opening :::info admonition was opened twice and never closed.
- o1js moved its token sources under src/lib/mina/v1/; the linked path
  404s. Repointed.
- Added the TokenContract API reference link; the page had none.
- Added the o1js source and example files as further reading, in place of
  the deleted page's examples. These are compiled and tested with the
  library, unlike hand-written snippets.
- "Ethereum Request for customElements" was a find/replace artefact.

Refs #1226, #1208

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012A5LmAdLpUcPELjgHg3C5e
@vercel

vercel Bot commented Sep 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs2 Ready Ready Preview Sep 6, 2026 8:47pm UTC

Request Review

@SanabriaRusso
SanabriaRusso merged commit 1d17476 into main Sep 16, 2026
4 checks passed
@SanabriaRusso
SanabriaRusso deleted the docs/merge-custom-tokens branch September 16, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: merge the two overlapping custom-tokens pages into one

2 participants