34 stable releases (3 major)

4.1.1 Sep 3, 2024
4.0.1 Jul 31, 2024
3.4.3 Jul 11, 2024
3.4.0 Mar 28, 2024
1.0.0 Aug 13, 2020

#2 in #spl-token

Download history 923/week @ 2024-07-06 508/week @ 2024-07-13 478/week @ 2024-07-20 1022/week @ 2024-07-27 657/week @ 2024-08-03 488/week @ 2024-08-10 521/week @ 2024-08-17 694/week @ 2024-08-24 794/week @ 2024-08-31 676/week @ 2024-09-07 547/week @ 2024-09-14 710/week @ 2024-09-21 954/week @ 2024-09-28 1070/week @ 2024-10-05 778/week @ 2024-10-12 929/week @ 2024-10-19

3,876 downloads per month

Apache-2.0

2MB
42K SLoC

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

Build

To build the CLI locally, simply run:

cargo build

Testing

The tests require locally built programs for Token, Token-2022, and Associated Token Account. To build these, you can run:

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:

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

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

cargo test

To run it locally you can do it like this:

cargo build --manifest-path token/cli/Cargo.toml
target/debug/spl-token <command>

Dependencies

~92MB
~1.5M SLoC