tnt-core-fixtures

Crates.iotnt-core-fixtures
lib.rstnt-core-fixtures
version0.5.5
created_at2025-12-22 05:34:28.364531+00
updated_at2026-01-15 10:35:23.022864+00
descriptionLocal testnet fixture data for TNT Core
homepagehttps://tangle.tools
repositoryhttps://github.com/tangle-network/tnt-core
max_upload_size
id1999124
size9,008,140
(drewstone)

documentation

https://docs.rs/tnt-core-fixtures

README

TNT Core Fixtures

This crate packages the LocalTestnet fixtures (Anvil state snapshot and the deployment broadcast) used for deterministic local testing.

Update the fixtures by running:

./scripts/update-localtestnet-fixtures.sh

Usage

use tnt_core_fixtures::{
    localtestnet_broadcast_json, localtestnet_state_json, write_localtestnet_fixtures,
    LOCALTESTNET_STATE_JSON, LOCALTESTNET_STATE_FILENAME,
};

let state = localtestnet_state_json();
let broadcast = localtestnet_broadcast_json();
let _raw = LOCALTESTNET_STATE_JSON;

// Example: write to disk for anvil --load-state.
std::fs::write(LOCALTESTNET_STATE_FILENAME, state)?;
std::fs::write("localtestnet-broadcast.json", broadcast)?;

// Example: write both fixtures to a directory.
let _paths = write_localtestnet_fixtures("./fixtures")?;
# Ok::<(), std::io::Error>(())
Commit count: 68

cargo fmt