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

Commit

Permalink
refactor: mucho global
Browse files Browse the repository at this point in the history
  • Loading branch information
nickfrosty committed Jan 9, 2025
1 parent 8b9ef2c commit 02e0248
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 20 deletions.
5 changes: 4 additions & 1 deletion docs/toolkit/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
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
---

Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
```
Expand All @@ -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
```
Expand All @@ -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
```

Expand Down Expand Up @@ -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>
```

Expand All @@ -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
Expand Down
14 changes: 11 additions & 3 deletions docs/toolkit/test-suite/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -37,7 +45,7 @@ cargo test
## Deploy

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

For more information on local validator customization and commands, read the
Expand Down
2 changes: 1 addition & 1 deletion docs/toolkit/test-suite/code-coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
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
Expand Up @@ -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
Expand Down

0 comments on commit 02e0248

Please sign in to comment.