/starknet-devnet-rs

A local testnet for Starknet... in Rust

Primary LanguageRustMIT LicenseMIT

starknet-devnet-rs

A local testnet for Starknet... in Rust

Requirements

It's required to install the latest version of Rust.

Run

Install and run the project with:

cargo run

Development - Visual Studio Code

It's highly recommended to get familiar with Visual Studio Code Dev Containers and install rust-analyzer extension.

Development - Linter

Run the linter with:

./scripts/clippy_check.sh

Development - Formatter

Run the formatter with:

./scripts/format.sh

If you encounter an error like

error: toolchain 'nightly-x86_64-unknown-linux-gnu' is not installed

Resolve it with:

rustup default nightly

Development - Testing

Run all tests with:

cargo test

To ensure that integration tests pass, be sure to have run cargo build --release or cargo run --release prior to that (this will build the production target that is used in these tests, so spawning Background Devnet won't time out)

Devnet cli options

cargo run -- -h cargo run -- --help

Starting Devnet

By default logging level is INFO, but this can be changed via RUST_LOG environment variable.

All logging levels: TRACE, DEBUG, INFO, WARN, ERROR

If you want to provide Log level then command looks like:

RUST_LOG= cargo run