docs: the bundled token list is described as "top 250" in four places and "roughly 500" in another; it is 512 #239

Closed
opened 2026-08-11 15:38:18 +02:00 by clawbot · 1 comment
Collaborator

TOKENS in src/shared/tokenList.js contains 512 entries. The documentation disagrees with the code and with itself:

  • README.md:376, :932, :1055, :1115 — "top 250"
  • docs/README.md:323 — "roughly 500"

The count matters rather than being cosmetic: it is the bundled allowlist that decides which tokens appear without the user tracking them, so a reader working out why a token did or did not show up is being given the wrong size for the set.

Pre-existing. Found by the independent review of #226, which corrected the surrounding sentences about filter reach but deliberately left the count alone as out of scope.

Implementation requirements

  • Derive the number from the code rather than restating a figure. If the list is regenerated periodically, a hardcoded count in five places will drift again — prefer wording that does not pin an exact number, or a single stated number with a note of where it comes from.
  • Check whether the "top N" framing is even accurate: establish how the list is selected (market cap? holders? some upstream list?) and describe that, since "top 250" implies a ranking the code may not actually apply.
  • Fix all five locations so they agree with each other and with TOKENS.

Definition of done

  • No documentation states a bundled-token count that disagrees with src/shared/tokenList.js.
  • README.md and docs/README.md agree with each other.
  • The selection criterion for the list is described accurately, or the claim about ranking is dropped.
  • make fmt run over the changed markdown.
  • TODO.md updated in the same commit.
  • make check passes.
`TOKENS` in `src/shared/tokenList.js` contains **512** entries. The documentation disagrees with the code and with itself: - `README.md:376`, `:932`, `:1055`, `:1115` — "top 250" - `docs/README.md:323` — "roughly 500" The count matters rather than being cosmetic: it is the bundled allowlist that decides which tokens appear without the user tracking them, so a reader working out why a token did or did not show up is being given the wrong size for the set. Pre-existing. Found by the independent review of https://git.eeqj.de/sneak/AutistMask/pulls/226, which corrected the surrounding sentences about filter reach but deliberately left the count alone as out of scope. ## Implementation requirements - Derive the number from the code rather than restating a figure. If the list is regenerated periodically, a hardcoded count in five places will drift again — prefer wording that does not pin an exact number, or a single stated number with a note of where it comes from. - Check whether the "top N" framing is even accurate: establish how the list is selected (market cap? holders? some upstream list?) and describe that, since "top 250" implies a ranking the code may not actually apply. - Fix all five locations so they agree with each other and with `TOKENS`. ## Definition of done - [ ] No documentation states a bundled-token count that disagrees with `src/shared/tokenList.js`. - [ ] `README.md` and `docs/README.md` agree with each other. - [ ] The selection criterion for the list is described accurately, or the claim about ranking is dropped. - [ ] `make fmt` run over the changed markdown. - [ ] `TODO.md` updated in the same commit. - [ ] `make check` passes.
clawbot added this to the 1.0.0 milestone 2026-08-11 15:38:18 +02:00
Author
Collaborator

Done in #241.

Selection criterion, established from the file header and corroborated by the
commit history: highest-market-cap ERC-20 tokens on Ethereum mainnet, taken as a
point-in-time snapshot from the CoinGecko API, decimals verified on-chain,
addresses EIP-55 checksummed. The "top N by market cap" ranking framing is
therefore accurate and is kept; only the number was wrong. No generator script
exists in the tree, so the file is regenerated out of band and hand-committed.

The count is dropped from all five locations rather than restated as 512, since
five hardcoded numbers drift again on the next regeneration. README.md's full
"Known token symbol verification" description now carries the criterion and
names TOKENS in src/shared/tokenList.js as the authoritative set; the three
incidental "top-250 token list" mentions become "known-token list", the term the
docs already used elsewhere; docs/README.md gets the same criterion in
user-facing wording.

Verified: make fmt run, make check green (14 suites, 361 tests,
prettier --check . clean) on the branch rebased onto next at 158278d, and
script/cibuild green with the containerized make check layer observed
executing rather than CACHED.

Adjacent, not fixed here: the header comment in src/shared/tokenList.js says
"511 tokens" and is off by one too. That is a code file and this unit is
docs-only, so it is untouched — filed separately.

Done in https://git.eeqj.de/sneak/AutistMask/pulls/241. Selection criterion, established from the file header and corroborated by the commit history: highest-market-cap ERC-20 tokens on Ethereum mainnet, taken as a point-in-time snapshot from the CoinGecko API, decimals verified on-chain, addresses EIP-55 checksummed. The "top N by market cap" ranking framing is therefore accurate and is kept; only the number was wrong. No generator script exists in the tree, so the file is regenerated out of band and hand-committed. The count is dropped from all five locations rather than restated as 512, since five hardcoded numbers drift again on the next regeneration. `README.md`'s full "Known token symbol verification" description now carries the criterion and names `TOKENS` in `src/shared/tokenList.js` as the authoritative set; the three incidental "top-250 token list" mentions become "known-token list", the term the docs already used elsewhere; `docs/README.md` gets the same criterion in user-facing wording. Verified: `make fmt` run, `make check` green (14 suites, 361 tests, `prettier --check .` clean) on the branch rebased onto `next` at `158278d`, and `script/cibuild` green with the containerized `make check` layer observed executing rather than `CACHED`. Adjacent, not fixed here: the header comment in `src/shared/tokenList.js` says "511 tokens" and is off by one too. That is a code file and this unit is docs-only, so it is untouched — filed separately.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#239