Skip to content

Commit

Permalink
Merge branch 'solana-foundation:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
shivaji43 authored Oct 11, 2024
2 parents bd291bb + 91ec3d1 commit 190d59a
Show file tree
Hide file tree
Showing 153 changed files with 14,343 additions and 12,547 deletions.
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.github/*.md
.github/*.md
CODEOWNERS
3 changes: 2 additions & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# This is a comment.
# Each line is a file pattern followed by one or more owners.

# These global owners will be the default owners for everything in
Expand All @@ -9,3 +8,5 @@
# This list owns any file in the `/docs` directory in the root of
# the repository and any of its subdirectories.
# /docs/ @nickfrosty

/content/courses/ @mikemaccana
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ In particular:
have `instruction handlers` that process `instructions`. Do not refer to
[instruction handlers](https://solana.com/docs/terminology#instruction-handler)
as instructions! The reason is simple: an instruction cannot process an
instruction. The `multiple` template in Anchor also calls the functions
`handler`.
instruction. The `multiple` template in Anchor also calls these functions
`handler`s.

### Code

Expand Down Expand Up @@ -185,7 +185,7 @@ yarn prettier
ask them to run `anchor keys sync`.

- Use the
[multiple files template](https://www.anchor-lang.com/docs/release-notes#multiple-files-template)
[multiple files template](https://www.anchor-lang.com/release-notes/0.29.0#multiple-files-template)
to organize very large Anchor projects.

### Heading styles
Expand Down Expand Up @@ -236,8 +236,8 @@ The heading above is invalid since it skips the `h3` heading (`###`)
### Links

When linking to other developer content pages (i.e. docs, guides, etc) or
images, the markdown link should be use the absolute path to the file relative
to the repo root. Including the file extension.
images, the markdown link should use the absolute path to the file relative to
the repo root. Include the file extension.

For example: `/docs/index.md` (good) vs `https://solana.com/docs` (bad)

Expand Down
32 changes: 32 additions & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,35 @@ translated content from Crowdin.
It will first upload all the new content in the base language (i.e. when a page
gets edited or newly created), then download all translations for all languages.
The `deploy` action will then continue to build the content api normally.

### Testing and fixing broken translation files

Crowdin will often return altered and incorrectly formatted content files back
when performing `crowdin download`. It may be helpful (and faster) to work with
a single content file at a time by altering the content locally, uploading it to
Crowdin, the downloading the Crowdin-altered version to see if the changes will
actually work and not break the site.

To upload single content file to Crowdin specify the source path (`-s` flag) and
the translation path (`-t` flag). Be sure to include the `%locale%` wildcard in
the translation path:

```shell
yarn crowdin upload -s docs/intro/installation.md -t i18n/%locale%/docs/intro/installation.md
```

To download the Crowdin formatted content, download the entire locale using the
`-l` flag and passing the locale short code. For example, downloading only the
German (DE) translated content:

```shell
yarn crowdin download -l de
```

It may be helpful to also run the prettier formatter on the translation files,
since this is normally performed by a GitHub action on deployment to catch and
fix many formatting issues that Crowdin causes due to altering content:

```shell
yarn prettier:i18n
```
3 changes: 2 additions & 1 deletion content/cookbook/development/start-local-validator.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Testing your program code locally can be a lot more reliable than testing on
devnet, and can help you test before trying it out on devnet.

You can setup your local-test-validator by installing the
[solana tool suite](/getting-started/installation.md#install-cli) and running
[Solana CLI tool suite](/docs/intro/installation.md) and running the following
command:

```shell
solana-test-validator
Expand Down
6 changes: 3 additions & 3 deletions content/cookbook/index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
sidebarSortOrder: 0
title: Solana Cookbook
seoTitle: Code examples for Solana development
seoTitle: Solana Cookbook - Code examples for Solana development
description:
"The Solana cookbook is a collection of useful examples and references for
building on Solana"
"The Solana Cookbook is a collection of code snippets, useful examples, and
references for building on Solana."
---

The _Solana Cookbook_ is a developer resource that provides examples and
Expand Down
2 changes: 2 additions & 0 deletions content/cookbook/tokens/create-mint-account.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: How to Create a Token
sidebarSortOrder: 1
description: "Learn how to create tokens on Solana."
altRoutes:
- /developers/cookbook/tokens
---

Creating tokens is done by creating what is called a "mint account". This mint
Expand Down
6 changes: 3 additions & 3 deletions content/cookbook/tokens/manage-wrapped-sol.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ and creating token accounts specifically on the `NATIVE_MINT` address.

## Create Token Account

Like
[Create Token Account](#https://solana.com/developers/cookbook/tokens/create-token-accounts)
but replace mint with `NATIVE_MINT`
Like creating
[SPL token accounts](/content/cookbook/tokens/create-token-account.md) but
replace mint with `NATIVE_MINT`

```js
import { NATIVE_MINT } from "@solana/spl-token";
Expand Down
2 changes: 1 addition & 1 deletion content/cookbook/transactions/add-priority-fees.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Units (CU) \* number of instructions, with a max of 1.4M CU. The Base Fee is
5,000 Lamports per signature. A microLamport is 0.000001 Lamports.

> You can find a detailed guide here on
> [how to use priority fees](https://solana.com/developers/guides/advanced/how-to-use-priority-fees).
> [how to use priority fees](/content/guides/advanced/how-to-use-priority-fees.md).
The total compute budget or Prioritization Fee for a single TX can be changed by
adding instructions from the ComputeBudgetProgram.
Expand Down
3 changes: 1 addition & 2 deletions content/cookbook/transactions/calculate-cost.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ description:
The number of signatures a transaction requires are used to calculate the
transaction cost. As long as you are not creating an account, this will be the
base transaction cost. To find out more about costs to create an account, check
out
[calculating rent costs](https://solana.com/developers/cookbook/accounts/calculate-rent).
out [calculating rent costs](/content/cookbook/accounts/calculate-rent.md).

```typescript filename="calculate-cost.ts"
import {
Expand Down
6 changes: 3 additions & 3 deletions content/cookbook/transactions/optimize-compute.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ the transaction is both processed in a timely manner as well as to avoid paying
too much in priority fees.

For more information about requesting optimal compute,
[check out the full guide](https://solana.com/developers/guides/advanced/how-to-request-optimal-compute).
[check out the full guide](/content/guides/advanced/how-to-request-optimal-compute.md).
You can also find more information about
[using priority fees](https://solana.com/developers/guides/advanced/how-to-use-priority-fees)
in this detailed guide.
[using priority fees](/content/guides/advanced/how-to-use-priority-fees.md) in
this detailed guide.

```typescript filename="optimize-compute.ts"
// import { ... } from "@solana/web3.js"
Expand Down
2 changes: 1 addition & 1 deletion content/cookbook/wallets/connect-wallet-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description:
Solana's [wallet-adapter](https://github.com/anza-xyz/wallet-adapter) library
make it easy to manage wallet connections client-side. For a full length guide,
check out
[how to add wallet-adapter to nextjs](https://solana.com/developers/guides/wallets/add-solana-wallet-adapter-to-nextjs).
[how to add wallet-adapter to nextjs](/content/guides/wallets/add-solana-wallet-adapter-to-nextjs.md).

## How to Connect to a Wallet with React

Expand Down
2 changes: 1 addition & 1 deletion content/cookbook/wallets/generate-vanity-address.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ key more easily identifiable.
**Note**: The more characters in your vanity address, the longer it will take.

You can generate a vanity address using the
[Solana CLI](https://docs.solanalabs.com/cli):
[Solana CLI](/docs/intro/installation.md):

```bash
solana-keygen grind --starts-with e1v1s:1
Expand Down
3 changes: 0 additions & 3 deletions content/courses/connecting-to-offchain-data/metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,3 @@ lessons:
- oracles
- verifiable-randomness-functions
priority: 20
# Uses out of date repos
# TODO: Superteam to update
isHidden: true
Loading

0 comments on commit 190d59a

Please sign in to comment.