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

Remove pa #694

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
refactor: mucho global
nickfrosty committed Jan 9, 2025
commit 02e02481343eb5b7dcc96b475410b7f1830d60c8
5 changes: 4 additions & 1 deletion docs/toolkit/getting-started.md
Original file line number Diff line number Diff line change
@@ -26,6 +26,9 @@ This will install the latest versions of the following:
- [Solana CLI / Agave Tool Suite](https://docs.anza.xyz/cli/): A command line
tool that allows developers to interact with the Solana blockchain, manage
accounts, send transactions, and deploy programs.
- [Mucho CLI](https://github.com/solana-developers/mucho) - a superset of
popular developer tools within the Solana ecosystem used to simplify the
development and testing of Solana blockchain programs.
- [Rust](https://doc.rust-lang.org/book/): The programming language that Solana
Smart Contracts are written in.
- [Anchor](https://www.anchor-lang.com/): A framework for writing Solana
@@ -77,7 +80,7 @@ solana config set --url localhost
To test locally, you must also spin up a local node to run on your localhost:

```shell
npx mucho validator
mucho validator
```

For a more information, read the
33 changes: 20 additions & 13 deletions docs/toolkit/local-validator.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Running a Local Solana Validator Network
sidebarSortOrder: 5
sidebarSortOrder: 4
sidebarLabel: Local Validator
---

@@ -18,9 +18,16 @@ If you have the Solana CLI tool suite already installed, you can run the test
validator with the following command:

```shell
npx mucho validator --help
mucho validator --help
```

> Install the [Solana Toolkit](/docs/toolkit/getting-started#installation) by
> running the following command:
>
> ```shell
> npx mucho install
> ```
## Advantages
- Ability to reset the blockchain state at any moment
@@ -39,7 +46,7 @@ npx mucho validator --help
To start your local validator, simply run:
```shell
npx mucho validator
mucho validator
```
This command initializes a new ledger and starts the local validator running at
@@ -143,7 +150,7 @@ This streams log messages from the validator.
View all the configuration options available for the Solana test validator:

```shell
npx mucho validator --help
mucho validator --help
```

## Local Ledger
@@ -157,7 +164,7 @@ When starting the test validator, you can specify a different directory for the
ledger data using the `--ledger` option:

```shell
npx mucho validator --ledger /path/to/custom/ledger
mucho validator --ledger /path/to/custom/ledger
```

## Resetting the Ledger
@@ -167,7 +174,7 @@ reset the ledger, you can either manually delete the ledger directory or restart
the validator with the `--reset` flag:

```shell
npx mucho validator --reset
mucho validator --reset
```

If the ledger exists, this command will reset the ledger to genesis, which
@@ -182,15 +189,15 @@ programs that already exist on any other cluster.
To clone an account from another cluster:

```shell
npx mucho validator --reset \
mucho validator --reset \
--url CLUSTER_PROGRAM_IS_DEPLOYED_TO \
--clone PROGRAM_ADDRESS
```

To clone an upgradeable program and its executable data from another cluster:

```shell
npx mucho validator --reset \
mucho validator --reset \
--url CLUSTER_PROGRAM_IS_DEPLOYED_TO \
--clone-upgradeable-program PROGRAM_ADDRESS
```
@@ -206,7 +213,7 @@ account with a new ledger from any other network cluster.
To clone an account from the cluster when a ledger already exists:

```shell
npx mucho validator --reset \
mucho validator --reset \
--url CLUSTER_PROGRAM_IS_DEPLOYED_TO \
--clone ACCOUNT_ADDRESS
```
@@ -225,7 +232,7 @@ solana account ACCOUNT_ADDRESS --output json --output-file account_state.json
Then load this state each time you reset the validator:

```shell
npx mucho validator --reset \
mucho validator --reset \
--account ACCOUNT_ADDRESS account_state.json
```

@@ -253,14 +260,14 @@ To deactivate specific features in genesis:
> working directory you must add the `--reset` flag to reset to genesis.
```shell
npx mucho validator --reset \
mucho validator --reset \
--deactivate-feature <FEATURE_PUBKEY>
```

To deactivate multiple features in genesis:

```shell
npx mucho validator --reset \
mucho validator --reset \
--deactivate-feature <FEATURE_PUBKEY_1> <FEATURE_PUBKEY_2>
```

@@ -269,7 +276,7 @@ npx mucho validator --reset \
To check your current `solana-test-validator` version:

```shell
npx mucho validator --version
mucho validator --version
```

Your test validator runs on the same version as the Solana CLI installed and
14 changes: 11 additions & 3 deletions docs/toolkit/test-suite/basics.md
Original file line number Diff line number Diff line change
@@ -8,16 +8,24 @@ sidebarSortOrder: 2
> still a WIP. Please post all feedback as a GitHub issue
> [here](https://github.com/solana-foundation/developer-content/issues/new?title=%5Btoolkit%5D%20).
## Installation

Install the Solana Toolkit by running the following command:

```shell
npx mucho install
```

## Build

```shell
npx mucho build
mucho build
```

## Start Localnet

```shell
npx mucho validator
mucho validator
```

## Run Tests
@@ -37,7 +45,7 @@ cargo test
## Deploy

```shell
npx solana deploy
mucho deploy
```

For more information on local validator customization and commands, read the
2 changes: 1 addition & 1 deletion docs/toolkit/test-suite/code-coverage.md
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ sidebarLabel: Code Coverage
> [here](https://github.com/solana-foundation/developer-content/issues/new?title=%5Btoolkit%5D%20).
```shell
npx mucho coverage
mucho coverage
```

## Overview
2 changes: 1 addition & 1 deletion docs/toolkit/test-suite/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Test Suite
sidebarSortOrder: 4
sidebarSortOrder: 5
metaOnly: true
---
2 changes: 1 addition & 1 deletion docs/toolkit/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ When diagnosing problems with Solana development, you can easily gather loads of
troubleshooting information with the following command:

```shell
npx mucho info
mucho info
```

## Solana Stack Exchange