Skip to content

Commit

Permalink
Update intro-to-anchor.md (#605)
Browse files Browse the repository at this point in the history
Updated local-setup button to work, currently takes you to dead link.

Also updated Header's 
"Add constraints with #[account(..)] "
and
"#[account] "

As they both didn't work on the side bar.
  • Loading branch information
Frostist authored Nov 14, 2024
1 parent ccc3a85 commit 333ef60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions content/courses/onchain-development/intro-to-anchor.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ description: "Create your first Solana onchain program in Anchor."
## Lesson

Before we begin, make sure you have Anchor installed. You can follow this lesson
on [local-setup](/content/onchain-development/local-setup.md).
on [local-setup](/developers/courses/onchain-development/local-setup.md).

Solana's capacity to execute arbitrary code is a key part of its power. Solana
programs, (sometimes called "smart contracts"), are the very foundation of the
Expand Down Expand Up @@ -305,7 +305,7 @@ account_info.key == expected_program
account_info.executable == true
```

### Add constraints with `#[account(..)]`
### Add constraints with Account

The `#[account(..)]` attribute macro is used to apply constraints to accounts.
We'll go over a few constraint examples in this and future lessons, but at some
Expand Down Expand Up @@ -354,7 +354,7 @@ pub user: Signer<'info>,
Note that the `init` constraint placed on `account_name` automatically includes
a `mut` constraint so that both `account_name` and `user` are mutable accounts.

### `#[account]`
### Account

The `#[account]` attribute is applied to structs representing the data structure
of a Solana account. It implements the following traits:
Expand Down

0 comments on commit 333ef60

Please sign in to comment.