Skip to content

Commit 86b33fa

Browse files
authored
Minor README tweaks per Ayush discussion (#93)
- Just tell people we need every example in every language, rather than write out each missing example. - Move requests for contributions higher - Add CONTRIBUTING to README (also move it out of .github)
1 parent a1b1d97 commit 86b33fa

File tree

2 files changed

+82
-106
lines changed

2 files changed

+82
-106
lines changed
File renamed without changes.

README.md

+82-106
Original file line numberDiff line numberDiff line change
@@ -7,259 +7,255 @@ This repo contains Solana onchain programs (referred to as 'Smart Contracts' in
77
> [!NOTE]
88
> If you're new to Solana, you don't need to create your own programs to perform basic things like making accounts, creating tokens, sending tokens, or minting NFTs. These common tasks are handled with existing programs, for example the System Program (for making account or transferring SOL) or the token program (for creating tokens and NFTs). See the [Solana Developer site](https://solana.com/developers) to learn more.
99
10-
## Using this repo
11-
1210
Each folder includes examples for one or more of the following
1311

1412
- `anchor` - Written using [Anchor](https://www.anchor-lang.com/), the most popular framework for Solana Development, which uses Rust. Use `anchor build && anchor deploy` to build & deploy the program. Run `anchor run test` to test it.
1513
- `native` - Written using Solana's native Rust crates and vanilla Rust. Use `cicd.sh` to build & deploy the program. Run `yarn run test` to test it.
1614
- `seahorse` - Written using the [Seahorse framework](https://seahorse-lang.org/), which converts your Python code to Anchor Rust. Use `seahorse build && anchor deploy` to build & deploy the program. Run `anchor run test` to test it.
1715

18-
If a given example is missing, please add it!
19-
20-
## The example projects
16+
**If a given example is missing, please send us a PR to add it!** Our aim is to have every examples available in every option. We'd also love to see more programs involving staking, wrapped tokens, oracles, compression and VRF. Follow the [contributing guidelines](./CONTRIBUTING.md) to keep things consistent.
2117

2218
<details>
2319
<summary>Basics</summary>
2420

25-
#### account-data
21+
### Hello world
2622

27-
Store and retrieve data using Solana accounts.
23+
[Hello World on Solana! A minimal program that logs a greeting.](./basics/hello-solana/README.md)
2824

29-
[anchor](./basics/account-data/anchor), [native](./basics/account-data/native)
25+
[anchor](./basics/hello-solana/anchor) [native](./basics/hello-solana/native) [seahorse](./basics/hello-solana/seahorse)
3026

31-
#### checking-accounts
27+
### Account-data
3228

33-
[Check that the accounts provided in incoming instructions meet particular criteria.](./basics/checking-accounts/README.md)
29+
Store and retrieve data using Solana accounts.
3430

35-
[anchor](./basics/checking-accounts/anchor), [native](./basics/checking-accounts/native)
31+
[anchor](./basics/account-data/anchor) [native](./basics/account-data/native)
3632

37-
#### close-account
33+
### Storing global state - Counter
3834

39-
Close an account and get the Lamports back.
35+
[Use a PDA to store global state, making a counter that increments when called.](./basics/counter/README.md)
4036

41-
[anchor](./basics/close-account/anchor), [native](./basics/close-account/native)
37+
[anchor](./basics/counter/anchor) [native](./basics/counter/native) [seahorse](./basics/counter/seahorse)
4238

43-
#### counter
39+
### Saving per-user state - Favorites
4440

45-
[Use a PDA to store global state, making a counter that increments when called.](./basics/counter/README.md)
41+
Save and update per-user state on the blockchain, ensuring users can only update their own information.
4642

47-
[anchor](./basics/counter/anchor), [native](./basics/counter/native), [seahorse](./basics/counter/seahorse)
43+
[anchor](./basics/favorites/anchor)
4844

49-
#### create-account
45+
### Checking Instruction Accounts
5046

51-
[Make new accounts on the blockchain.](./basics/create-account/README.md)
47+
[Check that the accounts provided in incoming instructions meet particular criteria.](./basics/checking-accounts/README.md)
5248

53-
[anchor](./basics/create-account/anchor), [native](./basics/create-account/native)
49+
[anchor](./basics/checking-accounts/anchor) [native](./basics/checking-accounts/native)
5450

55-
#### cross-program-invocation
51+
### Closing Accounts
5652

57-
[Invoke an instruction handler from one onchain program in another onchain program.](./basics/cross-program-invocation/README.md)
53+
Close an account and get the Lamports back.
5854

59-
[anchor](./basics/cross-program-invocation/anchor), [native](./basics/cross-program-invocation/native)
55+
[anchor](./basics/close-account/anchor) [native](./basics/close-account/native)
6056

61-
#### favorites
57+
### Creating Accounts
6258

63-
Save and update per-user state on the blockchain, ensuring users can only update their own information.
59+
[Make new accounts on the blockchain.](./basics/create-account/README.md)
6460

65-
[anchor](./basics/favorites/anchor)
61+
[anchor](./basics/create-account/anchor) [native](./basics/create-account/native)
6662

67-
#### hello-solana
63+
### Cross program invocations
6864

69-
[Hello World on Solana! A minimal program that logs a greeting.](./basics/hello-solana/README.md)
65+
[Invoke an instruction handler from one onchain program in another onchain program.](./basics/cross-program-invocation/README.md)
7066

71-
[anchor](./basics/hello-solana/anchor), [native](./basics/hello-solana/native), [seahorse](./basics/hello-solana/seahorse)
67+
[anchor](./basics/cross-program-invocation/anchor) [native](./basics/cross-program-invocation/native)
7268

73-
#### pda-rent-payer
69+
### PDA pda-rent-payer
7470

7571
[Use a PDA to pay the rent for the creation of a new account.](./basics/pda-rent-payer/README.md)
7672

77-
[anchor](./basics/pda-rent-payer/anchor), [native](./basics/pda-rent-payer/native)
73+
[anchor](./basics/pda-rent-payer/anchor) [native](./basics/pda-rent-payer/native)
7874

79-
#### processing-instructions
75+
### Processing instructions
8076

8177
[Add parameters to an instruction handler and use them.](./basics/processing-instructions/README.md)
8278

83-
[anchor](./basics/processing-instructions/anchor), [native](./basics/processing-instructions/native)
79+
[anchor](./basics/processing-instructions/anchor) [native](./basics/processing-instructions/native)
8480

85-
#### program-derived-addresses
81+
### Storing date in program derived addresses
8682

8783
Store and retrieve state in Solana.
8884

89-
[anchor](./basics/program-derived-addresses/anchor), [native](./basics/program-derived-addresses/native)
85+
[anchor](./basics/program-derived-addresses/anchor) [native](./basics/program-derived-addresses/native)
9086

91-
#### realloc
87+
### Handling accounts that expland in size
9288

9389
How to store state that changes size in Solana.
9490

95-
[anchor](./basics/realloc/anchor), [native](./basics/realloc/native)
91+
[anchor](./basics/realloc/anchor) [native](./basics/realloc/native)
9692

97-
#### rent
93+
### Calculating account size to determine rent
9894

9995
[Determine the necessary minimum rent by calculating an account's size.](./basics/rent/README.md)
10096

101-
[anchor](./basics/rent/anchor), [native](./basics/rent/native)
97+
[anchor](./basics/rent/anchor) [native](./basics/rent/native)
10298

103-
#### repository-layout
99+
### Laying out larger programs
104100

105101
[Layout larger Solana onchain programs.](./basics/repository-layout/README.md)
106102

107-
[anchor](./basics/repository-layout/anchor), [native](./basics/repository-layout/native)
103+
[anchor](./basics/repository-layout/anchor) [native](./basics/repository-layout/native)
108104

109-
#### transfer-sol
105+
### Transferring SOL
110106

111107
[Send SOL between two accounts.](./basics/transfer-sol/README.md)
112108

113-
[anchor](./basics/transfer-sol/anchor), [native](./basics/transfer-sol/native), [seahorse](./basics/transfer-sol/seahorse)
109+
[anchor](./basics/transfer-sol/anchor) [native](./basics/transfer-sol/native) [seahorse](./basics/transfer-sol/seahorse)
114110

115111
</details>
116112
<details>
117113
<summary>Tokens</summary>
118114

119-
#### create-token
115+
### Creating tokens
120116

121117
[Create a token on Solana with a token symbol and icon.](./tokens/create-token/README.md)
122118

123-
[anchor](./tokens/create-token/anchor), [native](./tokens/create-token/native)
119+
[anchor](./tokens/create-token/anchor) [native](./tokens/create-token/native)
124120

125-
#### escrow
121+
### Minting NFTS
126122

127-
Allow two users to swap digital assets with each other, each getting 100% of what the other has offered due to the power of decentralization!
123+
[Mint an NFT from inside your own onchain program using the Token and Metaplex Token Metadata programs.](./tokens/nft-minter/README.md) Reminder: you don't need your own program just to mint an NFT, see the note at the top of this README.
128124

129-
[anchor](./tokens/escrow/anchor)
125+
[anchor](./tokens/nft-minter/anchor) [native](./tokens/nft-minter/native)
130126

131-
#### nft-minter
127+
### Minting a token from inside a program
132128

133-
[Mint an NFT from inside your own onchain program using the Token and Metaplex Token Metadata programs.](./tokens/nft-minter/README.md) Reminder: you don't need your own program just to mint an NFT, see the note at the top of this README.
129+
[Mint a Token from inside your own onchain program using the Token program.](./tokens/spl-token-minter/README.md) Reminder: you don't need your own program just to mint an NFT, see the note at the top of this README.
134130

135-
[anchor](./tokens/nft-minter/anchor), [native](./tokens/nft-minter/native)
131+
[anchor](./tokens/spl-token-minter/anchor) [native](./tokens/spl-token-minter/native)
136132

137-
#### pda-mint-authority
133+
### Transferring Tokens
138134

139-
[Mint a Token from inside your own onchain program using the Token program.](./tokens/pda-mint-authority/README.md) Reminder: you don't need your own program just to mint an NFT, see the note at the top of this README.
135+
[Transfer tokens between accounts](./tokens/transfer-tokens/README.md)
140136

141-
[anchor](./tokens/pda-mint-authority/anchor), [native](./tokens/pda-mint-authority/native)
137+
[anchor](./tokens/transfer-tokens/anchor) [native](./tokens/transfer-tokens/native) [seahorse](./tokens/transfer-tokens/seahorse)
142138

143-
#### spl-token-minter
139+
### Allowing users to swap digital assets - Escrow
144140

145-
[Mint a Token from inside your own onchain program using the Token program.](./tokens/spl-token-minter/README.md) Reminder: you don't need your own program just to mint an NFT, see the note at the top of this README.
141+
Allow two users to swap digital assets with each other, each getting 100% of what the other has offered due to the power of decentralization!
146142

147-
[anchor](./tokens/spl-token-minter/anchor), [native](./tokens/spl-token-minter/native)
143+
[anchor](./tokens/escrow/anchor)
148144

149-
#### token-swap
145+
### Minting a token from inside a program with a PDA as the mint authority
150146

151-
[Create liquidity pools to allow trading of new digital assets and allows users that provide liquidity to be rewarded by creating an Automated Market Maker.](./tokens/token-swap/README.md)
147+
[Mint a Token from inside your own onchain program using the Token program.](./tokens/pda-mint-authority/README.md) Reminder: you don't need your own program just to mint an NFT, see the note at the top of this README.
152148

153-
[anchor](./tokens/token-swap/anchor)
149+
[anchor](./tokens/pda-mint-authority/anchor) [native](./tokens/pda-mint-authority/native)
154150

155-
#### transfer-tokens
151+
### Creating an Automated Market Maker
156152

157-
[Transfer tokens between accounts](./tokens/transfer-tokens/README.md)
153+
[Create liquidity pools to allow trading of new digital assets and allows users that provide liquidity to be rewarded by creating an Automated Market Maker.](./tokens/token-swap/README.md)
158154

159-
[anchor](./tokens/transfer-tokens/anchor), [native](./tokens/transfer-tokens/native), [seahorse](./tokens/transfer-tokens/seahorse)
155+
[anchor](./tokens/token-swap/anchor)
160156

161157
</details>
162158

163159
<details>
164160

165161
<summary>Token Extensions</summary>
166162

167-
#### basics
163+
### Basics - create token mints, mint tokens, and transfer tokens with Token Extensions
168164

169165
Create token mints, mint tokens, and transferr tokens using Token Extensions.
170166

171167
[anchor](./tokens/token-2022/basics/anchor)
172168

173-
#### cpi-guard
169+
### Preventing CPIs with CPI guard
174170

175171
Enable CPI guard to prevents certain token action from occurring within CPI (Cross-Program Invocation).
176172

177173
[anchor](./tokens/token-2022/cpi-guard/anchor)
178174

179-
#### default-account-state
175+
### Using default account state
180176

181177
Create new token accounts that are frozen by default.
182178

183-
[anchor](./tokens/token-2022/default-account-state/anchor), [native](./tokens/token-2022/default-account-state/native)
179+
[anchor](./tokens/token-2022/default-account-state/anchor) [native](./tokens/token-2022/default-account-state/native)
184180

185-
#### group
181+
### Grouping tokens
186182

187183
Create tokens that belong to larger groups of tokens using the Group Pointer extension.
188184

189185
[anchor](./tokens/token-2022/group/anchor)
190186

191-
#### immutable-owner
187+
### Creating token accounts whose owner cannot be changed
192188

193189
Create tokens whose owning program cannot be changed.
194190

195191
[anchor](./tokens/token-2022/immutable-owner/anchor)
196192

197-
#### interest-bearing
193+
### Interest bearing tokens
198194

199195
Create tokens that show an 'interest' calculation.
200196

201197
[anchor](./tokens/token-2022/interest-bearing/anchor)
202198

203-
#### memo-transfer
199+
### Requiring transactions to include descriptive memos
204200

205201
Create tokens where transfers must have a memo describing the transaction attached.
206202

207203
[anchor](./tokens/token-2022/memo-transfer/anchor)
208204

209-
#### metadata
205+
### Adding on-chain metadata to the token mint
210206

211207
Create tokens that store their onchain metadata inside the token mint, without needing to use or pay for additional programs.
212208

213209
[anchor](./tokens/token-2022/metadata/anchor)
214210

215-
#### mint-close-authority
211+
### Allow a designedated account to close a mint
216212

217213
Allow a designated account to close a Mint.
218214

219-
[anchor](./tokens/token-2022/mint-close-authority/anchor), [native](./tokens/token-2022/mint-close-authority/native)
215+
[anchor](./tokens/token-2022/mint-close-authority/anchor) [native](./tokens/token-2022/mint-close-authority/native)
220216

221-
#### multiple-extensions
217+
### Usng multiple token extensions
222218

223219
Use multiple Token Extensions at once.
224220

225221
[native](./tokens/token-2022/multiple-extensions/native)
226222

227-
#### non-transferable
223+
### Non-transferrable - create tokens that can't be transferred.
228224

229225
Create tokens that cannot be transferred.
230226

231-
[anchor](./tokens/token-2022/non-transferable/anchor), [native](./tokens/token-2022/non-transferable/native)
227+
[anchor](./tokens/token-2022/non-transferable/anchor) [native](./tokens/token-2022/non-transferable/native)
232228

233-
#### permanent-delegate
229+
### Permanent Delegate - Create tokens permanently under the control of a particular account
234230

235231
Create tokens that remain under the control of an account, even when transferred elsewhere.
236232

237233
[anchor](./tokens/token-2022/permanent-delegate/anchor)
238234

239-
#### transfer-fee
235+
### Create tokens with a transfer-fee.
240236

241-
Create tokens
237+
Create tokens with an inbuilt transfer fee.
242238

243-
[anchor](./tokens/token-2022/transfer-fee/anchor), [native](./tokens/token-2022/transfer-fee/native)
239+
[anchor](./tokens/token-2022/transfer-fee/anchor) [native](./tokens/token-2022/transfer-fee/native)
244240

245241
</details>
246242
<details>
247243

248244
<summary>Compression</summary>
249245

250-
#### cnft-burn
246+
### Cnft-burn
251247

252248
Burn compressed NFTs.
253249

254250
[anchor](./compression/cnft-burn/anchor)
255251

256-
#### cnft-vault
252+
### Cnft-vault
257253

258254
Store Metaplex compressed NFTs inside a PDA.
259255

260256
[anchor](./compression/cnft-vault/anchor)
261257

262-
#### cutils
258+
### Cutils
263259

264260
Work with Metaplex compressed NFTs.
265261

@@ -271,32 +267,12 @@ Work with Metaplex compressed NFTs.
271267

272268
<summary>Oracles</summary>
273269

274-
#### pyth
270+
### pyth
275271

276272
Use a data source for offchain data (called an Oracle) to perform activities onchain.
277273

278-
[anchor](./oracles/pyth/anchor), [seahorse](./oracles/pyth/seahorse)
274+
[anchor](./oracles/pyth/anchor) [seahorse](./oracles/pyth/seahorse)
279275

280276
</details>
281277

282-
## Examples We'd Love to See!
283-
284-
- Examples needed for Native:
285-
- Token Extensions
286-
- Examples needed for Anchor:
287-
- Additional Accounts & Resolving Accounts
288-
- Examples needed for Seahorse
289-
- Any existing example missing a `seahorse` folder
290-
- New examples needed for Anchor, Native, Solidity & Seahorse:
291-
- Token lending
292-
- Token swapping
293-
- Escrow
294-
- Staking
295-
- Wrapped tokens
296-
- Pyth
297-
- Clockwork
298-
- VRF
299-
- Any oracle
300-
- Merkle trees (compression)
301-
302278
---

0 commit comments

Comments
 (0)