Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions crates/node/src/genesis_bootstrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ impl Default for GenesisGeneratorConfig {
network_id: "cipherbft-testnet-1".to_string(),
// 32 CPH = 32 * 10^18 wei = 0x1bc16d674ec80000
initial_stake: U256::from(32_000_000_000_000_000_000u128),
// 100 CPH = 100 * 10^18 wei
initial_balance: U256::from(100_000_000_000_000_000_000u128),
// 100,000 CPH = 100,000 * 10^18 wei
initial_balance: U256::from(100_000_000_000_000_000_000_000u128),
gas_limit: U256::from(30_000_000u64),
extra_alloc: Vec::new(),
}
Expand Down Expand Up @@ -497,7 +497,7 @@ impl GenesisGenerator {
/// 85300,
/// "cipherbft-testnet-1",
/// 32_000_000_000_000_000_000u128.into(), // 32 CPH
/// 100_000_000_000_000_000_000u128.into(), // 100 CPH
/// 100_000_000_000_000_000_000_000u128.into(), // 100,000 CPH
/// )?;
/// ```
pub fn generate_from_validator_keys(
Expand Down Expand Up @@ -1001,10 +1001,10 @@ mod tests {
config.initial_stake,
U256::from(32_000_000_000_000_000_000u128)
);
// 100 CPH in wei
// 100,000 CPH in wei
assert_eq!(
config.initial_balance,
U256::from(100_000_000_000_000_000_000u128)
U256::from(100_000_000_000_000_000_000_000u128)
);
// 30M gas
assert_eq!(config.gas_limit, U256::from(30_000_000u64));
Expand Down
4 changes: 2 additions & 2 deletions crates/node/tests/cli_extra_alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ fn test_genesis_generate_extra_alloc_balance_conversion() {
.get("0x3e54b36f4f8efaa017888e66fb6db17098437ac7")
.unwrap();

// 100 ETH = 100 * 10^18 wei = 0x56bc75e2d63100000
// 100 CPH = 100 * 10^18 wei = 0x56bc75e2d63100000
let balance = entry["balance"].as_str().unwrap();
assert_eq!(
balance, "0x56bc75e2d63100000",
"Expected 100 ETH in wei (hex)"
"Expected 100 CPH in wei (hex)"
);
}

Expand Down
6 changes: 3 additions & 3 deletions devnet/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
},
"alloc": {
"0x70997970c51812dc3a010c7d01b50e0d17dc79c8": {
"balance": "0x56bc75e2d63100000"
"balance": "0x152d02c7e14af6800000"
},
"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266": {
"balance": "0x56bc75e2d63100000"
"balance": "0x152d02c7e14af6800000"
},
"0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc": {
"balance": "0x56bc75e2d63100000"
"balance": "0x152d02c7e14af6800000"
}
},
"gasLimit": "0x1c9c380",
Expand Down