@@ -83,19 +83,18 @@ pub fn development_config() -> TestRuntimeChainSpec {
83
83
properties. insert ( "ss58Format" . into ( ) , 42 . into ( ) ) ;
84
84
85
85
TestRuntimeChainSpec :: builder (
86
- sugondat_test_runtime:: WASM_BINARY
87
- . expect ( "WASM binary was not built, please build it!" ) ,
88
- Extensions {
89
- relay_chain : "rococo-local" . into ( ) ,
90
- // You MUST set this to the correct network!
91
- para_id : 1000 ,
92
- } ,
93
- )
94
- . with_name ( "Development" )
95
- . with_id ( "dev" )
86
+ sugondat_test_runtime:: WASM_BINARY . expect ( "WASM binary was not built, please build it!" ) ,
87
+ Extensions {
88
+ relay_chain : "rococo-local" . into ( ) ,
89
+ // You MUST set this to the correct network!
90
+ para_id : 1000 ,
91
+ } ,
92
+ )
93
+ . with_name ( "Development" )
94
+ . with_id ( "dev" )
96
95
. with_properties ( properties)
97
- . with_chain_type ( ChainType :: Development )
98
- . with_genesis_config_patch ( test_runtime_genesis_patch (
96
+ . with_chain_type ( ChainType :: Development )
97
+ . with_genesis_config_patch ( test_runtime_genesis_patch (
99
98
// initial collators.
100
99
vec ! [
101
100
(
@@ -124,7 +123,7 @@ pub fn development_config() -> TestRuntimeChainSpec {
124
123
get_account_id_from_seed :: < sr25519:: Public > ( "Alice" ) ,
125
124
1000 . into ( ) ,
126
125
) )
127
- . build ( )
126
+ . build ( )
128
127
}
129
128
130
129
const KUSAMA_PARA_ID : u32 = 3338 ;
@@ -138,20 +137,19 @@ pub fn kusama_staging_config() -> KusamaRuntimeChainSpec {
138
137
properties. insert ( "ss58Format" . into ( ) , 2 . into ( ) ) ;
139
138
140
139
KusamaRuntimeChainSpec :: builder (
141
- sugondat_kusama_runtime:: WASM_BINARY
142
- . expect ( "WASM binary was not built, please build it!" ) ,
143
- Extensions {
144
- relay_chain : "kusama" . into ( ) ,
145
- // You MUST set this to the correct network!
146
- para_id : KUSAMA_PARA_ID ,
147
- } ,
148
- )
149
- . with_name ( "Kusama Blobs Staging" )
150
- . with_id ( "blobs_kusama_staging" )
140
+ sugondat_kusama_runtime:: WASM_BINARY . expect ( "WASM binary was not built, please build it!" ) ,
141
+ Extensions {
142
+ relay_chain : "kusama" . into ( ) ,
143
+ // You MUST set this to the correct network!
144
+ para_id : KUSAMA_PARA_ID ,
145
+ } ,
146
+ )
147
+ . with_name ( "Kusama Blobs Staging" )
148
+ . with_id ( "blobs_kusama_staging" )
151
149
. with_protocol_id ( "sugondat-kusama" )
152
150
. with_properties ( properties)
153
- . with_chain_type ( ChainType :: Local )
154
- . with_genesis_config_patch ( kusama_runtime_genesis_patch (
151
+ . with_chain_type ( ChainType :: Local )
152
+ . with_genesis_config_patch ( kusama_runtime_genesis_patch (
155
153
// initial collators
156
154
vec ! [
157
155
(
@@ -167,7 +165,7 @@ pub fn kusama_staging_config() -> KusamaRuntimeChainSpec {
167
165
get_account_id_from_seed :: < sr25519:: Public > ( "Alice" ) ,
168
166
KUSAMA_PARA_ID . into ( ) ,
169
167
) )
170
- . build ( )
168
+ . build ( )
171
169
}
172
170
173
171
pub fn local_testnet_config ( ) -> TestRuntimeChainSpec {
@@ -177,21 +175,20 @@ pub fn local_testnet_config() -> TestRuntimeChainSpec {
177
175
properties. insert ( "tokenDecimals" . into ( ) , 12 . into ( ) ) ;
178
176
properties. insert ( "ss58Format" . into ( ) , 42 . into ( ) ) ;
179
177
180
- TestRuntimeChainSpec :: builder (
181
- sugondat_test_runtime:: WASM_BINARY
182
- . expect ( "WASM binary was not built, please build it!" ) ,
183
- Extensions {
184
- relay_chain : "rococo-local" . into ( ) ,
185
- // You MUST set this to the correct network!
186
- para_id : 1000 ,
187
- } ,
188
- )
189
- . with_name ( "Local Testnet" )
190
- . with_id ( "local_testnet" )
178
+ TestRuntimeChainSpec :: builder (
179
+ sugondat_test_runtime:: WASM_BINARY . expect ( "WASM binary was not built, please build it!" ) ,
180
+ Extensions {
181
+ relay_chain : "rococo-local" . into ( ) ,
182
+ // You MUST set this to the correct network!
183
+ para_id : 1000 ,
184
+ } ,
185
+ )
186
+ . with_name ( "Local Testnet" )
187
+ . with_id ( "local_testnet" )
191
188
. with_protocol_id ( "sugondat-local" )
192
189
. with_properties ( properties)
193
- . with_chain_type ( ChainType :: Local )
194
- . with_genesis_config_patch ( test_runtime_genesis_patch (
190
+ . with_chain_type ( ChainType :: Local )
191
+ . with_genesis_config_patch ( test_runtime_genesis_patch (
195
192
// initial collators.
196
193
vec ! [
197
194
(
@@ -220,7 +217,7 @@ pub fn local_testnet_config() -> TestRuntimeChainSpec {
220
217
get_account_id_from_seed :: < sr25519:: Public > ( "Alice" ) ,
221
218
1000 . into ( ) ,
222
219
) )
223
- . build ( )
220
+ . build ( )
224
221
}
225
222
226
223
fn test_runtime_genesis_patch (
@@ -231,31 +228,31 @@ fn test_runtime_genesis_patch(
231
228
) -> serde_json:: Value {
232
229
serde_json:: json! ( {
233
230
"balances" : {
234
- "balances" : endowed_accounts. iter( ) . cloned( ) . map( |k| ( k, 1u64 << 60 ) ) . collect:: <Vec <_>>( ) ,
235
- } ,
236
- "parachainInfo" : {
237
- "parachainId" : id,
238
- } ,
239
- "collatorSelection" : {
240
- "invulnerables" : invulnerables. iter( ) . cloned( ) . map( |( acc, _) | acc) . collect:: <Vec <_>>( ) ,
241
- "candidacyBond" : TEST_EXISTENTIAL_DEPOSIT * 16 ,
242
- } ,
243
- "session" : {
244
- "keys" : invulnerables
245
- . into_iter( )
246
- . map( |( acc, aura) | {
247
- (
248
- acc. clone( ) , // account id
249
- acc, // validator id
250
- test_runtime_session_keys( aura) , // session keys
251
- )
252
- } )
253
- . collect:: <Vec <_>>( ) ,
254
- } ,
255
- "polkadotXcm" : {
256
- "safeXcmVersion" : Some ( SAFE_XCM_VERSION ) ,
257
- } ,
258
- "sudo" : { "key" : Some ( root) }
231
+ "balances" : endowed_accounts. iter( ) . cloned( ) . map( |k| ( k, 1u64 << 60 ) ) . collect:: <Vec <_>>( ) ,
232
+ } ,
233
+ "parachainInfo" : {
234
+ "parachainId" : id,
235
+ } ,
236
+ "collatorSelection" : {
237
+ "invulnerables" : invulnerables. iter( ) . cloned( ) . map( |( acc, _) | acc) . collect:: <Vec <_>>( ) ,
238
+ "candidacyBond" : TEST_EXISTENTIAL_DEPOSIT * 16 ,
239
+ } ,
240
+ "session" : {
241
+ "keys" : invulnerables
242
+ . into_iter( )
243
+ . map( |( acc, aura) | {
244
+ (
245
+ acc. clone( ) , // account id
246
+ acc, // validator id
247
+ test_runtime_session_keys( aura) , // session keys
248
+ )
249
+ } )
250
+ . collect:: <Vec <_>>( ) ,
251
+ } ,
252
+ "polkadotXcm" : {
253
+ "safeXcmVersion" : Some ( SAFE_XCM_VERSION ) ,
254
+ } ,
255
+ "sudo" : { "key" : Some ( root) }
259
256
} )
260
257
}
261
258
@@ -267,30 +264,30 @@ fn kusama_runtime_genesis_patch(
267
264
) -> serde_json:: Value {
268
265
serde_json:: json! ( {
269
266
"balances" : {
270
- "balances" : endowed_accounts. iter( ) . cloned( ) . map( |k| ( k, 1u64 << 60 ) ) . collect:: <Vec <_>>( ) ,
271
- } ,
272
- "parachainInfo" : {
273
- "parachainId" : id,
274
- } ,
275
- "collatorSelection" : {
276
- "invulnerables" : invulnerables. iter( ) . cloned( ) . map( |( acc, _) | acc) . collect:: <Vec <_>>( ) ,
277
- "candidacyBond" : TEST_EXISTENTIAL_DEPOSIT * 16 ,
278
- } ,
279
- "session" : {
280
- "keys" : invulnerables
281
- . into_iter( )
282
- . map( |( acc, aura) | {
283
- (
284
- acc. clone( ) , // account id
285
- acc, // validator id
286
- kusama_runtime_session_keys( aura) , // session keys
287
- )
288
- } )
289
- . collect:: <Vec <_>>( ) ,
290
- } ,
291
- "polkadotXcm" : {
292
- "safeXcmVersion" : Some ( SAFE_XCM_VERSION ) ,
293
- } ,
294
- "sudo" : { "key" : Some ( root) }
267
+ "balances" : endowed_accounts. iter( ) . cloned( ) . map( |k| ( k, 1u64 << 60 ) ) . collect:: <Vec <_>>( ) ,
268
+ } ,
269
+ "parachainInfo" : {
270
+ "parachainId" : id,
271
+ } ,
272
+ "collatorSelection" : {
273
+ "invulnerables" : invulnerables. iter( ) . cloned( ) . map( |( acc, _) | acc) . collect:: <Vec <_>>( ) ,
274
+ "candidacyBond" : TEST_EXISTENTIAL_DEPOSIT * 16 ,
275
+ } ,
276
+ "session" : {
277
+ "keys" : invulnerables
278
+ . into_iter( )
279
+ . map( |( acc, aura) | {
280
+ (
281
+ acc. clone( ) , // account id
282
+ acc, // validator id
283
+ kusama_runtime_session_keys( aura) , // session keys
284
+ )
285
+ } )
286
+ . collect:: <Vec <_>>( ) ,
287
+ } ,
288
+ "polkadotXcm" : {
289
+ "safeXcmVersion" : Some ( SAFE_XCM_VERSION ) ,
290
+ } ,
291
+ "sudo" : { "key" : Some ( root) }
295
292
} )
296
293
}
0 commit comments