Skip to main content

fuel_core_chain_config/
lib.rs

1#![deny(clippy::cast_possible_truncation)]
2#![deny(clippy::arithmetic_side_effects)]
3#![deny(unused_crate_dependencies)]
4#![deny(warnings)]
5
6extern crate alloc;
7
8#[cfg(test)]
9use fuel_core_chain_config as _;
10
11pub mod config;
12pub mod fee_collection_contract;
13mod genesis;
14mod serialization;
15
16pub use config::*;
17use fuel_core_types::fuel_vm::SecretKey;
18pub use genesis::GenesisCommitment;
19
20/// A default secret key to use for testing purposes only
21pub fn default_consensus_dev_key() -> SecretKey {
22    // Derived from:
23    //  - Mnemonic phrase: "winner alley monkey elephant sun off boil hope toward boss bronze dish"
24    //  - Path: "m/44'/60'/0'/0/0"
25    // Equivalent to:
26    //  `SecretKey::new_from_mnemonic_phrase_with_path(..)`
27    let bytes: [u8; 32] = [
28        0xfb, 0xe4, 0x91, 0x78, 0xda, 0xc2, 0xdf, 0x5f, 0xde, 0xa7, 0x4a, 0x11, 0xa9,
29        0x0f, 0x99, 0x77, 0x62, 0x5f, 0xe0, 0x23, 0xcd, 0xf6, 0x41, 0x4b, 0xfd, 0x63,
30        0x9d, 0x32, 0x7a, 0x2e, 0x9d, 0xdb,
31    ];
32    SecretKey::try_from(bytes.as_slice()).expect("valid key")
33}