2
2
//!
3
3
//! # Timechain Runtime
4
4
//!
5
- //!
6
- //! | Name | Features | Profile |
7
- //! |---------|----------|--------- |
8
- //! | mainnet | default | mainnet |
9
- //! | testnet | testnet | testnet |
10
- //! | develop | develop | dev |
5
+ //! | Name | Features | Profile |
6
+ //! |---------|------------------|--------- |
7
+ //! | mainnet | default | mainnet |
8
+ //! | staging | develop | testnet |
9
+ //! | testnet | testnet | testnet |
10
+ //! | develop | testnet, develop | testnet |
11
11
//!
12
12
//! Until we can extract individual package config a bit better,
13
13
//! please check [`Runtime`] and the individual pallets.
82
82
#![ allow( clippy:: identity_op) ]
83
83
#![ allow( non_local_definitions) ]
84
84
85
- /// The runtime is split into its components
85
+ // The runtime is split into its components
86
86
pub mod apis;
87
87
pub mod configs;
88
88
pub mod offchain;
89
+ pub mod version;
90
+
91
+ /// Helpers to handle variant flags
92
+ pub mod variants;
89
93
90
94
pub use apis:: RuntimeApi ;
91
95
use apis:: _InternalImplRuntimeApis;
96
+
97
+ pub use version:: VERSION ;
98
+
99
+ // The runtime configs and its sections
92
100
pub use configs:: consensus:: SessionKeys ;
93
101
pub use configs:: core:: {
94
102
BlockHashCount , RuntimeBlockLength , RuntimeBlockWeights , AVERAGE_ON_INITIALIZE_RATIO ,
@@ -99,9 +107,6 @@ pub use configs::governance::{
99
107
} ;
100
108
pub use configs:: tokenomics:: { ExistentialDeposit , LengthToFee , WeightToFee } ;
101
109
102
- /// Helpers to handle variant flags
103
- pub mod variants;
104
-
105
110
/// Import variant constants and macros
106
111
pub use variants:: * ;
107
112
@@ -140,15 +145,8 @@ use pallet_session::historical as pallet_session_historical;
140
145
#[ allow( deprecated) ]
141
146
pub use pallet_transaction_payment:: { CurrencyAdapter , Multiplier , TargetedFeeAdjustment } ;
142
147
143
- use sp_runtime:: {
144
- create_runtime_str,
145
- generic,
146
- //traits::{OpaqueKeys},
147
- } ;
148
+ use sp_runtime:: generic;
148
149
use sp_std:: prelude:: * ;
149
- #[ cfg( any( feature = "std" , test) ) ]
150
- use sp_version:: NativeVersion ;
151
- use sp_version:: RuntimeVersion ;
152
150
153
151
pub use time_primitives:: {
154
152
AccountId , Balance , BatchId , BlockHash , BlockNumber , ChainName , ChainNetwork , Commitment ,
@@ -229,57 +227,6 @@ pub type PositiveImbalance = <Balances as Currency<AccountId>>::PositiveImbalanc
229
227
#[ cfg( test) ]
230
228
pub const CALL_PARAMS_MAX_SIZE : usize = 448 ;
231
229
232
- /// Mainnet runtime version
233
- #[ cfg( not( any( feature = "testnet" , feature = "develop" ) ) ) ]
234
- #[ sp_version:: runtime_version]
235
- pub const VERSION : RuntimeVersion = RuntimeVersion {
236
- spec_name : create_runtime_str ! ( "analog-timechain" ) ,
237
- impl_name : create_runtime_str ! ( "analog-timechain" ) ,
238
- authoring_version : 0 ,
239
- spec_version : 19 ,
240
- impl_version : 0 ,
241
- apis : apis:: RUNTIME_API_VERSIONS ,
242
- transaction_version : 1 ,
243
- state_version : 1 ,
244
- } ;
245
-
246
- /// Testnet runtime version.
247
- #[ cfg( all( feature = "testnet" , not( feature = "develop" ) ) ) ]
248
- #[ sp_version:: runtime_version]
249
- pub const VERSION : RuntimeVersion = RuntimeVersion {
250
- spec_name : create_runtime_str ! ( "analog-testnet" ) ,
251
- impl_name : create_runtime_str ! ( "analog-testnet" ) ,
252
- authoring_version : 0 ,
253
- spec_version : 19 ,
254
- impl_version : 0 ,
255
- apis : apis:: RUNTIME_API_VERSIONS ,
256
- transaction_version : 1 ,
257
- state_version : 1 ,
258
- } ;
259
-
260
- /// Development runtime version.
261
- #[ cfg( feature = "develop" ) ]
262
- #[ sp_version:: runtime_version]
263
- pub const VERSION : RuntimeVersion = RuntimeVersion {
264
- spec_name : create_runtime_str ! ( "analog-develop" ) ,
265
- impl_name : create_runtime_str ! ( "analog-develop" ) ,
266
- authoring_version : 0 ,
267
- spec_version : 19 ,
268
- impl_version : 0 ,
269
- apis : apis:: RUNTIME_API_VERSIONS ,
270
- transaction_version : 1 ,
271
- state_version : 1 ,
272
- } ;
273
-
274
- /// Native version.
275
- #[ cfg( any( feature = "std" , test) ) ]
276
- pub fn native_version ( ) -> NativeVersion {
277
- NativeVersion {
278
- runtime_version : VERSION ,
279
- can_author_with : Default :: default ( ) ,
280
- }
281
- }
282
-
283
230
/// Maximum block size
284
231
pub const MAX_BLOCK_LENGTH : u32 = 5 * 1024 * 1024 ;
285
232
0 commit comments