Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Commit

Permalink
prettier:fix
Browse files Browse the repository at this point in the history
  • Loading branch information
brimigs committed Jan 6, 2025
1 parent 9f4940b commit fae227d
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 78 deletions.
37 changes: 37 additions & 0 deletions docs/toolkit/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,40 @@ solana logs

For a more information, read this
[Solana Test Validator Guide](https://solana.com/developers/guides/getstarted/solana-test-validator).

### Account Management

View the pubkey of your configured CLI keypair:

```shell
solana address
```

View the current balance of your keypair:

```shell
solana balance
```

To add SOL to your CLI keypair, request an airdrop:

```shell
solana airdrop 10
```

To retrieve details about any account, such as its balance and owner:

```shell
solana account <ACCOUNT_ADDRESS>
```

You must first add SOL to an account for it to exist. This airdrop command
requests 2 SOL to the specified account address:

```shell
solana airdrop 2 <ACCOUNT_ADDRESS>
```

Aside from "wallet accounts" that only hold SOL, accounts are normally created
by smart contracts (aka programs) so they can store the `data` desired by that
program.
80 changes: 2 additions & 78 deletions docs/toolkit/local-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ testnet or mainnet. If you have the Solana CLI tool suite already installed, you
can run the test validator with the following command:

```shell
solana-test-validator
mucho test-validator
```

### Advantages
Expand All @@ -23,56 +23,17 @@ solana-test-validator
- Ability to load accounts from files
- Configurable transaction history retention
- Configurable epoch length
- Installation #

Since the `solana-test-validator` is part of the Solana CLI tool suite, ensure
you have Solana's command-line tools installed. You can install the entire
Solana toolkit (which includes the Solana CLI) using the following command:

```shell
npx solana install
```

Or install just the Solana CLI with:

```shell
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"
```

You can replace `stable` with the release tag matching the software version of
your desired release (i.e. `v1.18.12`), or use one of the three symbolic channel
names: `stable`, `beta`, or `edge`.

### Starting the Test Validator

To start your local validator, simply run:

```shell
solana-test-validator
mucho test-validator
```

This command initializes a new ledger and starts the validator.

### Interacting with a Running Test Validator

Once you have the `solana-test-validator` up and running, you can interact with
it using various Solana CLI commands. These commands let you deploy programs,
manage accounts, send transactions, and much more. Below is a detailed guide on
the key commands you will use.

Check your current CLI configuration to see which network you are selected too:

```shell
solana config get
```

If needed update your Solana configuration to connect to your test validator
running on localhost:

```shell
solana config set --url localhost
```

### Checking the Status of the Test Validator

Before interacting with the test validator, it's useful to confirm its status
Expand All @@ -85,43 +46,6 @@ solana ping
This command pings the local test validator and returns the current blockhash
and latency, verifying that it is active.

### Account Management

View the pubkey of your configured CLI keypair:

```shell
solana address
```

View the current balance of your keypair:

```shell
solana balance
```

To add SOL to your CLI keypair, request an airdrop:

```shell
solana airdrop 10
```

To retrieve details about any account, such as its balance and owner:

```shell
solana account <ACCOUNT_ADDRESS>
```

You must first add SOL to an account for it to exist. This airdrop command
requests 2 SOL to the specified account address:

```shell
solana airdrop 2 <ACCOUNT_ADDRESS>
```

Aside from "wallet accounts" that only hold SOL, accounts are normally created
by smart contracts (aka programs) so they can store the `data` desired by that
program.

### Deploying and Managing Programs

To deploy a compiled program (BPF) to the test validator:
Expand Down

0 comments on commit fae227d

Please sign in to comment.