@@ -232,8 +232,7 @@ const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION;
232
232
// Polkadot
233
233
pub mod polkadot {
234
234
use super :: * ;
235
- pub const ED : Balance = polkadot_runtime_constants:: currency:: EXISTENTIAL_DEPOSIT ;
236
- const STASH : u128 = 100 * polkadot_runtime_constants:: currency:: UNITS ;
235
+ pub const ED : Balance = rococo_runtime_constants:: currency:: EXISTENTIAL_DEPOSIT ;
237
236
238
237
pub fn get_host_config ( ) -> HostConfiguration < BlockNumber > {
239
238
HostConfiguration {
@@ -254,17 +253,16 @@ pub mod polkadot {
254
253
para_assignment : AssignmentId ,
255
254
authority_discovery : AuthorityDiscoveryId ,
256
255
beefy : BeefyId ,
257
- ) -> polkadot_runtime :: SessionKeys {
258
- polkadot_runtime :: SessionKeys { babe, grandpa, para_validator, para_assignment, authority_discovery, beefy }
256
+ ) -> rococo_runtime :: SessionKeys {
257
+ rococo_runtime :: SessionKeys { babe, grandpa, para_validator, para_assignment, authority_discovery, beefy }
259
258
}
260
259
261
260
pub fn genesis ( ) -> Storage {
262
- let genesis_config = polkadot_runtime:: RuntimeGenesisConfig {
263
- system : Default :: default ( ) ,
264
- balances : polkadot_runtime:: BalancesConfig {
261
+ let genesis_config = rococo_runtime:: RuntimeGenesisConfig {
262
+ balances : rococo_runtime:: BalancesConfig {
265
263
balances : accounts:: init_balances ( ) . iter ( ) . cloned ( ) . map ( |k| ( k, INITIAL_DEPOSIT ) ) . collect ( ) ,
266
264
} ,
267
- session : polkadot_runtime :: SessionConfig {
265
+ session : rococo_runtime :: SessionConfig {
268
266
keys : validators:: initial_authorities ( )
269
267
. iter ( )
270
268
. map ( |x| {
@@ -284,99 +282,19 @@ pub mod polkadot {
284
282
} )
285
283
. collect :: < Vec < _ > > ( ) ,
286
284
} ,
287
- staking : polkadot_runtime:: StakingConfig {
288
- validator_count : validators:: initial_authorities ( ) . len ( ) as u32 ,
289
- minimum_validator_count : 1 ,
290
- stakers : validators:: initial_authorities ( )
291
- . iter ( )
292
- . map ( |x| ( x. 0 . clone ( ) , x. 1 . clone ( ) , STASH , polkadot_runtime:: StakerStatus :: Validator ) )
293
- . collect ( ) ,
294
- invulnerables : validators:: initial_authorities ( ) . iter ( ) . map ( |x| x. 0 . clone ( ) ) . collect ( ) ,
295
- force_era : pallet_staking:: Forcing :: ForceNone ,
296
- slash_reward_fraction : Perbill :: from_percent ( 10 ) ,
297
- ..Default :: default ( )
298
- } ,
299
- babe : polkadot_runtime:: BabeConfig {
285
+ babe : rococo_runtime:: BabeConfig {
300
286
authorities : Default :: default ( ) ,
301
- epoch_config : polkadot_runtime :: BABE_GENESIS_EPOCH_CONFIG ,
287
+ epoch_config : rococo_runtime :: BABE_GENESIS_EPOCH_CONFIG ,
302
288
..Default :: default ( )
303
289
} ,
304
- configuration : polkadot_runtime :: ConfigurationConfig { config : get_host_config ( ) } ,
290
+ configuration : rococo_runtime :: ConfigurationConfig { config : get_host_config ( ) } ,
305
291
..Default :: default ( )
306
292
} ;
307
293
308
294
genesis_config. build_storage ( ) . unwrap ( )
309
295
}
310
296
}
311
297
312
- // AssetHub
313
- pub mod asset_hub {
314
- use super :: * ;
315
- use crate :: { AssetHub , PolkadotNet } ;
316
- use xcm:: v4:: Parent ;
317
-
318
- pub const PARA_ID : u32 = 1000 ;
319
- pub const ED : Balance = system_parachains_constants:: polkadot:: currency:: SYSTEM_PARA_EXISTENTIAL_DEPOSIT ;
320
-
321
- pub fn genesis ( ) -> Storage {
322
- let mut funded_accounts = vec ! [
323
- (
324
- <AssetHub <PolkadotNet >>:: sovereign_account_id_of(
325
- ( Parent , xcm:: prelude:: Parachain ( penpal:: PARA_ID ) ) . into( ) ,
326
- ) ,
327
- INITIAL_DEPOSIT ,
328
- ) ,
329
- (
330
- <AssetHub <PolkadotNet >>:: sovereign_account_id_of(
331
- ( Parent , xcm:: prelude:: Parachain ( polimec:: PARA_ID ) ) . into( ) ,
332
- ) ,
333
- INITIAL_DEPOSIT ,
334
- ) ,
335
- ] ;
336
- funded_accounts. extend ( accounts:: init_balances ( ) . iter ( ) . cloned ( ) . map ( |k| ( k, INITIAL_DEPOSIT ) ) ) ;
337
-
338
- let genesis_config = asset_hub_polkadot_runtime:: RuntimeGenesisConfig {
339
- system : Default :: default ( ) ,
340
- balances : asset_hub_polkadot_runtime:: BalancesConfig { balances : funded_accounts } ,
341
- parachain_info : asset_hub_polkadot_runtime:: ParachainInfoConfig {
342
- parachain_id : PARA_ID . into ( ) ,
343
- ..Default :: default ( )
344
- } ,
345
- collator_selection : asset_hub_polkadot_runtime:: CollatorSelectionConfig {
346
- invulnerables : collators:: invulnerables_asset_hub ( ) . iter ( ) . cloned ( ) . map ( |( acc, _) | acc) . collect ( ) ,
347
- candidacy_bond : ED * 16 ,
348
- ..Default :: default ( )
349
- } ,
350
- session : asset_hub_polkadot_runtime:: SessionConfig {
351
- keys : collators:: invulnerables_asset_hub ( )
352
- . into_iter ( )
353
- . map ( |( acc, aura) | {
354
- (
355
- acc. clone ( ) , // account id
356
- acc, // validator id
357
- asset_hub_polkadot_runtime:: SessionKeys { aura } , // session keys
358
- )
359
- } )
360
- . collect ( ) ,
361
- } ,
362
- aura : Default :: default ( ) ,
363
- aura_ext : Default :: default ( ) ,
364
- parachain_system : Default :: default ( ) ,
365
- polkadot_xcm : asset_hub_polkadot_runtime:: PolkadotXcmConfig {
366
- safe_xcm_version : Some ( SAFE_XCM_VERSION ) ,
367
- ..Default :: default ( )
368
- } ,
369
- assets : Default :: default ( ) ,
370
- foreign_assets : Default :: default ( ) ,
371
- transaction_payment : Default :: default ( ) ,
372
- vesting : Default :: default ( ) ,
373
- pool_assets : Default :: default ( ) ,
374
- } ;
375
-
376
- genesis_config. build_storage ( ) . unwrap ( )
377
- }
378
- }
379
-
380
298
// Penpal
381
299
pub mod penpal {
382
300
use super :: * ;
@@ -387,9 +305,7 @@ pub mod penpal {
387
305
388
306
pub fn genesis ( ) -> Storage {
389
307
let mut funded_accounts = vec ! [ (
390
- <Penpal <PolkadotNet >>:: sovereign_account_id_of(
391
- ( Parent , xcm:: prelude:: Parachain ( asset_hub:: PARA_ID ) ) . into( ) ,
392
- ) ,
308
+ <Penpal <PolkadotNet >>:: sovereign_account_id_of( ( Parent , xcm:: prelude:: Parachain ( 1000 ) ) . into( ) ) ,
393
309
INITIAL_DEPOSIT ,
394
310
) ] ;
395
311
funded_accounts. extend ( accounts:: init_balances ( ) . iter ( ) . cloned ( ) . map ( |k| ( k, INITIAL_DEPOSIT ) ) ) ;
@@ -500,10 +416,7 @@ pub mod polimec {
500
416
PolimecNet :: sovereign_account_id_of( ( Parent , xcm:: prelude:: Parachain ( penpal:: PARA_ID ) ) . into( ) ) ,
501
417
INITIAL_DEPOSIT ,
502
418
) ,
503
- (
504
- PolimecNet :: sovereign_account_id_of( ( Parent , xcm:: prelude:: Parachain ( asset_hub:: PARA_ID ) ) . into( ) ) ,
505
- INITIAL_DEPOSIT ,
506
- ) ,
419
+ ( PolimecNet :: sovereign_account_id_of( ( Parent , xcm:: prelude:: Parachain ( 1000 ) ) . into( ) ) , INITIAL_DEPOSIT ) ,
507
420
] ;
508
421
let alice_account = PolimecNet :: account_id_of ( accounts:: ALICE ) ;
509
422
let bob_account: AccountId = PolimecNet :: account_id_of ( accounts:: BOB ) ;
0 commit comments