Skip to content

Commit

Permalink
Fix deployments again (paritytech#1452)
Browse files Browse the repository at this point in the history
* Revert "try to fix nonces collisions (paritytech#1450)"

This reverts commit 5a91ddf.

* Revert "Revert "try to fix nonces collisions (paritytech#1450)""

This reverts commit e6350e839b97946541c1468235575c4bad4c75c1.

* added some accounts to RialtoParachain
  • Loading branch information
svyatonik authored and serban300 committed Apr 9, 2024
1 parent f1b2d3e commit f498545
Showing 1 changed file with 29 additions and 28 deletions.
57 changes: 29 additions & 28 deletions bridges/bin/rialto-parachain/node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,33 @@ where
AccountPublic::from(get_from_seed::<TPublic>(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<AccountId> {
vec![
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_account_id_from_seed::<sr25519::Public>("Bob"),
get_account_id_from_seed::<sr25519::Public>("Charlie"),
get_account_id_from_seed::<sr25519::Public>("Dave"),
get_account_id_from_seed::<sr25519::Public>("Eve"),
get_account_id_from_seed::<sr25519::Public>("Ferdie"),
get_account_id_from_seed::<sr25519::Public>("George"),
get_account_id_from_seed::<sr25519::Public>("Alice//stash"),
get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),
get_account_id_from_seed::<sr25519::Public>("Dave//stash"),
get_account_id_from_seed::<sr25519::Public>("Eve//stash"),
get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
get_account_id_from_seed::<sr25519::Public>("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();
Expand All @@ -78,16 +105,7 @@ pub fn development_config(id: ParaId) -> ChainSpec {
testnet_genesis(
get_account_id_from_seed::<sr25519::Public>("Alice"),
vec![get_from_seed::<AuraId>("Alice"), get_from_seed::<AuraId>("Bob")],
vec![
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_account_id_from_seed::<sr25519::Public>("Bob"),
get_account_id_from_seed::<sr25519::Public>("Alice//stash"),
get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
pallet_bridge_messages::relayer_fund_account_id::<
bp_rialto_parachain::AccountId,
bp_rialto_parachain::AccountIdConverter,
>(),
],
endowed_accounts(),
id,
)
},
Expand Down Expand Up @@ -119,24 +137,7 @@ pub fn local_testnet_config(id: ParaId) -> ChainSpec {
testnet_genesis(
get_account_id_from_seed::<sr25519::Public>("Alice"),
vec![get_from_seed::<AuraId>("Alice"), get_from_seed::<AuraId>("Bob")],
vec![
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_account_id_from_seed::<sr25519::Public>("Bob"),
get_account_id_from_seed::<sr25519::Public>("Charlie"),
get_account_id_from_seed::<sr25519::Public>("Dave"),
get_account_id_from_seed::<sr25519::Public>("Eve"),
get_account_id_from_seed::<sr25519::Public>("Ferdie"),
get_account_id_from_seed::<sr25519::Public>("Alice//stash"),
get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),
get_account_id_from_seed::<sr25519::Public>("Dave//stash"),
get_account_id_from_seed::<sr25519::Public>("Eve//stash"),
get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
pallet_bridge_messages::relayer_fund_account_id::<
bp_rialto_parachain::AccountId,
bp_rialto_parachain::AccountIdConverter,
>(),
],
endowed_accounts(),
id,
)
},
Expand Down

0 comments on commit f498545

Please sign in to comment.