Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
Start adding PDA
Browse files Browse the repository at this point in the history
  • Loading branch information
urani-engineering-helper authored Mar 27, 2024
1 parent 55131ad commit b8b1f57
Show file tree
Hide file tree
Showing 21 changed files with 24 additions and 64 deletions.
41 changes: 6 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

<br>

* **[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)**

Expand All @@ -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)**


<br>
Expand All @@ -48,29 +42,6 @@

<br>

* **[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)**


<br>

#### Expert

<br>

* **[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)**







Expand Down
30 changes: 18 additions & 12 deletions chapters/03_anchor.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ pub account: AccountType

<br>

#### Errors
----

### Errors

<br>

Expand Down Expand Up @@ -166,6 +168,20 @@ pub enum MyError {

<br>

---

### Privilege Extension

<br>

* 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`.


<br>

----

Expand Down Expand Up @@ -199,22 +215,12 @@ anchor init <workspace-name>

---

### Demo
### Demos

<br>

#### 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).


<br>

#### 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).


<br>

---
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion demos/04_sol_vs_sol/README.md

This file was deleted.

1 change: 0 additions & 1 deletion demos/05_rust/README.md

This file was deleted.

1 change: 0 additions & 1 deletion demos/06_blocks/README.md

This file was deleted.

1 change: 0 additions & 1 deletion demos/07_logs_events_txs/README.md

This file was deleted.

1 change: 0 additions & 1 deletion demos/08_transactions/README.md

This file was deleted.

1 change: 0 additions & 1 deletion demos/09_accounts_and_storage/README.md

This file was deleted.

1 change: 0 additions & 1 deletion demos/10_payment/README.md

This file was deleted.

1 change: 0 additions & 1 deletion demos/11_wallets_to_account/README.md

This file was deleted.

1 change: 0 additions & 1 deletion demos/12_pda/README.md

This file was deleted.

1 change: 0 additions & 1 deletion demos/13_multicall/README.md

This file was deleted.

1 change: 0 additions & 1 deletion demos/14_ownership/README.md

This file was deleted.

1 change: 0 additions & 1 deletion demos/15_delegating/README.md

This file was deleted.

1 change: 0 additions & 1 deletion demos/16_token/README.md

This file was deleted.

1 change: 0 additions & 1 deletion demos/17_security/README.md

This file was deleted.

1 change: 0 additions & 1 deletion demos/18_solana_pay/README.md

This file was deleted.

1 change: 0 additions & 1 deletion demos/19_nft_marketplace/README.md

This file was deleted.

1 change: 0 additions & 1 deletion demos/20_arbitrage/README.md

This file was deleted.

0 comments on commit b8b1f57

Please sign in to comment.