From 97a4c15b7f8e001f6b9f13565a4dbc32827a1ee3 Mon Sep 17 00:00:00 2001 From: Jeff Wood Date: Sat, 24 Aug 2024 03:12:35 +0000 Subject: [PATCH 1/3] Update the Token Extensions Program link --- content/courses/tokens-and-nfts/token-program.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/courses/tokens-and-nfts/token-program.md b/content/courses/tokens-and-nfts/token-program.md index 08794cf32..fdb4b999a 100644 --- a/content/courses/tokens-and-nfts/token-program.md +++ b/content/courses/tokens-and-nfts/token-program.md @@ -28,7 +28,7 @@ description: - Creating Token Mints and Token Accounts requires allocating **rent** in SOL. The rent for a Token Account can be refunded when the account is closed. Additionally, tokens created with the - [Token Extensions Program](/developers/courses/token-extensions-for-mints/close-mint) + [Token Extensions Program](/content/courses/token-extensions/close-mint) can also close Token Mints. ### Lesson From 2ba6531b7f3723321a0b5c1ae8b072add7f9ad54 Mon Sep 17 00:00:00 2001 From: wuuer Date: Fri, 27 Sep 2024 09:59:44 +0800 Subject: [PATCH 2/3] sync token-program.md from main --- content/courses/tokens-and-nfts/token-program.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/courses/tokens-and-nfts/token-program.md b/content/courses/tokens-and-nfts/token-program.md index fdb4b999a..08794cf32 100644 --- a/content/courses/tokens-and-nfts/token-program.md +++ b/content/courses/tokens-and-nfts/token-program.md @@ -28,7 +28,7 @@ description: - Creating Token Mints and Token Accounts requires allocating **rent** in SOL. The rent for a Token Account can be refunded when the account is closed. Additionally, tokens created with the - [Token Extensions Program](/content/courses/token-extensions/close-mint) + [Token Extensions Program](/developers/courses/token-extensions-for-mints/close-mint) can also close Token Mints. ### Lesson From 5394abe99b30c4bd33c1f551b3c00949d7291486 Mon Sep 17 00:00:00 2001 From: wuuer Date: Fri, 27 Sep 2024 10:59:39 +0800 Subject: [PATCH 3/3] Update [stack] and [heap] docs links. Update [reallocate the account] link. Update [clockwork] link. Update [advanced-program-architecture] repo link. --- .../program-optimization/program-architecture.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/content/courses/program-optimization/program-architecture.md b/content/courses/program-optimization/program-architecture.md index f18289284..b47845d64 100644 --- a/content/courses/program-optimization/program-architecture.md +++ b/content/courses/program-optimization/program-architecture.md @@ -61,9 +61,9 @@ we are going to be looking at in this section: introduce you to the concept of data sizes here. 2. When operating on larger data, we run into - [Stack](https://solana.com/docs/onchain-programs/faq#stack) and - [Heap](https://solana.com/docs/onchain-programs/faq#heap-size) constraints - - to get around these, we’ll look at using Box and Zero-Copy. + [Stack](https://solana.com/docs/programs/faq#stack) and + [Heap](https://solana.com/docs/programs/faq#heap-size) constraints - to get + around these, we’ll look at using Box and Zero-Copy. #### Sizes @@ -402,7 +402,7 @@ In this simple game state, a character has `health`, `mana`, and an event log. If at some point you are making game improvements and want to add an `experience` field, you'd hit a snag. The `experience` field should be a number like a `u64`, which is simple enough to add. You can -[reallocate the account](/developers/courses/onchain-development/anchor-pdas) +[reallocate the account](/content/courses/onchain-development/anchor-pdas.md) and add space. However, to keep dynamic length fields, like `event_log`, at the end of the @@ -424,7 +424,7 @@ reserves some bytes where you expect to need them most. pub struct GameState { //V1 pub health: u64, pub mana: u64, - pub for_future_use: [u8; 128], + pub for_future_use: [u8; 128], pub event_log: Vec } ``` @@ -761,7 +761,7 @@ we keep an internal tally of how many lamports need to be redeemed, ie be transferred from the PDA to the community wallet at a later time. At some point in the future, the community wallet will go around and clean up all the straggling lamports (probably a good job for -[clockwork](https://www.clockwork.xyz/)). It’s important to note that anyone +[clockwork](https://docs.clockwork.xyz/)). It’s important to note that anyone should be able to sign for the redeem function, since the PDA has permission over itself. @@ -787,7 +787,7 @@ code to experiment a little. You can change existing values, try to break the program, and generally try to understand how everything works. You can fork and/or clone -[this program from Github](https://github.com/Unboxed-Software/advanced-program-architecture.git) +[this program from Github](https://github.com/ASCorreia/advanced-program-architecture.git) to get started. Before building and running the test suite, remember to update the `lib.rs` and `Anchor.toml` with your local program ID. @@ -1659,7 +1659,7 @@ may feel complex for what it's doing. That's because we're generating some new accounts to show that anyone could call the redeem function `depositActionPoints`. We use names like `clockwork` for these because if this game were running continuously, it probably makes sense to use something like -[clockwork](https://www.clockwork.xyz/) cron jobs. +[clockwork](https://docs.clockwork.xyz/) cron jobs. ```typescript it("Deposit Action Points", async () => {