Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs fix spelling issues #3502

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
- TypeScript package for generating clients from IDL
- CLI and workspace management for developing complete applications

If you're familiar with developing in Ethereum's [Solidity](https://docs.soliditylang.org/en/v0.7.4/), [Truffle](https://www.trufflesuite.com/), [web3.js](https://github.com/ethereum/web3.js), then the experience will be familiar. Although the DSL syntax and semantics are targeted at Solana, the high level flow of writing RPC request handlers, emitting an IDL, and generating clients from IDL is the same.
If you're familiar with developing in Ethereum's [Solidity](https://docs.soliditylang.org/en/v0.7.4/), [Truffle](https://www.trufflesuite.com/), [web3.js](https://github.com/ethereum/web3.js), then the experience will be familiar. Although the DSL syntax and semantics are targeted at Solana, the high-level flow of writing RPC request handlers, emitting an IDL, and generating clients from IDL is the same.

## Getting Started

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/docs/contribution-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ and engage with the maintainers in [Discord](https://discord.gg/NHHGSXAnXk).

If you'd like to contribute, please claim an issue by commenting, forking, and
opening a pull request, even if empty. This allows the maintainers to track who
is working on what issue as to not overlap work.
is working on what issue so as to not overlap work.

## Issue Guidelines

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/docs/pdas.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ A subtle result of this hashmap structure is enforced uniqueness. When `init` is
Creating PDAs requires them to sign the `createAccount` CPI of the system program. How does that work?

PDAs are not public keys so it's impossible for them to sign anything. However, PDAs can still pseudo sign CPIs.
In anchor, to sign with a pda you have to change `CpiContext::new(cpi_program, cpi_accounts)` to `CpiContext::new_with_signer(cpi_program, cpi_accounts, seeds)` where the `seeds` argument are the seeds _and_ the bump the PDA was created with.
In anchor, to sign with a pda you have to change `CpiContext::new(cpi_program, cpi_accounts)` to `CpiContext::new_with_signer(cpi_program, cpi_accounts, seeds)` where the `seeds` argument is the seeds _and_ the bump the PDA was created with.
When the CPI is invoked, for each account in `cpi_accounts` the Solana runtime will check whether`hash(seeds, current_program_id) == account address` is true. If yes, that account's `is_signer` flag will be turned to true.
This means a PDA derived from some program X, may only be used to sign CPIs that originate from that program X. This means that on a high level, PDA signatures can be considered program signatures.

Expand Down
4 changes: 2 additions & 2 deletions docs/src/pages/release-notes/0.29.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Release Notes 0.29.0
description: Anchor - Release Notes 0.29.0
---

Anchor keeps a [CHANGELOG](https://github.com/coral-xyz/anchor/blob/master/CHANGELOG.md) but it's not easy to make sense what has changed, what effect does the change have and how to migrate. This is where release notes comes in, an easy to digest and actionable view for each release.
Anchor keeps a [CHANGELOG](https://github.com/coral-xyz/anchor/blob/master/CHANGELOG.md) but it's not easy to make sense what has changed, what effect does the change has and how to migrate. This is where release notes comes in, an easy to digest and actionable view for each release.

---

Expand All @@ -27,7 +27,7 @@ Anchor keeps a [CHANGELOG](https://github.com/coral-xyz/anchor/blob/master/CHANG

## Solana `1.14` is no longer supported

Minimum supported Solana version is now `1.16.0` because
The minimum supported Solana version is now `1.16.0` because

- All clusters including mainnet-beta are now running `^1.16`
- There is a [compatibility issue](https://github.com/solana-labs/solana/issues/31960) between `1.14` and `1.16`
Expand Down
6 changes: 3 additions & 3 deletions docs/src/pages/release-notes/0.30.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ solana-install init 1.18.8

## IDL

The IDL type specification and generation has been rewritten. To keep the release notes short, we won't go over the changes here, but see [this](https://github.com/coral-xyz/anchor/pull/2824) if you'd like to learn more.
The IDL type specification and generation have been rewritten. To keep the release notes short, we won't go over the changes here, but see [this](https://github.com/coral-xyz/anchor/pull/2824) if you'd like to learn more.

### `idl-build` feature

Expand All @@ -60,7 +60,7 @@ Note that all crates that you use to generate type definitions for the IDL need

### Dependency free program declaration

Depending on other crates who used different versions of Anchor is not the best experience, to say the least. To solve this problem, program clients can now be generated from their IDL using the new `declare_program!` macro:
Depending on other crates that used different versions of Anchor is not the best experience, to say the least. To solve this problem, program clients can now be generated from their IDL using the new `declare_program!` macro:

```rs
declare_program!(program_name);
Expand Down Expand Up @@ -95,7 +95,7 @@ There are new account constraints for [Token Extensions (Token 2022)](https://so
- `authority`
- `program_id`

**Note:** Above values are concatinated with `::` (similar to other Anchor constraints) and have `extensions` prefix e.g. `extensions::group_pointer::authority = <EXPR>`.
**Note:** Above values are concatenated with `::` (similar to other Anchor constraints) and have `extensions` prefix e.g. `extensions::group_pointer::authority = <EXPR>`.

These constraints can be used both with or without the `init` constraint.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/release-notes/0.30.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ In this release, file system related errors also include the path of the file.

[`declare_program!`](https://www.anchor-lang.com/release-notes/0.30.0#dependency-free-program-declaration) macro can now be used with legacy IDLs (pre Anchor v0.30).

This works great as long as the program can be described correctly with the legacy IDL spec. However, if a program uses non-default features such as zero copy, or `repr` modifications, the declaration of the program either won't compile, or will be invalid. There are two main solutions in this scenerio:
This works great as long as the program can be described correctly with the legacy IDL spec. However, if a program uses non-default features such as zero copy, or `repr` modifications, the declaration of the program either won't compile, or will be invalid. There are two main solutions in this scenario:

- Use the `idl convert` command, and manually fix the invalid parts
- Generate the program's IDL by upgrading the program to Anchor v0.30
Expand Down