Skip to content

Commit

Permalink
feat: add launch pallet removal migration (#359)
Browse files Browse the repository at this point in the history
* feat: add launch pallet removal migration

* chore: rm launch pallet code

* fix: migration

* fix: clippy + suggestion
  • Loading branch information
wischli authored May 31, 2022
1 parent c71ba9c commit 6ce128e
Show file tree
Hide file tree
Showing 29 changed files with 120 additions and 3,041 deletions.
1 change: 0 additions & 1 deletion .maintain/reset-spec/peregrine_dev_kilt.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def update_spec(input: typing.Dict):
input["properties"]["tokenSymbol"] = "PILT"
input["genesis"]["runtime"]["parachainInfo"]["parachainId"] = para_id
input["genesis"]["runtime"]["sudo"]["key"] = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
input["genesis"]["runtime"]["kiltLaunch"]["transferAccount"] = "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty"
input["genesis"]["runtime"]["parachainStaking"]["stakers"] = [
[
"5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
Expand Down
1 change: 0 additions & 1 deletion .maintain/reset-spec/peregrine_kilt.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def update_spec(input: typing.Dict):
input["properties"]["tokenSymbol"] = "PILT"
input["genesis"]["runtime"]["parachainInfo"]["parachainId"] = para_id
input["genesis"]["runtime"]["sudo"]["key"] = acc_col_1
input["genesis"]["runtime"]["kiltLaunch"]["transferAccount"] = acc_col_2
input["genesis"]["runtime"]["parachainStaking"]["stakers"] = [
[
acc_col_1,
Expand Down
1 change: 0 additions & 1 deletion .maintain/reset-spec/peregrine_stg_kilt.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def update_spec(input: typing.Dict):
input["properties"]["tokenSymbol"] = "PILT"
input["genesis"]["runtime"]["parachainInfo"]["parachainId"] = para_id
input["genesis"]["runtime"]["sudo"]["key"] = acc_col_1
input["genesis"]["runtime"]["kiltLaunch"]["transferAccount"] = acc_col_2
input["genesis"]["runtime"]["parachainStaking"]["stakers"] = [
[
acc_col_1,
Expand Down
78 changes: 29 additions & 49 deletions Cargo.lock

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

20 changes: 2 additions & 18 deletions nodes/parachain/src/chain_spec/peregrine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@
use cumulus_primitives_core::ParaId;
use hex_literal::hex;
use peregrine_runtime::{
BalancesConfig, CouncilConfig, GenesisConfig, InflationInfo, KiltLaunchConfig, ParachainInfoConfig,
ParachainStakingConfig, SessionConfig, SudoConfig, SystemConfig, TechnicalCommitteeConfig, VestingConfig,
WASM_BINARY,
BalancesConfig, CouncilConfig, GenesisConfig, InflationInfo, ParachainInfoConfig, ParachainStakingConfig,
SessionConfig, SudoConfig, SystemConfig, TechnicalCommitteeConfig, VestingConfig, WASM_BINARY,
};
use runtime_common::{
constants::{kilt_inflation_config, staking::MinCollatorStake, MAX_COLLATOR_STAKE},
Expand All @@ -38,8 +37,6 @@ use crate::chain_spec::{get_account_id_from_seed, get_from_seed, get_properties,
/// Specialized `ChainSpec` for the normal parachain runtime.
pub type ChainSpec = sc_service::GenericChainSpec<GenesisConfig, Extensions>;

const TRANSFER_ACCOUNT: [u8; 32] = hex!["6a3c793cec9dbe330b349dc4eea6801090f5e71f53b1b41ad11afb4a313a282c"];

pub fn make_dev_spec() -> Result<ChainSpec, String> {
let properties = get_properties("PILT", 15, 38);
let wasm = WASM_BINARY.ok_or("No WASM")?;
Expand Down Expand Up @@ -177,19 +174,6 @@ fn testnet_genesis(
},
sudo: SudoConfig { key: Some(root_key) },
parachain_info: ParachainInfoConfig { parachain_id: id },
kilt_launch: KiltLaunchConfig {
vesting: airdrop_accounts
.iter()
.cloned()
.map(|(who, amount, vesting_length, _)| (who, vesting_length, amount))
.collect(),
balance_locks: airdrop_accounts
.iter()
.cloned()
.map(|(who, amount, _, locking_length)| (who, locking_length, amount))
.collect(),
transfer_account: TRANSFER_ACCOUNT.into(),
},
vesting: VestingConfig {
vesting: botlabs_accounts
.iter()
Expand Down
Loading

0 comments on commit 6ce128e

Please sign in to comment.