| Crates.io | tnt-core-fixtures |
| lib.rs | tnt-core-fixtures |
| version | 0.5.5 |
| created_at | 2025-12-22 05:34:28.364531+00 |
| updated_at | 2026-01-15 10:35:23.022864+00 |
| description | Local testnet fixture data for TNT Core |
| homepage | https://tangle.tools |
| repository | https://github.com/tangle-network/tnt-core |
| max_upload_size | |
| id | 1999124 |
| size | 9,008,140 |
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
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>(())