diff --git a/README.md b/README.md index 90439cef..3b6366c6 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,11 @@
-* **[1. Introduction to the Solana Blockchain](chapters/01_intro.md)** -* **[2. Setup a Developing Environment](chapters/02_dev_env.md)** -* **[3. Mastering the Anchor Framework](chapters/03_anchor.md)** -* **[4. Mastering Solana Frontend](chapters/04_frontend.md)** -* **[5. In-Depth Solana Programs, PDA, CPI](chapters/05_programs_in_depth.md)** +* **[1. Solana Blockchain Overview](chapters/01_intro.md)** +* **[2. Setup a Dev Environment](chapters/02_dev_env.md)** +* **[3. Mastering Anchor and CPI](chapters/03_anchor.md)** +* **[4. Program Derived Addresses](chapters/04_program_derived_addresses.md)** +* **[5. Mastering Solana Frontend](chapters/05_frontend.md)** * **[6. Mastering Transfer Hooks](chapters/06_transfer_hooks.md)** * **[7. Additional Resources](chapters/07_additional_resources.md)** @@ -33,13 +33,7 @@ * **[Demo 1: Hello World](demos/01_hello_world)** * **[Demo 2. Anchor and CPI](demos/02_anchor_cpi)** -* **[Demo 3. Anchor and PDA](demos/03_anchor_pda)** -* **[Demo 4. Solidity vs. Solana](demos/04_sol_vs_sol)** -* **[Demo 5. Rust, Structs, Custom Derive Macros](demos/05_rust)** -* **[Demo 6. Block Variables, Sysvars](demos/06_blocks)** -* **[Demo 7. Logs, Events, Transactions](demos/07_logs_events_txs)** -* **[Demo 8. Transaction Fees and Compute Units](demos/08_transactions)** -* **[Demo 9. Accounts and Storage](demos/09_accounts_and_storage)** +* **[Demo 3. Program Derived Addresses](demos/03_pda)**
@@ -48,29 +42,6 @@
-* **[10. Token Transfer and Payment](demos/10_payment)** -* **[11. Authorizing Wallets to Accounts](demos/11_wallets_to_account)** -* **[12. PDA and Keypar Accounts](demos/12_pda)** -* **[13. Multicall and Batching Transactions](demos/13_multicall)** -* **[14. Owner and Authority](demos/14_ownership)** -* **[15. Delegating Accounts](demos/15_delegating)** - - -
- -#### Expert - -
- -* **[16. Build a Solana Token](demos/16_token)** -* **[17. Security](demos/17_security)** -* **[18. Solana Pay](demos/18_solana_pay)** -* **[19. Implement a NFT Marketplace](demos/19_nft_marketplace)** -* **[20. Implement Arbitrage](demos/20_arbitrage)** - - - - diff --git a/chapters/03_anchor.md b/chapters/03_anchor.md index f1b00090..53b663e0 100644 --- a/chapters/03_anchor.md +++ b/chapters/03_anchor.md @@ -134,7 +134,9 @@ pub account: AccountType
-#### Errors +---- + +### Errors
@@ -166,6 +168,20 @@ pub enum MyError {
+--- + +### Privilege Extension + +
+ +* CPIs extend the privileges of the caller to the callee. + +* Privilege extension can be dangerous. If a CPI is made by a malicious program, the program has the same privileges as the caller. + +* Anchor protects your code from CPIs to malicious programs by the `Program<'info, T>` type check being given to the account is the expected program `T`. + + +
---- @@ -199,22 +215,12 @@ anchor init --- -### Demo +### Demos
-#### CPI - * Learn how cross-program instructions work on Anchor through [demo 2](https://github.com/urani-labs/solana-dev-onboarding-rs/tree/main/demos/02_anchor_cpi). - -
- -#### PDA - -* Learn how program-derived-addresses work on Anchor through [demo 3](https://github.com/urani-labs/solana-dev-onboarding-rs/tree/main/demos/03_anchor_pda). - -
--- diff --git a/chapters/05_programs_in_depth.md b/chapters/04_program_derived_addresses.md similarity index 100% rename from chapters/05_programs_in_depth.md rename to chapters/04_program_derived_addresses.md diff --git a/chapters/04_frontend.md b/chapters/05_frontend.md similarity index 100% rename from chapters/04_frontend.md rename to chapters/05_frontend.md diff --git a/demos/04_sol_vs_sol/README.md b/demos/04_sol_vs_sol/README.md deleted file mode 100644 index f52def7b..00000000 --- a/demos/04_sol_vs_sol/README.md +++ /dev/null @@ -1 +0,0 @@ -# 🛹 Solidity vs. Solana [IN CONSTRUCTION] \ No newline at end of file diff --git a/demos/05_rust/README.md b/demos/05_rust/README.md deleted file mode 100644 index 34720a00..00000000 --- a/demos/05_rust/README.md +++ /dev/null @@ -1 +0,0 @@ -# 🛹 Rust, Structs, Custom Derive Macros [IN CONSTRUCTION] \ No newline at end of file diff --git a/demos/06_blocks/README.md b/demos/06_blocks/README.md deleted file mode 100644 index 63e555e2..00000000 --- a/demos/06_blocks/README.md +++ /dev/null @@ -1 +0,0 @@ -# 🛹 Block Variables, Sysvars [IN CONSTRUCTION] \ No newline at end of file diff --git a/demos/07_logs_events_txs/README.md b/demos/07_logs_events_txs/README.md deleted file mode 100644 index fa4e9b8f..00000000 --- a/demos/07_logs_events_txs/README.md +++ /dev/null @@ -1 +0,0 @@ -# 🛹 Logs, Events, Transactions [IN CONSTRUCTION] \ No newline at end of file diff --git a/demos/08_transactions/README.md b/demos/08_transactions/README.md deleted file mode 100644 index c7aef5ad..00000000 --- a/demos/08_transactions/README.md +++ /dev/null @@ -1 +0,0 @@ -# 🛹 Transaction Fees and Compute Units [IN CONSTRUCTION] diff --git a/demos/09_accounts_and_storage/README.md b/demos/09_accounts_and_storage/README.md deleted file mode 100644 index fe1efb33..00000000 --- a/demos/09_accounts_and_storage/README.md +++ /dev/null @@ -1 +0,0 @@ -# 🛹 Accounts and Storage [IN CONSTRUCTION] \ No newline at end of file diff --git a/demos/10_payment/README.md b/demos/10_payment/README.md deleted file mode 100644 index 502059c4..00000000 --- a/demos/10_payment/README.md +++ /dev/null @@ -1 +0,0 @@ -# 🛹 Token Transfer and Payment [IN CONSTRUCTION] diff --git a/demos/11_wallets_to_account/README.md b/demos/11_wallets_to_account/README.md deleted file mode 100644 index bc9c96a8..00000000 --- a/demos/11_wallets_to_account/README.md +++ /dev/null @@ -1 +0,0 @@ -# 🛹 Authorizing Wallets to Accounts [IN CONSTRUCTION] \ No newline at end of file diff --git a/demos/12_pda/README.md b/demos/12_pda/README.md deleted file mode 100644 index 6f385be4..00000000 --- a/demos/12_pda/README.md +++ /dev/null @@ -1 +0,0 @@ -# 🛹 PDA and Keypar Accounts [IN CONSTRUCTION] \ No newline at end of file diff --git a/demos/13_multicall/README.md b/demos/13_multicall/README.md deleted file mode 100644 index 2563367a..00000000 --- a/demos/13_multicall/README.md +++ /dev/null @@ -1 +0,0 @@ -# 🛹 Multicall and Batching Transactions [IN CONSTRUCTION] \ No newline at end of file diff --git a/demos/14_ownership/README.md b/demos/14_ownership/README.md deleted file mode 100644 index 50ed1b73..00000000 --- a/demos/14_ownership/README.md +++ /dev/null @@ -1 +0,0 @@ -# 🛹 Owner and Authority [IN CONSTRUCTION] \ No newline at end of file diff --git a/demos/15_delegating/README.md b/demos/15_delegating/README.md deleted file mode 100644 index 44082969..00000000 --- a/demos/15_delegating/README.md +++ /dev/null @@ -1 +0,0 @@ -# 🛹 Delegating Accounts [IN CONSTRUCTION] \ No newline at end of file diff --git a/demos/16_token/README.md b/demos/16_token/README.md deleted file mode 100644 index bcdc87d0..00000000 --- a/demos/16_token/README.md +++ /dev/null @@ -1 +0,0 @@ -# 🛹 Build a Solana Token \ No newline at end of file diff --git a/demos/17_security/README.md b/demos/17_security/README.md deleted file mode 100644 index 32a78178..00000000 --- a/demos/17_security/README.md +++ /dev/null @@ -1 +0,0 @@ -# 🛹 Security [IN CONSTRUCTION] \ No newline at end of file diff --git a/demos/18_solana_pay/README.md b/demos/18_solana_pay/README.md deleted file mode 100644 index cbf95049..00000000 --- a/demos/18_solana_pay/README.md +++ /dev/null @@ -1 +0,0 @@ -# 🛹 Solana Pay [IN CONSTRUCTION] \ No newline at end of file diff --git a/demos/19_nft_marketplace/README.md b/demos/19_nft_marketplace/README.md deleted file mode 100644 index 76f63a3f..00000000 --- a/demos/19_nft_marketplace/README.md +++ /dev/null @@ -1 +0,0 @@ -# 🛹 Implement a NFT Marketplace [IN CONSTRUCTION] diff --git a/demos/20_arbitrage/README.md b/demos/20_arbitrage/README.md deleted file mode 100644 index 001d9685..00000000 --- a/demos/20_arbitrage/README.md +++ /dev/null @@ -1 +0,0 @@ -# 🛹 Implement Arbitrage [IN CONSTRUCTION] \ No newline at end of file