From 8e5fa5afa2c5d0d302754918db694c4da95227a9 Mon Sep 17 00:00:00 2001 From: Mateusz Nowakowski Date: Mon, 16 Dec 2024 10:39:42 +0100 Subject: [PATCH] adjust issuance so 5M of GASP is minted in genesis block & account for it in issuance config --- rollup/node/src/chain_spec.rs | 44 ++++++++++++++++++---------- rollup/runtime/src/runtime_config.rs | 2 +- 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/rollup/node/src/chain_spec.rs b/rollup/node/src/chain_spec.rs index a34359204..835755e9f 100644 --- a/rollup/node/src/chain_spec.rs +++ b/rollup/node/src/chain_spec.rs @@ -223,6 +223,7 @@ pub fn rollup_local_config( base, eth_chain_id, decode_url.clone(), + vec![], ) }, // Bootnodes @@ -310,15 +311,34 @@ pub fn ethereum_mainnet(decode_url: Option) -> ChainSpec { hex_literal::hex!("a7196AF761942A10126165B2c727eFCD46c254e0").into(), ]; + let council_members = vec![ + hex_literal::hex!("35dbD8Bd2c5617541bd9D9D8e065adf92275b83E").into(), + hex_literal::hex!("7368bff2fBB4C7B05f854c370eeDD6809186917B").into(), + hex_literal::hex!("9cA8aFB1326c99EC23B8D4e16C0162Bb206D83b8").into(), + hex_literal::hex!("8b5368B4BBa80475c9DFb70543F6090A7e986F39").into(), + hex_literal::hex!("aF3cA574A4903c5ddC7378Ac60d786a2664CbD91").into(), + hex_literal::hex!("584728a637303e753906a4F05CD8Ced10D80eB5e").into(), + hex_literal::hex!("8960911c51EaD00db4cCA88FAF395672458da676").into(), + ]; + let sequencers_endownment = [eth_sequencers.clone(), arb_sequencers.clone(), base_sequencers.clone()] .iter() .flatten() .cloned() - .map(|account_id| (0u32, 100u128 * currency::DOLLARS, account_id)) + .map(|account_id| (RX_TOKEN_ID, 100u128 * currency::DOLLARS, account_id)) .collect::>(); - let tokens_endowment = sequencers_endownment; + let mut tokens_endowment = sequencers_endownment; + tokens_endowment.push((RX_TOKEN_ID, 988_100_u128 * currency::DOLLARS, sudo.into())); + + tokens_endowment.append( + &mut council_members + .clone() + .into_iter() + .map(|addr| (RX_TOKEN_ID, 1000_u128 * currency::DOLLARS, addr)) + .collect::>(), + ); rollup_genesis( // chain genesis salt @@ -368,7 +388,7 @@ pub fn ethereum_mainnet(decode_url: Option) -> ChainSpec { // Id of MGA token, 0u32, // How much mangata they stake - 2__000_000u128 * currency::DOLLARS, + 1__001_000u128 * currency::DOLLARS, ), ( // Who gets to stake initially @@ -376,7 +396,7 @@ pub fn ethereum_mainnet(decode_url: Option) -> ChainSpec { // Id of MGA token, 0u32, // How much mangata they stake - 2__000_000u128 * currency::DOLLARS, + 1__001_000u128 * currency::DOLLARS, ), ( // Who gets to stake initially @@ -384,7 +404,7 @@ pub fn ethereum_mainnet(decode_url: Option) -> ChainSpec { // Id of MGA token, 0u32, // How much mangata they stake - 2__000_000u128 * currency::DOLLARS, + 1__001_000u128 * currency::DOLLARS, ), ( // Who gets to stake initially @@ -392,7 +412,7 @@ pub fn ethereum_mainnet(decode_url: Option) -> ChainSpec { // Id of MGA token, 0u32, // How much mangata they stake - 2__000_000u128 * currency::DOLLARS, + 1__001_000u128 * currency::DOLLARS, ), ], vec![ @@ -439,6 +459,7 @@ pub fn ethereum_mainnet(decode_url: Option) -> ChainSpec { base_sequencers, eth_chain_id, decode_url.clone(), + council_members, ) }, // Bootnodes @@ -474,6 +495,7 @@ fn rollup_genesis( base_initial_sequencers: Vec, chain_id: u64, decode_url: String, + council_members: Vec, ) -> rollup_runtime::RuntimeGenesisConfig { let initial_sequencers_stake = 10_000_000_u128; @@ -588,15 +610,7 @@ fn rollup_genesis( }, council: rollup_runtime::CouncilConfig { phantom: Default::default(), - members: vec![ - hex_literal::hex!("35dbD8Bd2c5617541bd9D9D8e065adf92275b83E").into(), - hex_literal::hex!("7368bff2fBB4C7B05f854c370eeDD6809186917B").into(), - hex_literal::hex!("9cA8aFB1326c99EC23B8D4e16C0162Bb206D83b8").into(), - hex_literal::hex!("8b5368B4BBa80475c9DFb70543F6090A7e986F39").into(), - hex_literal::hex!("aF3cA574A4903c5ddC7378Ac60d786a2664CbD91").into(), - hex_literal::hex!("584728a637303e753906a4F05CD8Ced10D80eB5e").into(), - hex_literal::hex!("8960911c51EaD00db4cCA88FAF395672458da676").into(), - ], + members: council_members, }, transaction_payment: Default::default(), sudo: rollup_runtime::SudoConfig { diff --git a/rollup/runtime/src/runtime_config.rs b/rollup/runtime/src/runtime_config.rs index 6dcf92d76..ce0e2d395 100644 --- a/rollup/runtime/src/runtime_config.rs +++ b/rollup/runtime/src/runtime_config.rs @@ -1000,7 +1000,7 @@ pub mod config { pub SequencerIssuanceVault: AccountId = SequencerIssuanceVaultId::get().into_account_truncating(); pub const TotalCrowdloanAllocation: Balance = 0 * DOLLARS; - pub const IssuanceCap: Balance = 20_400_000 * DOLLARS; + pub const IssuanceCap: Balance = 25_400_000 * DOLLARS; pub const LinearIssuanceBlocks: u32 = 10_512_000u32; // 5 years pub const LiquidityMiningSplit: Perbill = Perbill::from_parts(647050000); // 13'199'820 pub const StakingSplit: Perbill = Perbill::from_parts(235300000); // 4'800'120