2323include ! ( concat!( env!( "OUT_DIR" ) , "/wasm_binary.rs" ) ) ;
2424
2525use cumulus_pallet_contracts_rpc_runtime_api:: ContractExecResult ;
26+ use rococo_parachain_primitives:: * ;
2627use sp_api:: impl_runtime_apis;
2728use sp_core:: OpaqueMetadata ;
2829use sp_runtime:: {
2930 create_runtime_str, generic, impl_opaque_keys,
30- traits:: { BlakeTwo256 , Block as BlockT , IdentifyAccount , IdentityLookup , Saturating , Verify } ,
31+ traits:: { BlakeTwo256 , Block as BlockT , IdentityLookup , Saturating } ,
3132 transaction_validity:: { TransactionSource , TransactionValidity } ,
32- ApplyExtrinsicResult , MultiSignature ,
33+ ApplyExtrinsicResult ,
3334} ;
3435use sp_std:: prelude:: * ;
3536#[ cfg( feature = "std" ) ]
@@ -49,61 +50,18 @@ pub use pallet_timestamp::Call as TimestampCall;
4950pub use sp_runtime:: BuildStorage ;
5051pub use sp_runtime:: { Perbill , Permill } ;
5152
52- /// An index to a block.
53- pub type BlockNumber = u32 ;
53+ pub type SessionHandlers = ( ) ;
5454
55- /// Alias to 512-bit hash when used in the context of a transaction signature on the chain.
56- pub type Signature = MultiSignature ;
57-
58- /// Some way of identifying an account on the chain. We intentionally make it equivalent
59- /// to the public key of our transaction signing scheme.
60- pub type AccountId = <<Signature as Verify >:: Signer as IdentifyAccount >:: AccountId ;
61-
62- /// The type for looking up accounts. We don't expect more than 4 billion of them, but you
63- /// never know...
64- pub type AccountIndex = u32 ;
65-
66- /// Balance of an account.
67- pub type Balance = u128 ;
68-
69- /// Index of a transaction in the chain.
70- pub type Index = u32 ;
71-
72- /// A hash of some data used by the chain.
73- pub type Hash = sp_core:: H256 ;
74-
75- /// Digest item type.
76- pub type DigestItem = generic:: DigestItem < Hash > ;
77-
78- /// Opaque types. These are used by the CLI to instantiate machinery that don't need to know
79- /// the specifics of the runtime. They can then be made to be agnostic over specific formats
80- /// of data like extrinsics, allowing for them to continue syncing the network through upgrades
81- /// to even the core datastructures.
82- pub mod opaque {
83- use super :: * ;
84-
85- pub use sp_runtime:: OpaqueExtrinsic as UncheckedExtrinsic ;
86-
87- /// Opaque block header type.
88- pub type Header = generic:: Header < BlockNumber , BlakeTwo256 > ;
89- /// Opaque block type.
90- pub type Block = generic:: Block < Header , UncheckedExtrinsic > ;
91- /// Opaque block identifier type.
92- pub type BlockId = generic:: BlockId < Block > ;
93-
94- pub type SessionHandlers = ( ) ;
95-
96- impl_opaque_keys ! {
97- pub struct SessionKeys { }
98- }
55+ impl_opaque_keys ! {
56+ pub struct SessionKeys { }
9957}
10058
10159/// This runtime version.
10260pub const VERSION : RuntimeVersion = RuntimeVersion {
10361 spec_name : create_runtime_str ! ( "cumulus-contracts-parachain" ) ,
10462 impl_name : create_runtime_str ! ( "cumulus-contracts-parachain" ) ,
10563 authoring_version : 1 ,
106- spec_version : 1 ,
64+ spec_version : 2 ,
10765 impl_version : 1 ,
10866 apis : RUNTIME_API_VERSIONS ,
10967 transaction_version : 1 ,
@@ -292,7 +250,7 @@ impl cumulus_pallet_contracts::Trait for Runtime {
292250construct_runtime ! {
293251 pub enum Runtime where
294252 Block = Block ,
295- NodeBlock = opaque :: Block ,
253+ NodeBlock = rococo_parachain_primitives :: Block ,
296254 UncheckedExtrinsic = UncheckedExtrinsic
297255 {
298256 System : frame_system:: { Module , Call , Storage , Config , Event <T >} ,
@@ -405,11 +363,11 @@ impl_runtime_apis! {
405363 fn decode_session_keys(
406364 encoded: Vec <u8 >,
407365 ) -> Option <Vec <( Vec <u8 >, sp_core:: crypto:: KeyTypeId ) >> {
408- opaque :: SessionKeys :: decode_into_raw_public_keys( & encoded)
366+ SessionKeys :: decode_into_raw_public_keys( & encoded)
409367 }
410368
411369 fn generate_session_keys( seed: Option <Vec <u8 >>) -> Vec <u8 > {
412- opaque :: SessionKeys :: generate( seed)
370+ SessionKeys :: generate( seed)
413371 }
414372 }
415373
0 commit comments