Skip to content

Commit 00b6b30

Browse files
authored
README: Update files with new info (#774)
#### Problem There's still a lot of out-of-date information in the READMEs in this repo. #### Summary of changes Clean it all up and update it all as needed.
1 parent 44d04d1 commit 00b6b30

File tree

7 files changed

+38
-135
lines changed

7 files changed

+38
-135
lines changed

clients/cli/README.md

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# SPL Token program command-line utility
22

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

56
## Build
67

@@ -12,31 +13,15 @@ cargo build
1213

1314
## Testing
1415

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

1819
```sh
19-
BUILD_DEPENDENT_PROGRAMS=1 cargo build
20-
```
21-
22-
This method uses the local `build.rs` file, which can be error-prone, so alternatively,
23-
you can build the programs by running the following commands from this directory:
24-
25-
```sh
26-
cargo build-sbf --manifest-path ../program/Cargo.toml
27-
cargo build-sbf --manifest-path ../program-2022/Cargo.toml
28-
cargo build-sbf --manifest-path ../../associated-token-account/program/Cargo.toml
20+
cargo build-sbf --manifest-path program/Cargo.toml
2921
```
3022

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

3325
```sh
3426
cargo test
3527
```
36-
37-
To run it locally you can do it like this:
38-
39-
```sh
40-
cargo build --manifest-path token/cli/Cargo.toml
41-
target/debug/spl-token <command>
42-
```

clients/cli/build.rs

Lines changed: 0 additions & 79 deletions
This file was deleted.

clients/js-legacy/README.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,40 +48,37 @@ If you have Node 16+, you can [activate PNPM with Corepack](https://pnpm.io/inst
4848

4949
1. Clone the project:
5050
```shell
51-
git clone https://github.com/solana-labs/solana-program-library.git
51+
git clone https://github.com/solana-program/token-2022.git
5252
```
5353

5454
2. Navigate to the root of the repository:
5555
```shell
56-
cd solana-program-library
56+
cd token-2022
5757
```
5858

59-
3. Install the dependencies:
59+
3. Build the on-chain programs:
6060
```shell
61-
pnpm install
61+
make build-sbf-program
62+
make build-sbf-confidential-elgamal-registry
6263
```
6364

64-
4. Build the libraries in the repository:
65+
4. Navigate to the SPL Token library:
6566
```shell
66-
pnpm run build
67+
cd clients/js-legacy
6768
```
6869

69-
5. Navigate to the SPL Token library:
70+
5. Build the libraries in the repository:
7071
```shell
71-
cd token/js
72-
```
73-
74-
6. Build the on-chain programs:
75-
```shell
76-
pnpm run test:build-programs
72+
pnpm install
73+
pnpm run build
7774
```
7875

79-
7. Run the tests:
76+
6. Run the tests:
8077
```shell
8178
pnpm run test
8279
```
8380

84-
8. Run the example:
81+
7. Run the example:
8582
```shell
8683
pnpm run example
8784
```

clients/js/README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,25 @@ A generated JavaScript library for the Token 2022 program.
44

55
## Getting started
66

7-
To build and test your JavaScript client from the root of the repository, you may use the following command.
7+
To build and test your JavaScript client from the root of the repository, you
8+
may use the following command.
89

910
```sh
10-
pnpm clients:js:test
11+
make test-js-clients-js
1112
```
1213

13-
This will start a new local validator, if one is not already running, and run the tests for your JavaScript client.
14+
This will start a new local validator, if one is not already running, and run
15+
the tests for your JavaScript client.
1416

1517
## Available client scripts.
1618

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

1921
```sh
2022
# Build your programs and start the validator.
21-
pnpm programs:build
22-
pnpm validator:restart
23+
make build-sbf-program
24+
make build-sbf-confidential-elgamal-registry
25+
make restart-test-validator
2326

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

3336
```sh
34-
pnpm lint
35-
pnpm lint:fix
36-
pnpm format
37-
pnpm format:fix
37+
make lint-js-clients-js
38+
make format-check-js-clients-js
3839
```

clients/rust/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ A generated Rust library for the Token 2022 program.
44

55
## Getting started
66

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

910
```sh
10-
pnpm clients:js:test
11+
make build-sbf-program
12+
make test-clients-rust
1113
```
1214

13-
This will start a new local validator, if one is not already running, and run the tests for your Rust client.
15+
This will build the program and run the tests for your Rust client.

interface/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,5 @@ non-fungible tokens.
66
This crate provides an interface that third parties can utilize to create and
77
use their tokens.
88

9-
Full documentation is available at [https://www.solana-program.com/docs/token-2022](https://www.solana-program.com/docs/token-2022)
10-
11-
## Audit
12-
13-
The repository [README](https://github.com/solana-labs/solana-program-library#audits)
14-
contains information about program audits.
9+
Full documentation is available at the
10+
[Solana Program Docs](https://www.solana-program.com/docs/token-2022).

program/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ A token program on the Solana blockchain, usable for fungible and non-fungible t
55
This program provides an interface and implementation that third parties can
66
utilize to create and use their tokens.
77

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

1011
## Audit
1112

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

0 commit comments

Comments
 (0)