Commit e5b7d7c
Mike MacCana
docs: truth audit across READMEs
Read every README against the underlying code and fixed claims that no
longer hold. Also applied the agreed token-terminology rules across
prose: no 'SPL Token(s)', no 'Token-2022' / 'Token 2022'. Use 'tokens',
'Classic Token Program', 'Token Extensions' / 'Token Extensions
Program'. 'instruction handler' (not 'instruction') when referring to
the Rust pub fn under #[program].
Behaviour changes:
- Delete orphan dir tokens/token-extensions/transfer-hook/pblock-list/.
PR #20 renamed pblock-list → block-list but left the parent shell
behind with a stale README that referenced a non-existent
pinocchio/ subdir.
Real claim drift fixed (README claimed X, code does Y):
- tokens/token-fundraiser/anchor: duration field is u16 (not u8);
Contributor struct has a bump field; handlers are free
pub fn handle_*(accounts: &mut X, ...) (not impl<'info>);
amount >= MIN_AMOUNT_TO_RAISE (not >); 1_u64.pow (not 1_u8.pow);
FundraiserError::FundraiserEnded (not FundraisingEnded); added
missing check_contributions handler description; documented the
duration-check semantics (see WARNING below).
- tokens/nft-operations/anchor: code pattern shifted from
impl<'info> X<'info> { pub fn ... } to free pub fn handler(accounts:
&mut X, bumps: &XBumps). Rewrote all three handler code blocks.
Also fixed INSTRUCTIONS_ID → INSTRUCTIONS_SYSVAR_ID with a note
about the Anchor 1.0 sysvar-id move.
- basics/close-account/anchor: README described a 'destroy-an-account'
program with TypeScript tests using fetchNullable. Actual program is
'close-account', files are create_user.rs and close_user.rs, tests
are Rust litesvm (cargo test). Rewrote the README to match.
- basics/cross-program-invocation: dependency uses features = ["cpi"]
(which enables no-entrypoint), not features = ["no-entrypoint"]
directly. Documented the cpi feature.
- tokens/token-extensions/nft-meta-data-pointer/anchor-example:
MAX_ENERGY = 100 (not 10); programs/extension_nft (underscore, not
hyphen); there is no update_energy.rs instruction handler (the
refill is computed in PlayerData::update_energy in state/player_data.rs);
file tree updated to match actual layout.
- compression/cnft-burn, cnft-vault, cutils anchor READMEs: stripped
references to non-existent tests/ directories and stale devnet
program IDs (the lib.rs declare_id! values are different and the
README values can't be verified). cutils also claimed 'pins Anchor
0.26.0' but Cargo.toml uses anchor-lang = "1.0.0".
- tokens/token-extensions/transfer-hook/whitelist/anchor: fixed broken
link to ../../pblock-list/ → ../../block-list/.
- tokens/token-extensions/transfer-hook/block-list/readme.md: this
lowercase readme.md was not updated in the May 12 style pass.
Rewrote to match the styled tone and the actual handler names
(Init, BlockWallet, UnblockWallet, SetupExtraMetas, TxHook) and
dispatcher in pinocchio/program/src/lib.rs. Removed the unverifiable
devnet links and dead transaction URLs; left only the declare_id!
with a note on how to check deployment.
Terminology sweep (prose only; directory paths and Rust identifiers
like Program<'info, Token2022> / TOKEN_2022_PROGRAM_ID unchanged):
- 'SPL Token', 'SPL Tokens', 'the SPL Token Program' → 'tokens',
'Classic Token Program' depending on context.
- 'Token-2022', 'Token 2022' → 'Token Extensions' /
'Token Extensions Program'.
- 'the transfer() instruction provided by the SPL Token Program' →
'the Classic Token Program's transfer instruction handler'.
WARNING — code bugs noticed but not fixed in this PR:
token-fundraiser/anchor has comparison operators that look inverted
relative to their error names:
contribute.rs:72 — require!(duration <= elapsed_days, FundraiserEnded)
refund.rs:60 — require!(duration >= elapsed_days, FundraiserNotEnded)
One of these is wrong. The README now describes what the code
actually does and flags this for any future reader. Did not change
program logic in a docs PR.
Out of scope (deliberately not touched):
- spl-token-minter directory rename (would break links).
- Whether the block-list/pinocchio Pinocchio program is currently
shippable / CI-green (separate ongoing investigation).
- block-list/readme.md → README.md rename (file rename, not content).1 parent 8abb5d1 commit e5b7d7c
19 files changed
Lines changed: 406 additions & 867 deletions
File tree
- basics
- close-account/anchor
- cross-program-invocation
- compression
- cnft-burn/anchor
- cnft-vault/anchor
- cutils/anchor
- tokens
- create-token
- nft-minter
- nft-operations/anchor
- spl-token-minter
- token-extensions
- default-account-state/native
- nft-meta-data-pointer/anchor-example
- transfer-hook
- allow-block-list-token
- block-list
- pblock-list
- whitelist/anchor
- token-fundraiser/anchor
- token-swap
- transfer-tokens
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
8 | | - | |
9 | 10 | | |
10 | | - | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | | - | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
20 | 30 | | |
21 | 31 | | |
22 | | - | |
| 32 | + | |
23 | 33 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
30 | 38 | | |
31 | 39 | | |
32 | 40 | | |
33 | | - | |
| 41 | + | |
34 | 42 | | |
35 | 43 | | |
36 | | - | |
| 44 | + | |
37 | 45 | | |
38 | 46 | | |
39 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 16 | + | |
20 | 17 | | |
21 | 18 | | |
22 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | 28 | | |
43 | 29 | | |
44 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | | - | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
0 commit comments