Skip to content

Commit

Permalink
use serde to read allocations json
Browse files Browse the repository at this point in the history
  • Loading branch information
dariolina committed Oct 11, 2024
1 parent 9a739ce commit e862cee
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 433,337 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/subspace-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ sc-telemetry = { git = "https://github.com/subspace/polkadot-sdk", rev = "587181
sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" }
sc-network-sync = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" }
sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0.128"
sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" }
sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5871818e1d736f1843eb9078f886290695165c42" }
Expand Down
4 changes: 2 additions & 2 deletions crates/subspace-node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use crate::chain_spec_utils::{chain_spec_properties, get_account_id_from_seed};
use crate::domain::auto_id_chain_spec;
use crate::domain::cli::{GenesisDomain, SpecId};
use crate::domain::evm_chain_spec::{self};
use crate::genesis_allocations::get_genesis_allocations;
use crate::genesis_allocations::{GENESIS_ALLOCATIONS, get_genesis_allocations};
use sc_chain_spec::GenericChainSpec;
use sc_service::ChainType;
use sc_subspace_chain_specs::DEVNET_CHAIN_SPEC;
Expand Down Expand Up @@ -87,7 +87,7 @@ pub fn gemini_3h_compiled() -> Result<GenericChainSpec, String> {
AccountId::from_ss58check("5DNwQTHfARgKoa2NdiUM51ZUow7ve5xG9S2yYdSbVQcnYxBA")
.expect("Wrong root account address");

let balances=get_genesis_allocations();
let balances=get_genesis_allocations(GENESIS_ALLOCATIONS);
serde_json::to_value(subspace_genesis_config(
sudo_account.clone(),
balances,
Expand Down
Loading

0 comments on commit e862cee

Please sign in to comment.