Skip to content
Merged
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
25 changes: 5 additions & 20 deletions clients/cli/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# SPL Token program command-line utility

A basic command-line for creating and using SPL Tokens. See <https://spl.solana.com/token> for more details
A basic command-line for creating and using SPL Tokens. See the
[Solana Program Docs](https://www.solana-program.com/docs/token) for more info.

## Build

Expand All @@ -12,31 +13,15 @@ cargo build

## Testing

The tests require locally built programs for Token, Token-2022, and Associated
Token Account. To build these, you can run:
The tests require a locally built program for Token-2022. To build it, run the
following command from the root directory of this repository:

```sh
BUILD_DEPENDENT_PROGRAMS=1 cargo build
```

This method uses the local `build.rs` file, which can be error-prone, so alternatively,
you can build the programs by running the following commands from this directory:

```sh
cargo build-sbf --manifest-path ../program/Cargo.toml
cargo build-sbf --manifest-path ../program-2022/Cargo.toml
cargo build-sbf --manifest-path ../../associated-token-account/program/Cargo.toml
cargo build-sbf --manifest-path program/Cargo.toml
```

After that, you can run the tests as any other Rust project:

```sh
cargo test
```

To run it locally you can do it like this:

```sh
cargo build --manifest-path token/cli/Cargo.toml
target/debug/spl-token <command>
```
79 changes: 0 additions & 79 deletions clients/cli/build.rs

This file was deleted.

27 changes: 12 additions & 15 deletions clients/js-legacy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,40 +48,37 @@ If you have Node 16+, you can [activate PNPM with Corepack](https://pnpm.io/inst

1. Clone the project:
```shell
git clone https://github.com/solana-labs/solana-program-library.git
git clone https://github.com/solana-program/token-2022.git
```

2. Navigate to the root of the repository:
```shell
cd solana-program-library
cd token-2022
```

3. Install the dependencies:
3. Build the on-chain programs:
```shell
pnpm install
make build-sbf-program
make build-sbf-confidential-elgamal-registry
```

4. Build the libraries in the repository:
4. Navigate to the SPL Token library:
```shell
pnpm run build
cd clients/js-legacy
```

5. Navigate to the SPL Token library:
5. Build the libraries in the repository:
```shell
cd token/js
```

6. Build the on-chain programs:
```shell
pnpm run test:build-programs
pnpm install
pnpm run build
```

7. Run the tests:
6. Run the tests:
```shell
pnpm run test
```

8. Run the example:
7. Run the example:
```shell
pnpm run example
```
Expand Down
19 changes: 10 additions & 9 deletions clients/js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,25 @@ A generated JavaScript library for the Token 2022 program.

## Getting started

To build and test your JavaScript client from the root of the repository, you may use the following command.
To build and test your JavaScript client from the root of the repository, you
may use the following command.

```sh
pnpm clients:js:test
make test-js-clients-js
```

This will start a new local validator, if one is not already running, and run the tests for your JavaScript client.
This will start a new local validator, if one is not already running, and run
the tests for your JavaScript client.

## Available client scripts.

Alternatively, you can go into the client directory and run the tests directly.

```sh
# Build your programs and start the validator.
pnpm programs:build
pnpm validator:restart
make build-sbf-program
make build-sbf-confidential-elgamal-registry
make restart-test-validator

# Go into the client directory and run the tests.
cd clients/js
Expand All @@ -31,8 +34,6 @@ pnpm test
You may also use the following scripts to lint and/or format your JavaScript client.

```sh
pnpm lint
pnpm lint:fix
pnpm format
pnpm format:fix
make lint-js-clients-js
make format-check-js-clients-js
```
8 changes: 5 additions & 3 deletions clients/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ A generated Rust library for the Token 2022 program.

## Getting started

To build and test your Rust client from the root of the repository, you may use the following command.
To build and test your Rust client from the root of the repository, you may use
the following commands.

```sh
pnpm clients:js:test
make build-sbf-program
make test-clients-rust
```

This will start a new local validator, if one is not already running, and run the tests for your Rust client.
This will build the program and run the tests for your Rust client.
8 changes: 2 additions & 6 deletions interface/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,5 @@ non-fungible tokens.
This crate provides an interface that third parties can utilize to create and
use their tokens.

Full documentation is available at [https://www.solana-program.com/docs/token-2022](https://www.solana-program.com/docs/token-2022)

## Audit

The repository [README](https://github.com/solana-labs/solana-program-library#audits)
contains information about program audits.
Full documentation is available at the
[Solana Program Docs](https://www.solana-program.com/docs/token-2022).
7 changes: 4 additions & 3 deletions program/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ A token program on the Solana blockchain, usable for fungible and non-fungible t
This program provides an interface and implementation that third parties can
utilize to create and use their tokens.

Full documentation is available at [https://www.solana-program.com/docs/token-2022](https://www.solana-program.com/docs/token-2022)
Full documentation is available at the
[Solana Program Docs](https://www.solana-program.com/docs/token-2022).

## Audit

The repository [README](https://github.com/solana-labs/solana-program-library#audits)
contains information about program audits.
The [security-audits README](https://github.com/anza-xyz/security-audits?tab=readme-ov-file#token-2022)
contains all program audits.
Loading