Skip to content

Commit 1f32e5d

Browse files
authored
README: Make each program into a heading (#17)
1 parent 02e1d77 commit 1f32e5d

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

README.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ SBF_OUT_DIR="./asm/out" cargo test
144144

145145
## Current Programs
146146

147-
* Helloworld: logs a static string using the `sol_log_` syscall
147+
### Helloworld
148+
149+
Logs a static string using the `sol_log_` syscall.
148150

149151
| Language | CU Usage |
150152
| --- | --- |
@@ -157,8 +159,10 @@ Since this is just doing a syscall, all the languages behave the same. The only
157159
difference is that the Assembly version *doesn't* set the return code to 0, and
158160
lets the VM assume it worked.
159161

160-
* Transfer-Lamports: moves lamports from a source account to a destination, with
161-
the amount given by a little-endian u64 in instruction data.
162+
### Transfer-Lamports
163+
164+
Moves lamports from a source account to a destination, with the amount given by
165+
a little-endian u64 in instruction data.
162166

163167
| Language | CU Usage |
164168
| --- | --- |
@@ -173,9 +177,11 @@ input. Since the assembly version knows exactly where to find everything, it can
173177
be hyper-optimized. The pinocchio version performs very closely to the assembly
174178
implementation!
175179

176-
* CPI: allocates a PDA given by the seed "You pass butter" and a bump seed in
177-
the instruction data. This requires a call to `create_program_address` to check
178-
the address and `invoke_signed` to CPI to the system program.
180+
### CPI
181+
182+
Allocates a PDA given by the seed "You pass butter" and a bump seed in the
183+
instruction data. This requires a call to `create_program_address` to check the
184+
address and `invoke_signed` to CPI to the system program.
179185

180186
| Language | CU Usage | CU Usage (minus syscalls) |
181187
| --- | --- | --- |
@@ -188,9 +194,11 @@ Note: `create_program_address` consumes 1500 CUs, and `invoke` consumes 1000, so
188194
we can subtract 2500 CUs from each program to see the actual cost of the program
189195
logic.
190196

191-
* Token: a reduced instruction set from SPL-Token. Includes an entrypoint,
192-
instruction deserialization, and account serde. The Rust version is the full SPL
193-
Token program.
197+
### Token
198+
199+
A reduced instruction set from SPL-Token. Includes an entrypoint, instruction
200+
deserialization, and account serde. The Rust version is the full SPL Token
201+
program.
194202

195203
* Initialize Mint
196204

0 commit comments

Comments
 (0)