-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Georgi Zlatarev <georgi.zlatarev@manta.network>
- Loading branch information
1 parent
01f7af1
commit 57a7bfd
Showing
9 changed files
with
275 additions
and
242 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
// Copyright 2020-2023 Manta Network. | ||
// This file is part of Manta. | ||
// | ||
// Manta is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// Manta is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with Manta. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
//! Manta Local Dev Network Configurations | ||
|
||
use super::*; | ||
use session_key_primitives::util::unchecked_account_id; | ||
|
||
pub fn genesis_spec_dev() -> MantaChainSpec { | ||
let genesis_collators: Vec<Collator> = vec![Collator::new( | ||
unchecked_account_id::<sr25519::Public>("Alice"), | ||
None, | ||
SessionKeys::from_seed_unchecked("Alice"), | ||
)]; | ||
let genesis_collators_clone = genesis_collators.clone(); // so we can move it into the constructor closure | ||
|
||
MantaChainSpec::from_genesis( | ||
"Manta Parachain Dev", | ||
"manta", | ||
ChainType::Local, | ||
move || manta_devnet_genesis(genesis_collators_clone.clone()), | ||
genesis_collators | ||
.into_iter() | ||
.filter_map(|collator| collator.nodeid) | ||
.collect(), | ||
None, | ||
Some(MANTA_PROTOCOL_ID), | ||
None, | ||
Some(manta_properties()), | ||
Extensions { | ||
relay_chain: POLKADOT_RELAYCHAIN_LOCAL_NET.into(), | ||
para_id: MANTA_PARACHAIN_ID, | ||
}, | ||
) | ||
} | ||
|
||
pub fn genesis_spec_local() -> MantaChainSpec { | ||
let genesis_collators: Vec<Collator> = vec![ | ||
Collator::new( | ||
unchecked_account_id::<sr25519::Public>("Alice"), | ||
None, | ||
SessionKeys::from_seed_unchecked("Alice"), | ||
), | ||
Collator::new( | ||
unchecked_account_id::<sr25519::Public>("Bob"), | ||
None, | ||
SessionKeys::from_seed_unchecked("Bob"), | ||
), | ||
Collator::new( | ||
unchecked_account_id::<sr25519::Public>("Charlie"), | ||
None, | ||
SessionKeys::from_seed_unchecked("Charlie"), | ||
), | ||
Collator::new( | ||
unchecked_account_id::<sr25519::Public>("Dave"), | ||
None, | ||
SessionKeys::from_seed_unchecked("Dave"), | ||
), | ||
Collator::new( | ||
unchecked_account_id::<sr25519::Public>("Eve"), | ||
None, | ||
SessionKeys::from_seed_unchecked("Eve"), | ||
), | ||
]; | ||
let genesis_collators_clone = genesis_collators.clone(); // so we can move it into the constructor closure | ||
|
||
MantaChainSpec::from_genesis( | ||
"Manta Parachain Local", | ||
"manta", | ||
ChainType::Local, | ||
move || manta_devnet_genesis(genesis_collators_clone.clone()), | ||
genesis_collators | ||
.into_iter() | ||
.filter_map(|collator| collator.nodeid) | ||
.collect(), | ||
None, | ||
Some(MANTA_PROTOCOL_ID), | ||
None, | ||
Some(manta_properties()), | ||
Extensions { | ||
relay_chain: POLKADOT_RELAYCHAIN_LOCAL_NET.into(), | ||
para_id: MANTA_PARACHAIN_ID, | ||
}, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.