Skip to content

Commit

Permalink
refactor: ♻️ correctly use with_genesis_config_preset_name in client …
Browse files Browse the repository at this point in the history
…code
  • Loading branch information
manuelmauro committed Jan 23, 2025
1 parent b23c7e0 commit e61473f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 122 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 node/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ sp-block-builder = { workspace = true, features = ["std"] }
sp-blockchain = { workspace = true }
sp-consensus = { workspace = true }
sp-core = { workspace = true, features = ["std"] }
sp-genesis-builder = { workspace = true, features = ["std"] }
sp-inherents = { workspace = true, features = ["std"] }
sp-io = { workspace = true, features = ["std"] }
sp-keystore = { workspace = true, features = ["std"] }
Expand Down
43 changes: 1 addition & 42 deletions node/service/src/chain_spec/moonbase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,48 +114,7 @@ pub fn get_chain_spec(para_id: ParaId) -> ChainSpec {
)
.expect("Provided valid json map"),
)
.with_genesis_config(testnet_genesis(
// Alith is Sudo
AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")),
// Treasury Council members: Baltathar, Charleth and Dorothy
vec![
AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")),
AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")),
AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")),
],
// Open Tech committee members: Alith and Baltathar
vec![
AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")),
AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")),
],
// Collator Candidates
vec![
// Alice -> Alith
(
AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")),
get_from_seed::<NimbusId>("Alice"),
1_000 * UNIT,
),
// Bob -> Baltathar
(
AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")),
get_from_seed::<NimbusId>("Bob"),
1_000 * UNIT,
),
],
// Delegations
vec![],
// Endowed: Alith, Baltathar, Charleth and Dorothy
vec![
AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")),
AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")),
AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")),
AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")),
],
3_000_000 * UNIT,
para_id,
1280, //ChainId
))
.with_genesis_config_preset_name(sp_genesis_builder::DEV_RUNTIME_PRESET)
.build()
}

Expand Down
41 changes: 1 addition & 40 deletions node/service/src/chain_spec/moonbeam.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,46 +108,7 @@ pub fn get_chain_spec(para_id: ParaId) -> ChainSpec {
)
.expect("Provided valid json map"),
)
.with_genesis_config(testnet_genesis(
// Treasury Council members: Baltathar, Charleth and Dorothy
vec![
AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")),
AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")),
AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")),
],
// Open Tech committee members: Alith and Baltathar
vec![
AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")),
AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")),
],
// Collator Candidates
vec![
// Alice -> Alith
(
AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")),
get_from_seed::<NimbusId>("Alice"),
20_000 * GLMR * SUPPLY_FACTOR,
),
// Bob -> Baltathar
(
AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")),
get_from_seed::<NimbusId>("Bob"),
20_000 * GLMR * SUPPLY_FACTOR,
),
],
// Delegations
vec![],
// Endowed: Alith, Baltathar, Charleth and Dorothy
vec![
AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")),
AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")),
AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")),
AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")),
],
1_500_000 * GLMR * SUPPLY_FACTOR,
para_id,
1280, //ChainId
))
.with_genesis_config_preset_name(sp_genesis_builder::DEV_RUNTIME_PRESET)
.build()
}

Expand Down
41 changes: 1 addition & 40 deletions node/service/src/chain_spec/moonriver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,46 +106,7 @@ pub fn get_chain_spec(para_id: ParaId) -> ChainSpec {
)
.expect("Provided valid json map"),
)
.with_genesis_config(testnet_genesis(
// Treasury Council members: Baltathar, Charleth and Dorothy
vec![
AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")),
AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")),
AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")),
],
// Open Tech committee members: Alith and Baltathar
vec![
AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")),
AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")),
],
// Collator Candidates
vec![
// Alice -> Alith
(
AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")),
get_from_seed::<NimbusId>("Alice"),
100_000 * MOVR,
),
// Bob -> Baltathar
(
AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")),
get_from_seed::<NimbusId>("Bob"),
100_000 * MOVR,
),
],
// Delegations
vec![],
// Endowed: Alith, Baltathar, Charleth and Dorothy
vec![
AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")),
AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")),
AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")),
AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")),
],
3_000_000 * MOVR,
para_id,
1280, //ChainId
))
.with_genesis_config_preset_name(sp_genesis_builder::DEV_RUNTIME_PRESET)
.build()
}

Expand Down

0 comments on commit e61473f

Please sign in to comment.