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