From 4d36321e77021b02f3e080a7d7eb7686377c1b2f Mon Sep 17 00:00:00 2001 From: Svyatoslav Nikolsky Date: Mon, 13 Jun 2022 12:11:28 +0300 Subject: [PATCH] Fix deployments again (#1452) * Revert "try to fix nonces collisions (#1450)" This reverts commit 5a91ddf4cca0b81f9b04fe7a362298c3863851fa. * Revert "Revert "try to fix nonces collisions (#1450)"" This reverts commit e6350e839b97946541c1468235575c4bad4c75c1. * added some accounts to RialtoParachain --- .../rialto-parachain/node/src/chain_spec.rs | 57 ++++++++++--------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/bridges/bin/rialto-parachain/node/src/chain_spec.rs b/bridges/bin/rialto-parachain/node/src/chain_spec.rs index 4a9bdaf9afd7..f1d063c5a7bd 100644 --- a/bridges/bin/rialto-parachain/node/src/chain_spec.rs +++ b/bridges/bin/rialto-parachain/node/src/chain_spec.rs @@ -62,6 +62,33 @@ where AccountPublic::from(get_from_seed::(seed)).into_account() } +/// We're using the same set of endowed accounts on all RialtoParachain chains (dev/local) to make +/// sure that all accounts, required for bridge to be functional (e.g. relayers fund account, +/// accounts used by relayers in our test deployments, accounts used for demonstration +/// purposes), are all available on these chains. +fn endowed_accounts() -> Vec { + vec![ + get_account_id_from_seed::("Alice"), + get_account_id_from_seed::("Bob"), + get_account_id_from_seed::("Charlie"), + get_account_id_from_seed::("Dave"), + get_account_id_from_seed::("Eve"), + get_account_id_from_seed::("Ferdie"), + get_account_id_from_seed::("George"), + get_account_id_from_seed::("Alice//stash"), + get_account_id_from_seed::("Bob//stash"), + get_account_id_from_seed::("Charlie//stash"), + get_account_id_from_seed::("Dave//stash"), + get_account_id_from_seed::("Eve//stash"), + get_account_id_from_seed::("Ferdie//stash"), + get_account_id_from_seed::("George//stash"), + pallet_bridge_messages::relayer_fund_account_id::< + bp_rialto_parachain::AccountId, + bp_rialto_parachain::AccountIdConverter, + >(), + ] +} + pub fn development_config(id: ParaId) -> ChainSpec { // Give your base currency a unit name and decimal places let mut properties = sc_chain_spec::Properties::new(); @@ -78,16 +105,7 @@ pub fn development_config(id: ParaId) -> ChainSpec { testnet_genesis( get_account_id_from_seed::("Alice"), vec![get_from_seed::("Alice"), get_from_seed::("Bob")], - vec![ - get_account_id_from_seed::("Alice"), - get_account_id_from_seed::("Bob"), - get_account_id_from_seed::("Alice//stash"), - get_account_id_from_seed::("Bob//stash"), - pallet_bridge_messages::relayer_fund_account_id::< - bp_rialto_parachain::AccountId, - bp_rialto_parachain::AccountIdConverter, - >(), - ], + endowed_accounts(), id, ) }, @@ -119,24 +137,7 @@ pub fn local_testnet_config(id: ParaId) -> ChainSpec { testnet_genesis( get_account_id_from_seed::("Alice"), vec![get_from_seed::("Alice"), get_from_seed::("Bob")], - vec![ - get_account_id_from_seed::("Alice"), - get_account_id_from_seed::("Bob"), - get_account_id_from_seed::("Charlie"), - get_account_id_from_seed::("Dave"), - get_account_id_from_seed::("Eve"), - get_account_id_from_seed::("Ferdie"), - get_account_id_from_seed::("Alice//stash"), - get_account_id_from_seed::("Bob//stash"), - get_account_id_from_seed::("Charlie//stash"), - get_account_id_from_seed::("Dave//stash"), - get_account_id_from_seed::("Eve//stash"), - get_account_id_from_seed::("Ferdie//stash"), - pallet_bridge_messages::relayer_fund_account_id::< - bp_rialto_parachain::AccountId, - bp_rialto_parachain::AccountIdConverter, - >(), - ], + endowed_accounts(), id, ) },