You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: link canonical Solana terms to terminology page on first mention
What
- Walked every README in the repo and added a markdown link to
https://solana.com/docs/terminology for the first prose mention of each
canonical Solana term: program, instruction, instruction handler, account,
PDA, mint / mint account, token account, ATA, rent, lamport, CPI / cross-program
invocation, Token Extensions, onchain, Anchor.
Why
- Readers new to Solana can click straight from any example into the canonical
definition of unfamiliar terms without leaving the repo.
Rules followed
- First prose mention only; subsequent mentions stay plain.
- Code blocks, inline code, headers, and pre-existing markdown links untouched.
- Case-preserving link text ("Programs" stays "Programs", "PDA" stays "PDA").
- "instruction handler" and "mint account" link once; their constituents
("instruction", "mint") are linked at their next standalone prose mention.
- "program" is not linked inside compound proper nouns like "System Program",
"Token Program", or "Classic Token Program" (would read oddly mid-name).
Anchor corrections vs the original spec
- program-derived address → #program-derived-address-pda (spec said #program-derived-account)
- mint account / mint → #token-mint (spec said #mint-account)
- associated token account → #associated-token-account-ata (spec said #associated-token-account)
- Token Extensions → #token-extensions-program (spec said #token-extensions)
- "Classic Token Program", "signer", and "offchain" do not have anchors on the
live terminology page; those terms were left unlinked.
Copy file name to clipboardExpand all lines: README.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Quicknode Solana Program Examples
2
2
3
-
> A fork of the [Solana Foundation program examples](https://github.com/solana-developers/program-examples) with current versions, more programs, and additional frameworks.
3
+
> A fork of the [Solana Foundation program examples](https://github.com/solana-developers/program-examples) with current versions, more [programs](https://solana.com/docs/terminology#program), and additional frameworks.
@@ -13,7 +13,7 @@ Each example is available in one or more of the following frameworks:
13
13
-[🧬 ASM](https://github.com/blueshift-gg/sbpf) — hand-written sBPF assembly built with the `sbpf` toolchain. Run `pnpm build-and-test` to build and test.
14
14
15
15
> [!NOTE]
16
-
> You don't need to write your own program for basic tasks like creating accounts, transferring SOL, or minting tokens. These are handled by existing programs like the System Program and Token Program.
16
+
> You don't need to write your own program for basic tasks like creating [accounts](https://solana.com/docs/terminology#account), transferring SOL, or minting tokens. These are handled by existing programs like the System Program and Token Program.
17
17
18
18
## Financial Software
19
19
@@ -37,7 +37,7 @@ Create a fundraiser specifying a target mint and amount. Contributors deposit to
37
37
38
38
### Pyth Price Feeds
39
39
40
-
Read offchain price data onchain using the Pyth oracle network.
40
+
Read offchain price data [onchain](https://solana.com/docs/terminology#onchain) using the Pyth oracle network.
Solana programs should check the instructions they receive to ensure security and to make sure required invariants hold.
3
+
Solana [programs](https://solana.com/docs/terminology#program) should check the [instructions](https://solana.com/docs/terminology#instruction) they receive to ensure security and to make sure required invariants hold.
4
4
5
5
The exact checks depend on what the program does. Common ones include:
6
6
7
7
- Verifying that the `program_id` on the instruction matches your own program.
8
-
- Verifying the order and number of accounts.
8
+
- Verifying the order and number of [accounts](https://solana.com/docs/terminology#account).
9
9
- Checking the initialization state of an account.
Copy file name to clipboardExpand all lines: basics/close-account/anchor/README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# Close Account
2
2
3
-
Two instruction handlers:`create_user` initializes a PDA `UserState` account, and `close_user` closes it and returns the rent to the user.
3
+
Two [instruction handlers](https://solana.com/docs/terminology#instruction-handler):`create_user` initializes a [PDA](https://solana.com/docs/terminology#program-derived-address-pda)`UserState`[account](https://solana.com/docs/terminology#account), and `close_user` closes it and returns the [rent](https://solana.com/docs/terminology#rent) to the user.
4
4
5
-
1.`create_user` initializes the PDA with Anchor's `init` constraint:
5
+
1.`create_user` initializes the PDA with [Anchor](https://solana.com/docs/terminology#anchor)'s `init` constraint:
6
6
7
7
```rust
8
8
#[account(
@@ -17,7 +17,7 @@ Two instruction handlers: `create_user` initializes a PDA `UserState` account, a
17
17
18
18
See [`programs/close-account/src/instructions/create_user.rs`](programs/close-account/src/instructions/create_user.rs).
19
19
20
-
2.`close_user` closes the account using Anchor's `close` constraint, which returns lamports to the given account:
20
+
2.`close_user` closes the account using Anchor's `close` constraint, which returns [lamports](https://solana.com/docs/terminology#lamport) to the given account:
21
21
22
22
```rust
23
23
#[account(
@@ -33,7 +33,7 @@ Two instruction handlers: `create_user` initializes a PDA `UserState` account, a
33
33
34
34
## Tests
35
35
36
-
Tests live in [`programs/close-account/tests/test_close_account.rs`](programs/close-account/tests/test_close_account.rs) and run against litesvm. `Anchor.toml`'s `scripts.test` is `cargo test`, so `anchor test` builds the program and runs the Rust tests:
36
+
Tests live in [`programs/close-account/tests/test_close_account.rs`](programs/close-account/tests/test_close_account.rs) and run against litesvm. `Anchor.toml`'s `scripts.test` is `cargo test`, so `anchor test` builds the [program](https://solana.com/docs/terminology#program) and runs the Rust tests:
Anchor enforces `init` constraints that nudge you towards good programming patterns.
3
+
[Anchor](https://solana.com/docs/terminology#anchor) enforces `init` constraints that nudge you towards good programming patterns.
4
4
5
-
This program has an additional initialization handler for `Counter`s that the Solana native equivalent does not.
5
+
This [program](https://solana.com/docs/terminology#program) has an additional initialization handler for `Counter`s that the Solana native equivalent does not.
Copy file name to clipboardExpand all lines: basics/create-account/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
# Create Account
2
2
3
-
Create a Solana account.
3
+
Create a Solana [account](https://solana.com/docs/terminology#account).
4
4
5
5
The account is a **system account** — owned by the System Program, which means only the System Program can modify its data. In this example, the account simply holds some SOL.
6
6
7
7
The tests cover two ways to create the account:
8
8
9
-
1.**Via cross-program invocation (CPI):** the client sends a transaction to our deployed program, which in turn calls the System Program.
9
+
1.**Via [cross-program invocation](https://solana.com/docs/terminology#cross-program-invocation-cpi) (CPI):** the client sends a transaction to our deployed [program](https://solana.com/docs/terminology#program), which in turn calls the System Program.
10
10
2.**Directly:** the client sends the create-account transaction straight to the System Program.
11
11
12
12
See [cross-program-invocation](../cross-program-invocation) for more CPI examples.
Copy file name to clipboardExpand all lines: basics/cross-program-invocation/README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
# Cross-Program Invocation (CPI)
2
2
3
-
A cross-program invocation is calling one program from another. You use CPIs when your program needs to compose with other onchain programs to do its work.
3
+
A [cross-program invocation](https://solana.com/docs/terminology#cross-program-invocation-cpi) is calling one [program](https://solana.com/docs/terminology#program) from another. You use CPIs when your program needs to compose with other [onchain](https://solana.com/docs/terminology#onchain) programs to do its work.
4
4
5
5
Whether a given operation should be done via a CPI or via separate RPC calls from the client is a design choice. The main reason to use a CPI is a **dependent operation** that must happen atomically with the rest of your logic.
6
6
7
-
Consider this sequence in a token mint program:
7
+
Consider this sequence in a token [mint](https://solana.com/docs/terminology#token-mint) program:
8
8
9
9
1. Create and initialize the mint.
10
-
2. Create a metadata account for the mint.
11
-
3. Create and initialize a user's token account for the mint.
10
+
2. Create a metadata [account](https://solana.com/docs/terminology#account) for the mint.
11
+
3. Create and initialize a user's [token account](https://solana.com/docs/terminology#token-account) for the mint.
12
12
4. Mint some tokens to the user's token account.
13
13
14
14
You cannot create a metadata account without first having the mint. Once you decide that steps 1 and 4 must be onchain, the only sensible option is to also do steps 2 and 3 onchain — you cannot pause a program mid-flight to let the client do work.
@@ -56,4 +56,4 @@ See the [Features chapter of the Cargo Book](https://doc.rust-lang.org/cargo/ref
The `hand` program's `pull_lever` instruction handler does a CPI into the `lever` program's `switch_power` instruction handler. Pull the lever, switch the power.
59
+
The `hand` program's `pull_lever`[instruction handler](https://solana.com/docs/terminology#instruction-handler) does a CPI into the `lever` program's `switch_power` instruction handler. Pull the lever, switch the power.
Copy file name to clipboardExpand all lines: basics/cross-program-invocation/quasar/README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
# Cross-Program Invocation — Quasar
2
2
3
-
This example contains **two separate Quasar programs** that work together:
3
+
This example contains **two separate Quasar [programs](https://solana.com/docs/terminology#program)** that work together:
4
4
5
-
-**`lever/`** — A program with onchain `PowerStatus` state and a `switch_power` instruction handler that toggles a boolean.
6
-
-**`hand/`** — A program that calls the lever program's `switch_power` via CPI.
5
+
-**`lever/`** — A program with [onchain](https://solana.com/docs/terminology#onchain)`PowerStatus` state and a `switch_power`[instruction handler](https://solana.com/docs/terminology#instruction-handler) that toggles a boolean.
6
+
-**`hand/`** — A program that calls the lever program's `switch_power` via [CPI](https://solana.com/docs/terminology#cross-program-invocation-cpi).
7
7
8
8
## Building
9
9
@@ -27,10 +27,10 @@ The hand tests load **both** programs into `QuasarSvm` and verify that the CPI c
27
27
28
28
## CPI pattern
29
29
30
-
Quasar doesn't have a `declare_program!` equivalent for importing arbitrary program instruction types (unlike Anchor). Instead, the hand program:
30
+
Quasar doesn't have a `declare_program!` equivalent for importing arbitrary program [instruction](https://solana.com/docs/terminology#instruction) types (unlike [Anchor](https://solana.com/docs/terminology#anchor)). Instead, the hand program:
31
31
32
32
1. Defines a **marker type** (`LeverProgram`) that implements the `Id` trait with the lever's program address.
33
-
2. Uses `Program<LeverProgram>` in the accounts struct for compile-time address and executable validation.
33
+
2. Uses `Program<LeverProgram>` in the [accounts](https://solana.com/docs/terminology#account) struct for compile-time address and executable validation.
34
34
3. Builds the CPI instruction data **manually** using `BufCpiCall`, constructing the lever's wire format directly.
35
35
36
36
This is lower-level than Anchor's CPI pattern but gives full control and works with any program.
0 commit comments