Browse Source

Merge pull request #2284 from conectado/antioch

Update runtime-modules to Substrate v2.0.0
shamil-gadelshin 4 years ago
parent
commit
4ec914a4d9
80 changed files with 2380 additions and 7051 deletions
  1. 1682 6454
      Cargo.lock
  2. 3 3
      Cargo.toml
  3. 7 7
      runtime-modules/common/Cargo.toml
  4. 4 3
      runtime-modules/common/src/currency.rs
  5. 2 2
      runtime-modules/common/src/lib.rs
  6. 3 3
      runtime-modules/common/src/origin.rs
  7. 10 10
      runtime-modules/content-directory/Cargo.toml
  8. 10 7
      runtime-modules/content-directory/src/lib.rs
  9. 7 6
      runtime-modules/content-directory/src/mock.rs
  10. 1 1
      runtime-modules/content-directory/src/permissions.rs
  11. 2 2
      runtime-modules/content-directory/src/schema/convert.rs
  12. 2 2
      runtime-modules/content-directory/src/schema/output.rs
  13. 12 12
      runtime-modules/content-working-group/Cargo.toml
  14. 15 14
      runtime-modules/content-working-group/src/lib.rs
  15. 13 9
      runtime-modules/content-working-group/src/mock.rs
  16. 19 19
      runtime-modules/content-working-group/src/tests.rs
  17. 12 12
      runtime-modules/forum/Cargo.toml
  18. 4 4
      runtime-modules/forum/src/lib.rs
  19. 16 14
      runtime-modules/forum/src/mock.rs
  20. 13 13
      runtime-modules/governance/Cargo.toml
  21. 17 14
      runtime-modules/governance/src/council.rs
  22. 30 22
      runtime-modules/governance/src/election.rs
  23. 9 5
      runtime-modules/governance/src/mock.rs
  24. 12 12
      runtime-modules/hiring/Cargo.toml
  25. 14 13
      runtime-modules/hiring/src/lib.rs
  26. 8 5
      runtime-modules/hiring/src/mock.rs
  27. 4 3
      runtime-modules/hiring/src/test/mod.rs
  28. 13 13
      runtime-modules/membership/Cargo.toml
  29. 8 8
      runtime-modules/membership/src/lib.rs
  30. 11 7
      runtime-modules/membership/src/mock.rs
  31. 8 8
      runtime-modules/memo/Cargo.toml
  32. 4 4
      runtime-modules/memo/src/lib.rs
  33. 16 16
      runtime-modules/proposals/codex/Cargo.toml
  34. 11 10
      runtime-modules/proposals/codex/src/lib.rs
  35. 2 2
      runtime-modules/proposals/codex/src/proposal_types/mod.rs
  36. 14 9
      runtime-modules/proposals/codex/src/tests/mock.rs
  37. 3 1
      runtime-modules/proposals/codex/src/tests/mod.rs
  38. 12 12
      runtime-modules/proposals/discussion/Cargo.toml
  39. 5 5
      runtime-modules/proposals/discussion/src/lib.rs
  40. 11 7
      runtime-modules/proposals/discussion/src/tests/mock.rs
  41. 2 2
      runtime-modules/proposals/discussion/src/tests/mod.rs
  42. 13 13
      runtime-modules/proposals/engine/Cargo.toml
  43. 15 15
      runtime-modules/proposals/engine/src/lib.rs
  44. 11 7
      runtime-modules/proposals/engine/src/tests/mock/mod.rs
  45. 1 1
      runtime-modules/proposals/engine/src/tests/mock/proposals.rs
  46. 9 4
      runtime-modules/proposals/engine/src/tests/mod.rs
  47. 6 5
      runtime-modules/proposals/engine/src/types/mod.rs
  48. 10 10
      runtime-modules/recurring-reward/Cargo.toml
  49. 3 3
      runtime-modules/recurring-reward/src/lib.rs
  50. 7 4
      runtime-modules/recurring-reward/src/mock/mod.rs
  51. 12 12
      runtime-modules/service-discovery/Cargo.toml
  52. 6 6
      runtime-modules/service-discovery/src/lib.rs
  53. 9 5
      runtime-modules/service-discovery/src/mock.rs
  54. 4 4
      runtime-modules/service-discovery/src/tests.rs
  55. 13 13
      runtime-modules/stake/Cargo.toml
  56. 10 6
      runtime-modules/stake/src/lib.rs
  57. 8 5
      runtime-modules/stake/src/mock.rs
  58. 12 12
      runtime-modules/storage/Cargo.toml
  59. 8 8
      runtime-modules/storage/src/data_directory.rs
  60. 2 2
      runtime-modules/storage/src/data_object_storage_registry.rs
  61. 2 2
      runtime-modules/storage/src/data_object_type_registry.rs
  62. 5 2
      runtime-modules/storage/src/tests/data_directory.rs
  63. 1 1
      runtime-modules/storage/src/tests/data_object_type_registry.rs
  64. 10 6
      runtime-modules/storage/src/tests/mock.rs
  65. 10 10
      runtime-modules/token-minting/Cargo.toml
  66. 3 3
      runtime-modules/token-minting/src/lib.rs
  67. 7 4
      runtime-modules/token-minting/src/mock.rs
  68. 12 12
      runtime-modules/versioned-store-permissions/Cargo.toml
  69. 28 22
      runtime-modules/versioned-store-permissions/src/lib.rs
  70. 8 6
      runtime-modules/versioned-store-permissions/src/mock.rs
  71. 14 14
      runtime-modules/versioned-store-permissions/src/tests.rs
  72. 11 11
      runtime-modules/versioned-store/Cargo.toml
  73. 3 3
      runtime-modules/versioned-store/src/lib.rs
  74. 5 3
      runtime-modules/versioned-store/src/mock.rs
  75. 13 13
      runtime-modules/working-group/Cargo.toml
  76. 22 17
      runtime-modules/working-group/src/lib.rs
  77. 1 1
      runtime-modules/working-group/src/tests/fixtures.rs
  78. 1 1
      runtime-modules/working-group/src/tests/hiring_workflow.rs
  79. 10 6
      runtime-modules/working-group/src/tests/mock.rs
  80. 4 4
      runtime-modules/working-group/src/tests/mod.rs

File diff suppressed because it is too large
+ 1682 - 6454
Cargo.lock


+ 3 - 3
Cargo.toml

@@ -1,6 +1,6 @@
 [workspace]
 [workspace]
 members = [
 members = [
-	"runtime",
+	#"runtime",
 	"runtime-modules/proposals/engine",
 	"runtime-modules/proposals/engine",
 	"runtime-modules/proposals/codex",
 	"runtime-modules/proposals/codex",
 	"runtime-modules/proposals/discussion",
 	"runtime-modules/proposals/discussion",
@@ -20,8 +20,8 @@ members = [
 	"runtime-modules/versioned-store-permissions",
 	"runtime-modules/versioned-store-permissions",
 	"runtime-modules/working-group",
 	"runtime-modules/working-group",
 	"runtime-modules/content-directory",
 	"runtime-modules/content-directory",
-	"node",
-	"utils/chain-spec-builder/"
+	#"node",
+	#"utils/chain-spec-builder/"
 ]
 ]
 
 
 [profile.release]
 [profile.release]

+ 7 - 7
runtime-modules/common/Cargo.toml

@@ -1,6 +1,6 @@
 [package]
 [package]
 name = 'pallet-common'
 name = 'pallet-common'
-version = '3.0.0'
+version = '3.1.0'
 authors = ['Joystream contributors']
 authors = ['Joystream contributors']
 edition = '2018'
 edition = '2018'
 
 
@@ -8,11 +8,11 @@ edition = '2018'
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
 strum = {version = "0.19", optional = true}
 strum = {version = "0.19", optional = true}
 strum_macros = {version = "0.19", optional = true}
 strum_macros = {version = "0.19", optional = true}
-codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] }
-sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+codec = { package = 'parity-scale-codec', version = '1.3.4', default-features = false, features = ['derive'] }
+sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 
 
 [features]
 [features]
 default = ['std']
 default = ['std']
@@ -23,6 +23,6 @@ std = [
 	'codec/std',
 	'codec/std',
 	'sp-runtime/std',
 	'sp-runtime/std',
 	'frame-support/std',
 	'frame-support/std',
-	'system/std',
+	'frame-system/std',
 	'pallet-timestamp/std',
 	'pallet-timestamp/std',
 ]
 ]

+ 4 - 3
runtime-modules/common/src/currency.rs

@@ -1,14 +1,15 @@
 use frame_support::traits::{Currency, LockableCurrency, ReservableCurrency};
 use frame_support::traits::{Currency, LockableCurrency, ReservableCurrency};
 use sp_runtime::traits::Convert;
 use sp_runtime::traits::Convert;
 
 
-pub trait GovernanceCurrency: system::Trait + Sized {
+pub trait GovernanceCurrency: frame_system::Trait + Sized {
     type Currency: Currency<Self::AccountId>
     type Currency: Currency<Self::AccountId>
         + ReservableCurrency<Self::AccountId>
         + ReservableCurrency<Self::AccountId>
         + LockableCurrency<Self::AccountId, Moment = Self::BlockNumber>;
         + LockableCurrency<Self::AccountId, Moment = Self::BlockNumber>;
 }
 }
 
 
-pub type BalanceOf<T> =
-    <<T as GovernanceCurrency>::Currency as Currency<<T as system::Trait>::AccountId>>::Balance;
+pub type BalanceOf<T> = <<T as GovernanceCurrency>::Currency as Currency<
+    <T as frame_system::Trait>::AccountId,
+>>::Balance;
 
 
 /// A structure that converts the currency type into a lossy u64
 /// A structure that converts the currency type into a lossy u64
 /// And back from u128
 /// And back from u128

+ 2 - 2
runtime-modules/common/src/lib.rs

@@ -24,10 +24,10 @@ pub struct BlockAndTime<BlockNumber, Moment> {
 /// Gathers current block and time information for the runtime.
 /// Gathers current block and time information for the runtime.
 /// If this function is used inside a config() at genesis the timestamp will be 0
 /// If this function is used inside a config() at genesis the timestamp will be 0
 /// because the timestamp is actually produced by validators.
 /// because the timestamp is actually produced by validators.
-pub fn current_block_time<T: system::Trait + pallet_timestamp::Trait>(
+pub fn current_block_time<T: frame_system::Trait + pallet_timestamp::Trait>(
 ) -> BlockAndTime<T::BlockNumber, T::Moment> {
 ) -> BlockAndTime<T::BlockNumber, T::Moment> {
     BlockAndTime {
     BlockAndTime {
-        block: <system::Module<T>>::block_number(),
+        block: <frame_system::Module<T>>::block_number(),
         time: <pallet_timestamp::Module<T>>::now(),
         time: <pallet_timestamp::Module<T>>::now(),
     }
     }
 }
 }

+ 3 - 3
runtime-modules/common/src/origin.rs

@@ -1,4 +1,4 @@
-use system::RawOrigin;
+use frame_system::RawOrigin;
 
 
 /// Abstract validator for the origin(account_id) and actor_id (eg.: thread author id).
 /// Abstract validator for the origin(account_id) and actor_id (eg.: thread author id).
 pub trait ActorOriginValidator<Origin, ActorId, AccountId> {
 pub trait ActorOriginValidator<Origin, ActorId, AccountId> {
@@ -8,9 +8,9 @@ pub trait ActorOriginValidator<Origin, ActorId, AccountId> {
 
 
 // TODO: delete when T::Origin will support the clone()
 // TODO: delete when T::Origin will support the clone()
 /// Multiplies the T::Origin.
 /// Multiplies the T::Origin.
-/// In our current substrate version system::Origin doesn't support clone(),
+/// In our current substrate version frame_system::Origin doesn't support clone(),
 /// but it will be supported in latest up-to-date substrate version.
 /// but it will be supported in latest up-to-date substrate version.
-pub fn double_origin<T: system::Trait>(origin: T::Origin) -> (T::Origin, T::Origin) {
+pub fn double_origin<T: frame_system::Trait>(origin: T::Origin) -> (T::Origin, T::Origin) {
     let coerced_origin = origin.into().ok().unwrap_or(RawOrigin::None);
     let coerced_origin = origin.into().ok().unwrap_or(RawOrigin::None);
 
 
     let (cloned_origin1, cloned_origin2) = match coerced_origin {
     let (cloned_origin1, cloned_origin2) = match coerced_origin {

+ 10 - 10
runtime-modules/content-directory/Cargo.toml

@@ -1,21 +1,21 @@
 [package]
 [package]
 name = 'pallet-content-directory'
 name = 'pallet-content-directory'
-version = '3.0.0'
+version = '3.1.0'
 authors = ['Joystream contributors']
 authors = ['Joystream contributors']
 edition = '2018'
 edition = '2018'
 
 
 [dependencies]
 [dependencies]
-sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] }
+sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+codec = { package = 'parity-scale-codec', version = '1.3.4', default-features = false, features = ['derive'] }
 serde = {version = '1.0.101', features = ['derive'], optional = true}
 serde = {version = '1.0.101', features = ['derive'], optional = true}
 
 
 [dev-dependencies]
 [dev-dependencies]
-sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 
 
 [features]
 [features]
 default = ['std']
 default = ['std']
@@ -23,7 +23,7 @@ std = [
 	'sp-std/std',
 	'sp-std/std',
 	'sp-runtime/std',
 	'sp-runtime/std',
 	'frame-support/std',
 	'frame-support/std',
-	'system/std',
+	'frame-system/std',
 	'sp-arithmetic/std',
 	'sp-arithmetic/std',
 	'codec/std',
 	'codec/std',
 	'serde',
 	'serde',

+ 10 - 7
runtime-modules/content-directory/src/lib.rs

@@ -95,7 +95,7 @@
 //!
 //!
 //! ```
 //! ```
 //! use frame_support::{decl_module, assert_ok};
 //! use frame_support::{decl_module, assert_ok};
-//! use system::{self as system, ensure_signed};
+//! use frame_system::{self as frame_system, ensure_signed};
 //!
 //!
 //! pub trait Trait: pallet_content_directory::Trait {}
 //! pub trait Trait: pallet_content_directory::Trait {}
 //!
 //!
@@ -148,6 +148,7 @@ use frame_support::{
     traits::Get,
     traits::Get,
     Parameter,
     Parameter,
 };
 };
+use frame_system::ensure_signed;
 #[cfg(feature = "std")]
 #[cfg(feature = "std")]
 pub use serde::{Deserialize, Serialize};
 pub use serde::{Deserialize, Serialize};
 use sp_arithmetic::traits::{BaseArithmetic, One, Zero};
 use sp_arithmetic::traits::{BaseArithmetic, One, Zero};
@@ -156,7 +157,6 @@ use sp_std::borrow::ToOwned;
 use sp_std::collections::{btree_map::BTreeMap, btree_set::BTreeSet};
 use sp_std::collections::{btree_map::BTreeMap, btree_set::BTreeSet};
 use sp_std::vec;
 use sp_std::vec;
 use sp_std::vec::Vec;
 use sp_std::vec::Vec;
-use system::ensure_signed;
 
 
 pub use errors::Error;
 pub use errors::Error;
 
 
@@ -169,7 +169,7 @@ pub type MaxNumber = u32;
 pub type EntityOf<T> = Entity<
 pub type EntityOf<T> = Entity<
     <T as Trait>::ClassId,
     <T as Trait>::ClassId,
     <T as ActorAuthenticator>::MemberId,
     <T as ActorAuthenticator>::MemberId,
-    <T as system::Trait>::Hash,
+    <T as frame_system::Trait>::Hash,
     <T as Trait>::EntityId,
     <T as Trait>::EntityId,
     <T as Trait>::Nonce,
     <T as Trait>::Nonce,
 >;
 >;
@@ -179,13 +179,16 @@ pub type ClassOf<T> =
     Class<<T as Trait>::EntityId, <T as Trait>::ClassId, <T as ActorAuthenticator>::CuratorGroupId>;
     Class<<T as Trait>::EntityId, <T as Trait>::ClassId, <T as ActorAuthenticator>::CuratorGroupId>;
 
 
 /// Type simplification
 /// Type simplification
-pub type StoredPropertyValueOf<T> =
-    StoredPropertyValue<<T as system::Trait>::Hash, <T as Trait>::EntityId, <T as Trait>::Nonce>;
+pub type StoredPropertyValueOf<T> = StoredPropertyValue<
+    <T as frame_system::Trait>::Hash,
+    <T as Trait>::EntityId,
+    <T as Trait>::Nonce,
+>;
 
 
 /// Module configuration trait for this Substrate module.
 /// Module configuration trait for this Substrate module.
-pub trait Trait: system::Trait + ActorAuthenticator + Clone {
+pub trait Trait: frame_system::Trait + ActorAuthenticator + Clone {
     /// The overarching event type.
     /// The overarching event type.
-    type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;
+    type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>;
 
 
     /// Nonce type is used to avoid data race update conditions, when performing property value vector operations
     /// Nonce type is used to avoid data race update conditions, when performing property value vector operations
     type Nonce: Parameter
     type Nonce: Parameter

+ 7 - 6
runtime-modules/content-directory/src/mock.rs

@@ -20,7 +20,7 @@ use std::cell::RefCell;
 pub type ClassId = <Runtime as Trait>::ClassId;
 pub type ClassId = <Runtime as Trait>::ClassId;
 pub type EntityId = <Runtime as Trait>::EntityId;
 pub type EntityId = <Runtime as Trait>::EntityId;
 pub type Nonce = <Runtime as Trait>::Nonce;
 pub type Nonce = <Runtime as Trait>::Nonce;
-pub type Hashed = <Runtime as system::Trait>::Hash;
+pub type Hashed = <Runtime as frame_system::Trait>::Hash;
 
 
 pub type CuratorId = <Runtime as ActorAuthenticator>::CuratorId;
 pub type CuratorId = <Runtime as ActorAuthenticator>::CuratorId;
 pub type CuratorGroupId = <Runtime as ActorAuthenticator>::CuratorGroupId;
 pub type CuratorGroupId = <Runtime as ActorAuthenticator>::CuratorGroupId;
@@ -208,7 +208,7 @@ impl Get<EntityId> for IndividualEntitiesCreationLimit {
     }
     }
 }
 }
 
 
-impl system::Trait for Runtime {
+impl frame_system::Trait for Runtime {
     type BaseCallFilter = ();
     type BaseCallFilter = ();
     type Origin = Origin;
     type Origin = Origin;
     type Call = ();
     type Call = ();
@@ -229,10 +229,11 @@ impl system::Trait for Runtime {
     type MaximumBlockLength = MaximumBlockLength;
     type MaximumBlockLength = MaximumBlockLength;
     type AvailableBlockRatio = AvailableBlockRatio;
     type AvailableBlockRatio = AvailableBlockRatio;
     type Version = ();
     type Version = ();
-    type ModuleToIndex = ();
     type AccountData = ();
     type AccountData = ();
     type OnNewAccount = ();
     type OnNewAccount = ();
     type OnKilledAccount = ();
     type OnKilledAccount = ();
+    type PalletInfo = ();
+    type SystemWeightInfo = ();
 }
 }
 
 
 mod test_events {
 mod test_events {
@@ -242,7 +243,7 @@ mod test_events {
 impl_outer_event! {
 impl_outer_event! {
     pub enum TestEvent for Runtime {
     pub enum TestEvent for Runtime {
         test_events<T>,
         test_events<T>,
-        system<T>,
+        frame_system<T>,
     }
     }
 }
 }
 
 
@@ -364,7 +365,7 @@ impl ExtBuilder {
 
 
     pub fn build(self, config: GenesisConfig<Runtime>) -> sp_io::TestExternalities {
     pub fn build(self, config: GenesisConfig<Runtime>) -> sp_io::TestExternalities {
         self.set_associated_consts();
         self.set_associated_consts();
-        let mut t = system::GenesisConfig::default()
+        let mut t = frame_system::GenesisConfig::default()
             .build_storage::<Runtime>()
             .build_storage::<Runtime>()
             .unwrap();
             .unwrap();
         config.assimilate_storage(&mut t).unwrap();
         config.assimilate_storage(&mut t).unwrap();
@@ -1025,7 +1026,7 @@ impl PropertyLockingPolicy {
 }
 }
 
 
 // Assign back to type variables so we can make dispatched calls of these modules later.
 // Assign back to type variables so we can make dispatched calls of these modules later.
-pub type System = system::Module<Runtime>;
+pub type System = frame_system::Module<Runtime>;
 pub type TestModule = Module<Runtime>;
 pub type TestModule = Module<Runtime>;
 
 
 // Recommendation from Parity on testing on_finalize
 // Recommendation from Parity on testing on_finalize

+ 1 - 1
runtime-modules/content-directory/src/permissions.rs

@@ -19,7 +19,7 @@ use sp_arithmetic::traits::BaseArithmetic;
 use sp_runtime::traits::{MaybeSerializeDeserialize, Member};
 use sp_runtime::traits::{MaybeSerializeDeserialize, Member};
 
 
 /// Model of authentication manager.
 /// Model of authentication manager.
-pub trait ActorAuthenticator: system::Trait {
+pub trait ActorAuthenticator: frame_system::Trait {
     /// Curator identifier
     /// Curator identifier
     type CuratorId: Parameter
     type CuratorId: Parameter
         + Member
         + Member

+ 2 - 2
runtime-modules/content-directory/src/schema/convert.rs

@@ -29,7 +29,7 @@ impl<T: Trait> From<InputValue<T>> for StoredValue<T::Hash, T::EntityId> {
             InputValue::Text(value) => StoredValue::Text(value),
             InputValue::Text(value) => StoredValue::Text(value),
 
 
             InputValue::TextToHash(value) => {
             InputValue::TextToHash(value) => {
-                let hash_value = value.using_encoded(<T as system::Trait>::Hashing::hash);
+                let hash_value = value.using_encoded(<T as frame_system::Trait>::Hashing::hash);
                 StoredValue::Hash(hash_value)
                 StoredValue::Hash(hash_value)
             }
             }
             InputValue::Reference(value) => StoredValue::Reference(value),
             InputValue::Reference(value) => StoredValue::Reference(value),
@@ -52,7 +52,7 @@ impl<T: Trait> From<VecInputValue<T>> for VecStoredValue<T::Hash, T::EntityId> {
             VecInputValue::TextToHash(vec_value) => {
             VecInputValue::TextToHash(vec_value) => {
                 let hash_vec_value: Vec<_> = vec_value
                 let hash_vec_value: Vec<_> = vec_value
                     .into_iter()
                     .into_iter()
-                    .map(|value| value.using_encoded(<T as system::Trait>::Hashing::hash))
+                    .map(|value| value.using_encoded(<T as frame_system::Trait>::Hashing::hash))
                     .collect();
                     .collect();
                 VecStoredValue::Hash(hash_vec_value)
                 VecStoredValue::Hash(hash_vec_value)
             }
             }

+ 2 - 2
runtime-modules/content-directory/src/schema/output.rs

@@ -81,7 +81,7 @@ impl<
     pub fn compute_unique_hash<T: Trait>(&self, property_id: PropertyId) -> T::Hash {
     pub fn compute_unique_hash<T: Trait>(&self, property_id: PropertyId) -> T::Hash {
         match self {
         match self {
             StoredPropertyValue::Single(output_value) => {
             StoredPropertyValue::Single(output_value) => {
-                (property_id, output_value).using_encoded(<T as system::Trait>::Hashing::hash)
+                (property_id, output_value).using_encoded(<T as frame_system::Trait>::Hashing::hash)
             }
             }
             StoredPropertyValue::Vector(vector_output_value) => {
             StoredPropertyValue::Vector(vector_output_value) => {
                 vector_output_value.compute_unique_hash::<T>(property_id)
                 vector_output_value.compute_unique_hash::<T>(property_id)
@@ -159,7 +159,7 @@ impl<
     /// Compute hash from unique vec property value and its respective property_id
     /// Compute hash from unique vec property value and its respective property_id
     pub fn compute_unique_hash<T: Trait>(&self, property_id: PropertyId) -> T::Hash {
     pub fn compute_unique_hash<T: Trait>(&self, property_id: PropertyId) -> T::Hash {
         // Do not hash nonce
         // Do not hash nonce
-        (property_id, &self.vec_value).using_encoded(<T as system::Trait>::Hashing::hash)
+        (property_id, &self.vec_value).using_encoded(<T as frame_system::Trait>::Hashing::hash)
     }
     }
 
 
     /// Increase nonce by 1
     /// Increase nonce by 1

+ 12 - 12
runtime-modules/content-working-group/Cargo.toml

@@ -1,17 +1,17 @@
 [package]
 [package]
 name = 'pallet-content-working-group'
 name = 'pallet-content-working-group'
-version = '3.0.0'
+version = '3.1.0'
 authors = ['Joystream contributors']
 authors = ['Joystream contributors']
 edition = '2018'
 edition = '2018'
 
 
 [dependencies]
 [dependencies]
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
-codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] }
-sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+codec = { package = 'parity-scale-codec', version = '1.3.4', default-features = false, features = ['derive'] }
+sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 membership = { package = 'pallet-membership', default-features = false, path = '../membership'}
 membership = { package = 'pallet-membership', default-features = false, path = '../membership'}
 stake = { package = 'pallet-stake', default-features = false, path = '../stake'}
 stake = { package = 'pallet-stake', default-features = false, path = '../stake'}
 hiring = { package = 'pallet-hiring', default-features = false, path = '../hiring'}
 hiring = { package = 'pallet-hiring', default-features = false, path = '../hiring'}
@@ -22,10 +22,10 @@ versioned_store_permissions = { package = 'pallet-versioned-store-permissions',
 common = { package = 'pallet-common', default-features = false, path = '../common'}
 common = { package = 'pallet-common', default-features = false, path = '../common'}
 
 
 [dev-dependencies]
 [dev-dependencies]
-sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 
 
 [features]
 [features]
 default = ['std']
 default = ['std']
@@ -34,7 +34,7 @@ std = [
 	'codec/std',
 	'codec/std',
 	'sp-std/std',
 	'sp-std/std',
 	'frame-support/std',
 	'frame-support/std',
-	'system/std',
+	'frame-system/std',
 	'sp-arithmetic/std',
 	'sp-arithmetic/std',
 	'sp-runtime/std',
 	'sp-runtime/std',
 	'membership/std',
 	'membership/std',

+ 15 - 14
runtime-modules/content-working-group/src/lib.rs

@@ -22,18 +22,18 @@ use serde::{Deserialize, Serialize};
 use codec::{Decode, Encode};
 use codec::{Decode, Encode};
 use frame_support::traits::{Currency, ExistenceRequirement, WithdrawReasons};
 use frame_support::traits::{Currency, ExistenceRequirement, WithdrawReasons};
 use frame_support::{decl_event, decl_module, decl_storage, ensure};
 use frame_support::{decl_event, decl_module, decl_storage, ensure};
+use frame_system::{ensure_root, ensure_signed};
 use sp_arithmetic::traits::{One, Zero};
 use sp_arithmetic::traits::{One, Zero};
 use sp_std::borrow::ToOwned;
 use sp_std::borrow::ToOwned;
 use sp_std::collections::{btree_map::BTreeMap, btree_set::BTreeSet};
 use sp_std::collections::{btree_map::BTreeMap, btree_set::BTreeSet};
 use sp_std::vec;
 use sp_std::vec;
 use sp_std::vec::Vec;
 use sp_std::vec::Vec;
-use system::{ensure_root, ensure_signed};
 
 
 use common::constraints::InputValidationLengthConstraint;
 use common::constraints::InputValidationLengthConstraint;
 
 
 /// Module configuration trait for this Substrate module.
 /// Module configuration trait for this Substrate module.
 pub trait Trait:
 pub trait Trait:
-    system::Trait
+    frame_system::Trait
     + minting::Trait
     + minting::Trait
     + recurringrewards::Trait
     + recurringrewards::Trait
     + stake::Trait
     + stake::Trait
@@ -42,7 +42,7 @@ pub trait Trait:
     + membership::Trait
     + membership::Trait
 {
 {
     /// The event type.
     /// The event type.
-    type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;
+    type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>;
 }
 }
 
 
 /// Type constraint for identifer used for actors.
 /// Type constraint for identifer used for actors.
@@ -67,14 +67,15 @@ pub type CuratorApplicationId<T> = <T as hiring::Trait>::ApplicationId;
 
 
 /// Balance type of runtime
 /// Balance type of runtime
 pub type BalanceOf<T> =
 pub type BalanceOf<T> =
-    <<T as stake::Trait>::Currency as Currency<<T as system::Trait>::AccountId>>::Balance;
+    <<T as stake::Trait>::Currency as Currency<<T as frame_system::Trait>::AccountId>>::Balance;
 
 
 /// Balance type of runtime
 /// Balance type of runtime
 pub type CurrencyOf<T> = <T as stake::Trait>::Currency;
 pub type CurrencyOf<T> = <T as stake::Trait>::Currency;
 
 
 /// Negative imbalance of runtime.
 /// Negative imbalance of runtime.
-pub type NegativeImbalance<T> =
-    <<T as stake::Trait>::Currency as Currency<<T as system::Trait>::AccountId>>::NegativeImbalance;
+pub type NegativeImbalance<T> = <<T as stake::Trait>::Currency as Currency<
+    <T as frame_system::Trait>::AccountId,
+>>::NegativeImbalance;
 
 
 /// Type of mintin reward relationship identifiers
 /// Type of mintin reward relationship identifiers
 pub type RewardRelationshipId<T> = <T as recurringrewards::Trait>::RewardRelationshipId;
 pub type RewardRelationshipId<T> = <T as recurringrewards::Trait>::RewardRelationshipId;
@@ -1061,7 +1062,7 @@ decl_event! {
         CuratorId = CuratorId<T>,
         CuratorId = CuratorId<T>,
         CuratorApplicationIdToCuratorIdMap = CuratorApplicationIdToCuratorIdMap<T>,
         CuratorApplicationIdToCuratorIdMap = CuratorApplicationIdToCuratorIdMap<T>,
         MintBalanceOf = minting::BalanceOf<T>,
         MintBalanceOf = minting::BalanceOf<T>,
-        <T as system::Trait>::AccountId,
+        <T as frame_system::Trait>::AccountId,
         <T as minting::Trait>::MintId,
         <T as minting::Trait>::MintId,
     {
     {
         ChannelCreated(ChannelId),
         ChannelCreated(ChannelId),
@@ -1160,7 +1161,7 @@ decl_module! {
                 role_account,
                 role_account,
                 publication_status,
                 publication_status,
                 curation_status: ChannelCurationStatus::Normal,
                 curation_status: ChannelCurationStatus::Normal,
-                created: <system::Module<T>>::block_number(),
+                created: <frame_system::Module<T>>::block_number(),
                 principal_id,
                 principal_id,
             };
             };
 
 
@@ -1421,7 +1422,7 @@ decl_module! {
                 ensure!(<minting::Mints<T>>::contains_key(mint_id), MSG_FILL_CURATOR_OPENING_MINT_DOES_NOT_EXIST);
                 ensure!(<minting::Mints<T>>::contains_key(mint_id), MSG_FILL_CURATOR_OPENING_MINT_DOES_NOT_EXIST);
 
 
                 // Make sure valid parameters are selected for next payment at block number
                 // Make sure valid parameters are selected for next payment at block number
-                ensure!(policy.next_payment_at_block > <system::Module<T>>::block_number(), MSG_FILL_CURATOR_OPENING_INVALID_NEXT_PAYMENT_BLOCK);
+                ensure!(policy.next_payment_at_block > <frame_system::Module<T>>::block_number(), MSG_FILL_CURATOR_OPENING_INVALID_NEXT_PAYMENT_BLOCK);
 
 
                 // The verified reward settings to use
                 // The verified reward settings to use
                 Some((mint_id, policy))
                 Some((mint_id, policy))
@@ -1471,7 +1472,7 @@ decl_module! {
             // == MUTATION SAFE ==
             // == MUTATION SAFE ==
             //
             //
 
 
-            let current_block = <system::Module<T>>::block_number();
+            let current_block = <frame_system::Module<T>>::block_number();
 
 
             // For each successful application
             // For each successful application
             // - create and hold on to curator
             // - create and hold on to curator
@@ -1640,7 +1641,7 @@ decl_module! {
             // Ensure origin which will server as the source account for staked funds is signed
             // Ensure origin which will server as the source account for staked funds is signed
             let source_account = ensure_signed(origin)?;
             let source_account = ensure_signed(origin)?;
 
 
-            // In absense of a more general key delegation system which allows an account with some funds to
+            // In absense of a more general key delegation frame_system which allows an account with some funds to
             // grant another account permission to stake from its funds, the origin of this call must have the funds
             // grant another account permission to stake from its funds, the origin of this call must have the funds
             // and cannot specify another arbitrary account as the source account.
             // and cannot specify another arbitrary account as the source account.
             // Ensure the source_account is either the controller or root account of member with given id
             // Ensure the source_account is either the controller or root account of member with given id
@@ -1982,7 +1983,7 @@ impl<T: Trait> Module<T> {
             member_id: member,
             member_id: member,
             role_account,
             role_account,
             reward_relationship: None,
             reward_relationship: None,
-            inducted: <system::Module<T>>::block_number(),
+            inducted: <frame_system::Module<T>>::block_number(),
             stage: LeadRoleState::Active,
             stage: LeadRoleState::Active,
         };
         };
 
 
@@ -2011,7 +2012,7 @@ impl<T: Trait> Module<T> {
         //
         //
 
 
         // Update lead stage as exited
         // Update lead stage as exited
-        let current_block = <system::Module<T>>::block_number();
+        let current_block = <frame_system::Module<T>>::block_number();
 
 
         let new_lead = Lead {
         let new_lead = Lead {
             stage: LeadRoleState::Exited(ExitedLeadRole {
             stage: LeadRoleState::Exited(ExitedLeadRole {
@@ -2495,7 +2496,7 @@ impl<T: Trait> Module<T> {
         // otherwise they can be terminated right away.
         // otherwise they can be terminated right away.
 
 
         // Create exit summary for this termination
         // Create exit summary for this termination
-        let current_block = <system::Module<T>>::block_number();
+        let current_block = <frame_system::Module<T>>::block_number();
 
 
         let curator_exit_summary =
         let curator_exit_summary =
             CuratorExitSummary::new(exit_initiation_origin, &current_block, rationale_text);
             CuratorExitSummary::new(exit_initiation_origin, &current_block, rationale_text);

+ 13 - 9
runtime-modules/content-working-group/src/mock.rs

@@ -4,13 +4,13 @@ pub use crate::*;
 
 
 use frame_support::traits::{OnFinalize, OnInitialize};
 use frame_support::traits::{OnFinalize, OnInitialize};
 use frame_support::{impl_outer_event, impl_outer_origin, parameter_types};
 use frame_support::{impl_outer_event, impl_outer_origin, parameter_types};
+pub use frame_system;
 use sp_core::H256;
 use sp_core::H256;
 use sp_runtime::{
 use sp_runtime::{
     testing::Header,
     testing::Header,
     traits::{BlakeTwo256, IdentityLookup},
     traits::{BlakeTwo256, IdentityLookup},
     Perbill,
     Perbill,
 };
 };
-pub use system;
 
 
 pub use common::currency::GovernanceCurrency;
 pub use common::currency::GovernanceCurrency;
 pub use hiring;
 pub use hiring;
@@ -50,7 +50,7 @@ impl_outer_event! {
         versioned_store<T>,
         versioned_store<T>,
         membership<T>,
         membership<T>,
         balances<T>,
         balances<T>,
-        system<T>,
+        frame_system<T>,
         lib<T>,
         lib<T>,
     }
     }
 }
 }
@@ -63,7 +63,7 @@ pub type RawLibTestEvent = RawEvent<
     CuratorId<Test>,
     CuratorId<Test>,
     CuratorApplicationIdToCuratorIdMap<Test>,
     CuratorApplicationIdToCuratorIdMap<Test>,
     minting::BalanceOf<Test>,
     minting::BalanceOf<Test>,
-    <Test as system::Trait>::AccountId,
+    <Test as frame_system::Trait>::AccountId,
     <Test as minting::Trait>::MintId,
     <Test as minting::Trait>::MintId,
 >;
 >;
 
 
@@ -75,7 +75,7 @@ pub fn get_last_event_or_panic() -> RawLibTestEvent {
     }
     }
 }
 }
 
 
-impl system::Trait for Test {
+impl frame_system::Trait for Test {
     type BaseCallFilter = ();
     type BaseCallFilter = ();
     type Origin = Origin;
     type Origin = Origin;
     type Call = ();
     type Call = ();
@@ -96,16 +96,18 @@ impl system::Trait for Test {
     type MaximumBlockLength = MaximumBlockLength;
     type MaximumBlockLength = MaximumBlockLength;
     type AvailableBlockRatio = AvailableBlockRatio;
     type AvailableBlockRatio = AvailableBlockRatio;
     type Version = ();
     type Version = ();
-    type ModuleToIndex = ();
     type AccountData = balances::AccountData<u64>;
     type AccountData = balances::AccountData<u64>;
     type OnNewAccount = ();
     type OnNewAccount = ();
     type OnKilledAccount = ();
     type OnKilledAccount = ();
+    type PalletInfo = ();
+    type SystemWeightInfo = ();
 }
 }
 
 
 impl pallet_timestamp::Trait for Test {
 impl pallet_timestamp::Trait for Test {
     type Moment = u64;
     type Moment = u64;
     type OnTimestampSet = ();
     type OnTimestampSet = ();
     type MinimumPeriod = MinimumPeriod;
     type MinimumPeriod = MinimumPeriod;
+    type WeightInfo = ();
 }
 }
 
 
 impl balances::Trait for Test {
 impl balances::Trait for Test {
@@ -114,6 +116,8 @@ impl balances::Trait for Test {
     type Event = TestEvent;
     type Event = TestEvent;
     type ExistentialDeposit = ExistentialDeposit;
     type ExistentialDeposit = ExistentialDeposit;
     type AccountStore = System;
     type AccountStore = System;
+    type WeightInfo = ();
+    type MaxLocks = ();
 }
 }
 
 
 impl GovernanceCurrency for Test {
 impl GovernanceCurrency for Test {
@@ -178,7 +182,7 @@ impl Trait for Test {
 }
 }
 
 
 pub struct TestExternalitiesBuilder<T: Trait> {
 pub struct TestExternalitiesBuilder<T: Trait> {
-    system_config: Option<system::GenesisConfig>,
+    system_config: Option<frame_system::GenesisConfig>,
     membership_config: Option<membership::GenesisConfig<T>>,
     membership_config: Option<membership::GenesisConfig<T>>,
     content_wg_config: Option<GenesisConfig<T>>,
     content_wg_config: Option<GenesisConfig<T>>,
 }
 }
@@ -200,10 +204,10 @@ impl<T: Trait> TestExternalitiesBuilder<T> {
     }
     }
 
 
     pub fn build(self) -> sp_io::TestExternalities {
     pub fn build(self) -> sp_io::TestExternalities {
-        // Add system
+        // Add frame_system
         let mut t = self
         let mut t = self
             .system_config
             .system_config
-            .unwrap_or(system::GenesisConfig::default())
+            .unwrap_or(frame_system::GenesisConfig::default())
             .build_storage::<T>()
             .build_storage::<T>()
             .unwrap();
             .unwrap();
 
 
@@ -230,7 +234,7 @@ impl<T: Trait> TestExternalitiesBuilder<T> {
     }
     }
 }
 }
 
 
-pub type System = system::Module<Test>;
+pub type System = frame_system::Module<Test>;
 pub type Balances = balances::Module<Test>;
 pub type Balances = balances::Module<Test>;
 pub type ContentWorkingGroup = Module<Test>;
 pub type ContentWorkingGroup = Module<Test>;
 pub type Minting = minting::Module<Test>;
 pub type Minting = minting::Module<Test>;

+ 19 - 19
runtime-modules/content-working-group/src/tests.rs

@@ -4,9 +4,9 @@ use super::genesis;
 use super::mock::*;
 use super::mock::*;
 
 
 use frame_support::{assert_err, assert_ok, traits::Currency, StorageValue};
 use frame_support::{assert_err, assert_ok, traits::Currency, StorageValue};
+use frame_system::RawOrigin;
 use sp_arithmetic::traits::One;
 use sp_arithmetic::traits::One;
 use sp_std::collections::{btree_map::BTreeMap, btree_set::BTreeSet};
 use sp_std::collections::{btree_map::BTreeMap, btree_set::BTreeSet};
-use system::RawOrigin;
 
 
 use common::constraints::InputValidationLengthConstraint;
 use common::constraints::InputValidationLengthConstraint;
 use hiring;
 use hiring;
@@ -879,7 +879,7 @@ struct UpdateCuratorRoleAccountFixture {
     pub origin: Origin,
     pub origin: Origin,
     pub member_id: <Test as membership::Trait>::MemberId,
     pub member_id: <Test as membership::Trait>::MemberId,
     pub curator_id: CuratorId<Test>,
     pub curator_id: CuratorId<Test>,
-    pub new_role_account: <Test as system::Trait>::AccountId,
+    pub new_role_account: <Test as frame_system::Trait>::AccountId,
 }
 }
 
 
 impl UpdateCuratorRoleAccountFixture {
 impl UpdateCuratorRoleAccountFixture {
@@ -956,7 +956,7 @@ fn update_curator_role_account_success() {
 struct UpdateCuratorRewardAccountFixture {
 struct UpdateCuratorRewardAccountFixture {
     pub origin: Origin,
     pub origin: Origin,
     pub curator_id: CuratorId<Test>,
     pub curator_id: CuratorId<Test>,
-    pub new_reward_account: <Test as system::Trait>::AccountId,
+    pub new_reward_account: <Test as frame_system::Trait>::AccountId,
 }
 }
 
 
 impl UpdateCuratorRewardAccountFixture {
 impl UpdateCuratorRewardAccountFixture {
@@ -1176,7 +1176,7 @@ fn terminate_curator_role_success() {
 struct SetLeadFixture {
 struct SetLeadFixture {
     pub origin: Origin,
     pub origin: Origin,
     pub member_id: <Test as membership::Trait>::MemberId,
     pub member_id: <Test as membership::Trait>::MemberId,
-    pub new_role_account: <Test as system::Trait>::AccountId,
+    pub new_role_account: <Test as frame_system::Trait>::AccountId,
 }
 }
 
 
 impl SetLeadFixture {
 impl SetLeadFixture {
@@ -1386,10 +1386,10 @@ fn account_can_act_as_principal_success() {}
  * Fixtures
  * Fixtures
  */
  */
 
 
-static LEAD_ROOT_AND_CONTROLLER_ACCOUNT: <Test as system::Trait>::AccountId = 1289;
-static LEAD_ROLE_ACCOUNT: <Test as system::Trait>::AccountId = 1289;
+static LEAD_ROOT_AND_CONTROLLER_ACCOUNT: <Test as frame_system::Trait>::AccountId = 1289;
+static LEAD_ROLE_ACCOUNT: <Test as frame_system::Trait>::AccountId = 1289;
 static LEAD_MEMBER_HANDLE: &str = "IamTheLead";
 static LEAD_MEMBER_HANDLE: &str = "IamTheLead";
-static CHANNEL_CREATOR_ROOT_AND_CONTROLLER_ACCOUNT: <Test as system::Trait>::AccountId = 11;
+static CHANNEL_CREATOR_ROOT_AND_CONTROLLER_ACCOUNT: <Test as frame_system::Trait>::AccountId = 11;
 static CHANNEL_CREATOR_HANDLE: &str = "Coolcreator1";
 static CHANNEL_CREATOR_HANDLE: &str = "Coolcreator1";
 static CHANNEL_CREATOR_HANDLE2: &str = "Coolcreator2";
 static CHANNEL_CREATOR_HANDLE2: &str = "Coolcreator2";
 
 
@@ -1404,7 +1404,7 @@ fn make_generic_add_member_params() -> AddMemberAndApplyOnOpeningParams {
 
 
 /// Made into function to avoid having to clone every time we read fields
 /// Made into function to avoid having to clone every time we read fields
 pub fn get_baseline_opening_policy(
 pub fn get_baseline_opening_policy(
-) -> OpeningPolicyCommitment<<Test as system::Trait>::BlockNumber, BalanceOf<Test>> {
+) -> OpeningPolicyCommitment<<Test as frame_system::Trait>::BlockNumber, BalanceOf<Test>> {
     OpeningPolicyCommitment {
     OpeningPolicyCommitment {
         application_rationing_policy: Some(hiring::ApplicationRationingPolicy {
         application_rationing_policy: Some(hiring::ApplicationRationingPolicy {
             max_active_applicants: 5,
             max_active_applicants: 5,
@@ -1456,17 +1456,17 @@ impl FillOpeningApplicantParams {
 
 
 #[derive(Clone)]
 #[derive(Clone)]
 pub struct AddMemberAndApplyOnOpeningParams {
 pub struct AddMemberAndApplyOnOpeningParams {
-    pub curator_applicant_root_and_controller_account: <Test as system::Trait>::AccountId,
+    pub curator_applicant_root_and_controller_account: <Test as frame_system::Trait>::AccountId,
     pub handle: Vec<u8>,
     pub handle: Vec<u8>,
-    pub curator_applicant_role_account: <Test as system::Trait>::AccountId,
+    pub curator_applicant_role_account: <Test as frame_system::Trait>::AccountId,
     pub human_readable_text: Vec<u8>,
     pub human_readable_text: Vec<u8>,
 }
 }
 
 
 impl AddMemberAndApplyOnOpeningParams {
 impl AddMemberAndApplyOnOpeningParams {
     pub fn new(
     pub fn new(
-        curator_applicant_root_and_controller_account: <Test as system::Trait>::AccountId,
+        curator_applicant_root_and_controller_account: <Test as frame_system::Trait>::AccountId,
         handle: Vec<u8>,
         handle: Vec<u8>,
-        curator_applicant_role_account: <Test as system::Trait>::AccountId,
+        curator_applicant_role_account: <Test as frame_system::Trait>::AccountId,
         human_readable_text: Vec<u8>,
         human_readable_text: Vec<u8>,
     ) -> Self {
     ) -> Self {
         Self {
         Self {
@@ -1505,9 +1505,9 @@ struct NewMemberAppliedResult {
 
 
 fn add_member_and_apply_on_opening(
 fn add_member_and_apply_on_opening(
     curator_opening_id: CuratorOpeningId<Test>,
     curator_opening_id: CuratorOpeningId<Test>,
-    curator_applicant_root_and_controller_account: <Test as system::Trait>::AccountId,
+    curator_applicant_root_and_controller_account: <Test as frame_system::Trait>::AccountId,
     handle: Vec<u8>,
     handle: Vec<u8>,
-    curator_applicant_role_account: <Test as system::Trait>::AccountId,
+    curator_applicant_role_account: <Test as frame_system::Trait>::AccountId,
     human_readable_text: Vec<u8>,
     human_readable_text: Vec<u8>,
 ) -> NewMemberAppliedResult {
 ) -> NewMemberAppliedResult {
     // Make membership
     // Make membership
@@ -1925,8 +1925,8 @@ fn setup_lead_and_hire_curator() -> SetupLeadAndHireCuratorResult {
 
 
 struct CreateChannelFixture {
 struct CreateChannelFixture {
     pub channel_creator_member_id: <Test as membership::Trait>::MemberId,
     pub channel_creator_member_id: <Test as membership::Trait>::MemberId,
-    pub controller_account: <Test as system::Trait>::AccountId,
-    pub channel_creator_role_account: <Test as system::Trait>::AccountId,
+    pub controller_account: <Test as frame_system::Trait>::AccountId,
+    pub channel_creator_role_account: <Test as frame_system::Trait>::AccountId,
     pub channel_handle: Vec<u8>,
     pub channel_handle: Vec<u8>,
     pub channel_title: OptionalText,
     pub channel_title: OptionalText,
     pub description: OptionalText,
     pub description: OptionalText,
@@ -1939,7 +1939,7 @@ struct CreateChannelFixture {
 impl CreateChannelFixture {
 impl CreateChannelFixture {
     pub fn make_valid_unpulished_video_channel_for(
     pub fn make_valid_unpulished_video_channel_for(
         channel_creator_member_id: <Test as membership::Trait>::MemberId,
         channel_creator_member_id: <Test as membership::Trait>::MemberId,
-        override_controller_account: Option<<Test as system::Trait>::AccountId>,
+        override_controller_account: Option<<Test as frame_system::Trait>::AccountId>,
     ) -> Self {
     ) -> Self {
         let controller_account = if let Some(account) = override_controller_account {
         let controller_account = if let Some(account) = override_controller_account {
             account
             account
@@ -2090,7 +2090,7 @@ pub fn add_channel_creator_member() -> <Test as membership::Trait>::MemberId {
 }
 }
 
 
 pub fn add_member(
 pub fn add_member(
-    root_and_controller_account: <Test as system::Trait>::AccountId,
+    root_and_controller_account: <Test as frame_system::Trait>::AccountId,
     handle: Vec<u8>,
     handle: Vec<u8>,
 ) -> <Test as membership::Trait>::MemberId {
 ) -> <Test as membership::Trait>::MemberId {
     let next_member_id = membership::NextMemberId::<Test>::get();
     let next_member_id = membership::NextMemberId::<Test>::get();
@@ -2112,7 +2112,7 @@ pub fn add_member(
 
 
 pub fn set_lead(
 pub fn set_lead(
     member_id: <Test as membership::Trait>::MemberId,
     member_id: <Test as membership::Trait>::MemberId,
-    new_role_account: <Test as system::Trait>::AccountId,
+    new_role_account: <Test as frame_system::Trait>::AccountId,
 ) -> LeadId<Test> {
 ) -> LeadId<Test> {
     /*
     /*
        Events are not emitted on block 0.
        Events are not emitted on block 0.

+ 12 - 12
runtime-modules/forum/Cargo.toml

@@ -1,23 +1,23 @@
 [package]
 [package]
 name = 'pallet-forum'
 name = 'pallet-forum'
-version = '3.0.0'
+version = '3.1.0'
 authors = ['Joystream contributors']
 authors = ['Joystream contributors']
 edition = '2018'
 edition = '2018'
 
 
 [dependencies]
 [dependencies]
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
-codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] }
-frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+codec = { package = 'parity-scale-codec', version = '1.3.4', default-features = false, features = ['derive'] }
+frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 common = { package = 'pallet-common', default-features = false, path = '../common'}
 common = { package = 'pallet-common', default-features = false, path = '../common'}
 
 
 [dev-dependencies]
 [dev-dependencies]
-sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 
 
 [features]
 [features]
 default = ['std']
 default = ['std']
@@ -25,10 +25,10 @@ std = [
 	'serde',
 	'serde',
 	'codec/std',
 	'codec/std',
 	'frame-support/std',
 	'frame-support/std',
-	'system/std',
+	'frame-system/std',
 	'sp-std/std',
 	'sp-std/std',
 	'sp-arithmetic/std',
 	'sp-arithmetic/std',
 	'sp-runtime/std',
 	'sp-runtime/std',
 	'pallet-timestamp/std',
 	'pallet-timestamp/std',
 	'common/std',
 	'common/std',
-]
+]

+ 4 - 4
runtime-modules/forum/src/lib.rs

@@ -64,7 +64,7 @@ const ERROR_CATEGORY_NOT_BEING_UPDATED: &str = "Category not being updated.";
 const ERROR_CATEGORY_CANNOT_BE_UNARCHIVED_WHEN_DELETED: &str =
 const ERROR_CATEGORY_CANNOT_BE_UNARCHIVED_WHEN_DELETED: &str =
     "Category cannot be unarchived when deleted.";
     "Category cannot be unarchived when deleted.";
 
 
-use system::{ensure_root, ensure_signed};
+use frame_system::{ensure_root, ensure_signed};
 
 
 /// Represents a user in this forum.
 /// Represents a user in this forum.
 #[derive(Debug, Copy, Clone)]
 #[derive(Debug, Copy, Clone)]
@@ -261,8 +261,8 @@ impl<BlockNumber, Moment, AccountId> Category<BlockNumber, Moment, AccountId> {
 type CategoryTreePath<BlockNumber, Moment, AccountId> =
 type CategoryTreePath<BlockNumber, Moment, AccountId> =
     Vec<Category<BlockNumber, Moment, AccountId>>;
     Vec<Category<BlockNumber, Moment, AccountId>>;
 
 
-pub trait Trait: system::Trait + pallet_timestamp::Trait + Sized {
-    type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;
+pub trait Trait: frame_system::Trait + pallet_timestamp::Trait + Sized {
+    type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>;
 
 
     type MembershipRegistry: ForumUserRegistry<Self::AccountId>;
     type MembershipRegistry: ForumUserRegistry<Self::AccountId>;
 
 
@@ -329,7 +329,7 @@ decl_storage! {
 decl_event!(
 decl_event!(
     pub enum Event<T>
     pub enum Event<T>
     where
     where
-        <T as system::Trait>::AccountId,
+        <T as frame_system::Trait>::AccountId,
         <T as Trait>::ThreadId,
         <T as Trait>::ThreadId,
         <T as Trait>::PostId,
         <T as Trait>::PostId,
     {
     {

+ 16 - 14
runtime-modules/forum/src/mock.rs

@@ -69,7 +69,7 @@ parameter_types! {
     pub const MinimumPeriod: u64 = 5;
     pub const MinimumPeriod: u64 = 5;
 }
 }
 
 
-impl system::Trait for Runtime {
+impl frame_system::Trait for Runtime {
     type BaseCallFilter = ();
     type BaseCallFilter = ();
     type Origin = Origin;
     type Origin = Origin;
     type Call = ();
     type Call = ();
@@ -90,16 +90,18 @@ impl system::Trait for Runtime {
     type MaximumBlockLength = MaximumBlockLength;
     type MaximumBlockLength = MaximumBlockLength;
     type AvailableBlockRatio = AvailableBlockRatio;
     type AvailableBlockRatio = AvailableBlockRatio;
     type Version = ();
     type Version = ();
-    type ModuleToIndex = ();
     type AccountData = ();
     type AccountData = ();
     type OnNewAccount = ();
     type OnNewAccount = ();
     type OnKilledAccount = ();
     type OnKilledAccount = ();
+    type SystemWeightInfo = ();
+    type PalletInfo = ();
 }
 }
 
 
 impl pallet_timestamp::Trait for Runtime {
 impl pallet_timestamp::Trait for Runtime {
     type Moment = u64;
     type Moment = u64;
     type OnTimestampSet = ();
     type OnTimestampSet = ();
     type MinimumPeriod = MinimumPeriod;
     type MinimumPeriod = MinimumPeriod;
+    type WeightInfo = ();
 }
 }
 
 
 impl Trait for Runtime {
 impl Trait for Runtime {
@@ -111,7 +113,7 @@ impl Trait for Runtime {
 
 
 #[derive(Clone)]
 #[derive(Clone)]
 pub enum OriginType {
 pub enum OriginType {
-    Signed(<Runtime as system::Trait>::AccountId),
+    Signed(<Runtime as frame_system::Trait>::AccountId),
     //Inherent, <== did not find how to make such an origin yet
     //Inherent, <== did not find how to make such an origin yet
     Root,
     Root,
 }
 }
@@ -120,7 +122,7 @@ pub fn mock_origin(origin: OriginType) -> mock::Origin {
     match origin {
     match origin {
         OriginType::Signed(account_id) => Origin::signed(account_id),
         OriginType::Signed(account_id) => Origin::signed(account_id),
         //OriginType::Inherent => Origin::inherent,
         //OriginType::Inherent => Origin::inherent,
-        OriginType::Root => system::RawOrigin::Root.into(), //Origin::root
+        OriginType::Root => frame_system::RawOrigin::Root.into(), //Origin::root
     }
     }
 }
 }
 
 
@@ -455,25 +457,25 @@ pub fn default_genesis_config() -> GenesisConfig<Runtime> {
 
 
 pub type RuntimeMap<K, V> = std::vec::Vec<(K, V)>;
 pub type RuntimeMap<K, V> = std::vec::Vec<(K, V)>;
 pub type RuntimeCategory = Category<
 pub type RuntimeCategory = Category<
-    <Runtime as system::Trait>::BlockNumber,
+    <Runtime as frame_system::Trait>::BlockNumber,
     <Runtime as pallet_timestamp::Trait>::Moment,
     <Runtime as pallet_timestamp::Trait>::Moment,
-    <Runtime as system::Trait>::AccountId,
+    <Runtime as frame_system::Trait>::AccountId,
 >;
 >;
 pub type RuntimeThread = Thread<
 pub type RuntimeThread = Thread<
-    <Runtime as system::Trait>::BlockNumber,
+    <Runtime as frame_system::Trait>::BlockNumber,
     <Runtime as pallet_timestamp::Trait>::Moment,
     <Runtime as pallet_timestamp::Trait>::Moment,
-    <Runtime as system::Trait>::AccountId,
+    <Runtime as frame_system::Trait>::AccountId,
     RuntimeThreadId,
     RuntimeThreadId,
 >;
 >;
 pub type RuntimePost = Post<
 pub type RuntimePost = Post<
-    <Runtime as system::Trait>::BlockNumber,
+    <Runtime as frame_system::Trait>::BlockNumber,
     <Runtime as pallet_timestamp::Trait>::Moment,
     <Runtime as pallet_timestamp::Trait>::Moment,
-    <Runtime as system::Trait>::AccountId,
+    <Runtime as frame_system::Trait>::AccountId,
     RuntimeThreadId,
     RuntimeThreadId,
     RuntimePostId,
     RuntimePostId,
 >;
 >;
 pub type RuntimeBlockchainTimestamp = BlockAndTime<
 pub type RuntimeBlockchainTimestamp = BlockAndTime<
-    <Runtime as system::Trait>::BlockNumber,
+    <Runtime as frame_system::Trait>::BlockNumber,
     <Runtime as pallet_timestamp::Trait>::Moment,
     <Runtime as pallet_timestamp::Trait>::Moment,
 >;
 >;
 
 
@@ -487,7 +489,7 @@ pub fn genesis_config(
     next_thread_id: u64,
     next_thread_id: u64,
     post_by_id: &RuntimeMap<RuntimePostId, RuntimePost>,
     post_by_id: &RuntimeMap<RuntimePostId, RuntimePost>,
     next_post_id: u64,
     next_post_id: u64,
-    forum_sudo: <Runtime as system::Trait>::AccountId,
+    forum_sudo: <Runtime as frame_system::Trait>::AccountId,
     category_title_constraint: &InputValidationLengthConstraint,
     category_title_constraint: &InputValidationLengthConstraint,
     category_description_constraint: &InputValidationLengthConstraint,
     category_description_constraint: &InputValidationLengthConstraint,
     thread_title_constraint: &InputValidationLengthConstraint,
     thread_title_constraint: &InputValidationLengthConstraint,
@@ -523,7 +525,7 @@ pub fn default_mock_forum_user_registry_genesis_config() -> registry::GenesisCon
 // Wanted to have payload: a: &GenesisConfig<Test>
 // Wanted to have payload: a: &GenesisConfig<Test>
 // but borrow checker made my life miserabl, so giving up for now.
 // but borrow checker made my life miserabl, so giving up for now.
 pub fn build_test_externalities(config: GenesisConfig<Runtime>) -> sp_io::TestExternalities {
 pub fn build_test_externalities(config: GenesisConfig<Runtime>) -> sp_io::TestExternalities {
-    let mut t = system::GenesisConfig::default()
+    let mut t = frame_system::GenesisConfig::default()
         .build_storage::<Runtime>()
         .build_storage::<Runtime>()
         .unwrap();
         .unwrap();
 
 
@@ -537,7 +539,7 @@ pub fn build_test_externalities(config: GenesisConfig<Runtime>) -> sp_io::TestEx
     t.into()
     t.into()
 }
 }
 
 
-// pub type System = system::Module<Runtime>;
+// pub type System = frame_system::Module<Runtime>;
 
 
 /// Export forum module on a test runtime
 /// Export forum module on a test runtime
 pub type TestForumModule = Module<Runtime>;
 pub type TestForumModule = Module<Runtime>;

+ 13 - 13
runtime-modules/governance/Cargo.toml

@@ -1,27 +1,27 @@
 [package]
 [package]
 name = 'pallet-governance'
 name = 'pallet-governance'
-version = '3.0.0'
+version = '3.1.0'
 authors = ['Joystream contributors']
 authors = ['Joystream contributors']
 edition = '2018'
 edition = '2018'
 
 
 [dependencies]
 [dependencies]
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
-codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] }
-sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+codec = { package = 'parity-scale-codec', version = '1.3.4', default-features = false, features = ['derive'] }
+sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 membership = { package = 'pallet-membership', default-features = false, path = '../membership'}
 membership = { package = 'pallet-membership', default-features = false, path = '../membership'}
 minting = { package = 'pallet-token-mint', default-features = false, path = '../token-minting'}
 minting = { package = 'pallet-token-mint', default-features = false, path = '../token-minting'}
 recurringrewards = { package = 'pallet-recurring-reward', default-features = false, path = '../recurring-reward'}
 recurringrewards = { package = 'pallet-recurring-reward', default-features = false, path = '../recurring-reward'}
 common = { package = 'pallet-common', default-features = false, path = '../common'}
 common = { package = 'pallet-common', default-features = false, path = '../common'}
 
 
 [dev-dependencies]
 [dev-dependencies]
-sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 
 
 [features]
 [features]
 default = ['std']
 default = ['std']
@@ -30,7 +30,7 @@ std = [
 	'codec/std',
 	'codec/std',
 	'sp-std/std',
 	'sp-std/std',
 	'frame-support/std',
 	'frame-support/std',
-	'system/std',
+	'frame-system/std',
 	'sp-arithmetic/std',
 	'sp-arithmetic/std',
 	'sp-runtime/std',
 	'sp-runtime/std',
 	'pallet-timestamp/std',
 	'pallet-timestamp/std',
@@ -38,4 +38,4 @@ std = [
 	'minting/std',
 	'minting/std',
 	'recurringrewards/std',
 	'recurringrewards/std',
 	'common/std',
 	'common/std',
-]
+]

+ 17 - 14
runtime-modules/governance/src/council.rs

@@ -1,8 +1,8 @@
 use frame_support::{debug, decl_event, decl_module, decl_storage, ensure};
 use frame_support::{debug, decl_event, decl_module, decl_storage, ensure};
+use frame_system::ensure_root;
 use sp_arithmetic::traits::{One, Zero};
 use sp_arithmetic::traits::{One, Zero};
 use sp_std::vec;
 use sp_std::vec;
 use sp_std::vec::Vec;
 use sp_std::vec::Vec;
-use system::ensure_root;
 
 
 pub use super::election::{self, CouncilElected, Seat, Seats};
 pub use super::election::{self, CouncilElected, Seat, Seats};
 pub use common::currency::{BalanceOf, GovernanceCurrency};
 pub use common::currency::{BalanceOf, GovernanceCurrency};
@@ -22,8 +22,8 @@ impl<X: CouncilTermEnded> CouncilTermEnded for (X,) {
     }
     }
 }
 }
 
 
-pub trait Trait: system::Trait + recurringrewards::Trait + GovernanceCurrency {
-    type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;
+pub trait Trait: frame_system::Trait + recurringrewards::Trait + GovernanceCurrency {
+    type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>;
 
 
     type CouncilTermEnded: CouncilTermEnded;
     type CouncilTermEnded: CouncilTermEnded;
 }
 }
@@ -71,7 +71,7 @@ decl_storage! {
 
 
 // Event for this module.
 // Event for this module.
 decl_event!(
 decl_event!(
-    pub enum Event<T> where <T as system::Trait>::BlockNumber {
+    pub enum Event<T> where <T as frame_system::Trait>::BlockNumber {
         CouncilTermEnded(BlockNumber),
         CouncilTermEnded(BlockNumber),
         NewCouncilTermStarted(BlockNumber),
         NewCouncilTermStarted(BlockNumber),
     }
     }
@@ -81,7 +81,7 @@ impl<T: Trait> CouncilElected<Seats<T::AccountId, BalanceOf<T>>, T::BlockNumber>
     fn council_elected(seats: Seats<T::AccountId, BalanceOf<T>>, term: T::BlockNumber) {
     fn council_elected(seats: Seats<T::AccountId, BalanceOf<T>>, term: T::BlockNumber) {
         <ActiveCouncil<T>>::put(seats.clone());
         <ActiveCouncil<T>>::put(seats.clone());
 
 
-        let next_term_ends_at = <system::Module<T>>::block_number() + term;
+        let next_term_ends_at = <frame_system::Module<T>>::block_number() + term;
 
 
         <TermEndsAt<T>>::put(next_term_ends_at);
         <TermEndsAt<T>>::put(next_term_ends_at);
 
 
@@ -95,7 +95,7 @@ impl<T: Trait> CouncilElected<Seats<T::AccountId, BalanceOf<T>>, T::BlockNumber>
 
 
 impl<T: Trait> Module<T> {
 impl<T: Trait> Module<T> {
     pub fn is_term_ended() -> bool {
     pub fn is_term_ended() -> bool {
-        <system::Module<T>>::block_number() >= Self::term_ends_at()
+        <frame_system::Module<T>>::block_number() >= Self::term_ends_at()
     }
     }
 
 
     pub fn is_councilor(sender: &T::AccountId) -> bool {
     pub fn is_councilor(sender: &T::AccountId) -> bool {
@@ -107,7 +107,7 @@ impl<T: Trait> Module<T> {
 
 
         // When calculating when first payout occurs, add minimum of one block interval to ensure rewards module
         // When calculating when first payout occurs, add minimum of one block interval to ensure rewards module
         // has a chance to execute its on_finalize routine.
         // has a chance to execute its on_finalize routine.
-        let next_payout_at = system::Module::<T>::block_number()
+        let next_payout_at = frame_system::Module::<T>::block_number()
             + Self::first_payout_after_reward_created()
             + Self::first_payout_after_reward_created()
             + T::BlockNumber::one();
             + T::BlockNumber::one();
 
 
@@ -229,7 +229,7 @@ decl_module! {
         #[weight = 10_000_000] // TODO: adjust weight
         #[weight = 10_000_000] // TODO: adjust weight
         fn set_term_ends_at(origin, ends_at: T::BlockNumber) {
         fn set_term_ends_at(origin, ends_at: T::BlockNumber) {
             ensure_root(origin)?;
             ensure_root(origin)?;
-            ensure!(ends_at > <system::Module<T>>::block_number(), "must set future block number");
+            ensure!(ends_at > <frame_system::Module<T>>::block_number(), "must set future block number");
             <TermEndsAt<T>>::put(ends_at);
             <TermEndsAt<T>>::put(ends_at);
         }
         }
 
 
@@ -280,8 +280,11 @@ mod tests {
     use crate::DispatchResult;
     use crate::DispatchResult;
     use frame_support::*;
     use frame_support::*;
 
 
-    fn add_council_member_as_root(account: <Test as system::Trait>::AccountId) -> DispatchResult {
-        Council::add_council_member(system::RawOrigin::Root.into(), account).map_err(|e| e.into())
+    fn add_council_member_as_root(
+        account: <Test as frame_system::Trait>::AccountId,
+    ) -> DispatchResult {
+        Council::add_council_member(frame_system::RawOrigin::Root.into(), account)
+            .map_err(|e| e.into())
     }
     }
 
 
     #[test]
     #[test]
@@ -306,7 +309,7 @@ mod tests {
             assert_ok!(add_council_member_as_root(3));
             assert_ok!(add_council_member_as_root(3));
 
 
             assert_ok!(Council::remove_council_member(
             assert_ok!(Council::remove_council_member(
-                system::RawOrigin::Root.into(),
+                frame_system::RawOrigin::Root.into(),
                 2
                 2
             ));
             ));
 
 
@@ -320,7 +323,7 @@ mod tests {
     fn set_council_test() {
     fn set_council_test() {
         initial_test_ext().execute_with(|| {
         initial_test_ext().execute_with(|| {
             assert_ok!(Council::set_council(
             assert_ok!(Council::set_council(
-                system::RawOrigin::Root.into(),
+                frame_system::RawOrigin::Root.into(),
                 vec![4, 5, 6]
                 vec![4, 5, 6]
             ));
             ));
             assert!(Council::is_councilor(&4));
             assert!(Council::is_councilor(&4));
@@ -334,7 +337,7 @@ mod tests {
         initial_test_ext().execute_with(|| {
         initial_test_ext().execute_with(|| {
             // Ensure a mint is created so we can create rewards
             // Ensure a mint is created so we can create rewards
             assert_ok!(Council::set_council_mint_capacity(
             assert_ok!(Council::set_council_mint_capacity(
-                system::RawOrigin::Root.into(),
+                frame_system::RawOrigin::Root.into(),
                 1000
                 1000
             ));
             ));
 
 
@@ -356,7 +359,7 @@ mod tests {
                         backers: vec![],
                         backers: vec![],
                     },
                     },
                 ],
                 ],
-                50 as u64, // <Test as system::Trait>::BlockNumber::from(50)
+                50 as u64, // <Test as frame_system::Trait>::BlockNumber::from(50)
             );
             );
 
 
             assert!(Council::is_councilor(&5));
             assert!(Council::is_councilor(&5));

+ 30 - 22
runtime-modules/governance/src/election.rs

@@ -35,13 +35,13 @@ use serde::{Deserialize, Serialize};
 use codec::{Decode, Encode};
 use codec::{Decode, Encode};
 use frame_support::traits::{Currency, ReservableCurrency};
 use frame_support::traits::{Currency, ReservableCurrency};
 use frame_support::{decl_event, decl_module, decl_storage, ensure};
 use frame_support::{decl_event, decl_module, decl_storage, ensure};
+use frame_system::{ensure_root, ensure_signed};
 use sp_arithmetic::traits::Zero;
 use sp_arithmetic::traits::Zero;
 use sp_runtime::traits::Hash;
 use sp_runtime::traits::Hash;
 use sp_std::collections::btree_map::BTreeMap;
 use sp_std::collections::btree_map::BTreeMap;
 use sp_std::ops::Add;
 use sp_std::ops::Add;
 use sp_std::vec;
 use sp_std::vec;
 use sp_std::vec::Vec;
 use sp_std::vec::Vec;
-use system::{ensure_root, ensure_signed};
 
 
 use super::sealed_vote::SealedVote;
 use super::sealed_vote::SealedVote;
 use super::stake::Stake;
 use super::stake::Stake;
@@ -52,8 +52,10 @@ pub use common::currency::{BalanceOf, GovernanceCurrency};
 
 
 use crate::DispatchResult;
 use crate::DispatchResult;
 
 
-pub trait Trait: system::Trait + council::Trait + GovernanceCurrency + membership::Trait {
-    type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;
+pub trait Trait:
+    frame_system::Trait + council::Trait + GovernanceCurrency + membership::Trait
+{
+    type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>;
 
 
     type CouncilElected: CouncilElected<Seats<Self::AccountId, BalanceOf<Self>>, Self::BlockNumber>;
     type CouncilElected: CouncilElected<Seats<Self::AccountId, BalanceOf<Self>>, Self::BlockNumber>;
 }
 }
@@ -183,9 +185,9 @@ decl_storage! {
 // Event for this module.
 // Event for this module.
 decl_event!(
 decl_event!(
     pub enum Event<T> where
     pub enum Event<T> where
-    <T as system::Trait>::BlockNumber,
-    <T as system::Trait>::AccountId,
-    <T as system::Trait>::Hash  {
+    <T as frame_system::Trait>::BlockNumber,
+    <T as frame_system::Trait>::AccountId,
+    <T as frame_system::Trait>::Hash  {
         /// A new election started
         /// A new election started
         ElectionStarted(),
         ElectionStarted(),
         AnnouncingStarted(u32),
         AnnouncingStarted(u32),
@@ -213,7 +215,7 @@ impl<T: Trait> Module<T> {
     }
     }
 
 
     fn current_block_number_plus(length: T::BlockNumber) -> T::BlockNumber {
     fn current_block_number_plus(length: T::BlockNumber) -> T::BlockNumber {
-        <system::Module<T>>::block_number() + length
+        <frame_system::Module<T>>::block_number() + length
     }
     }
 
 
     fn can_participate(sender: &T::AccountId) -> bool {
     fn can_participate(sender: &T::AccountId) -> bool {
@@ -255,7 +257,7 @@ impl<T: Trait> Module<T> {
         ensure!(Self::commitments().is_empty(), "commitments must be empty");
         ensure!(Self::commitments().is_empty(), "commitments must be empty");
 
 
         // Take snapshot of seat and backing stakes of an existing council
         // Take snapshot of seat and backing stakes of an existing council
-        // Its important to note that the election system takes ownership of these stakes, and is responsible
+        // Its important to note that the election frame_system takes ownership of these stakes, and is responsible
         // to return any unused stake to original owners at the end of the election.
         // to return any unused stake to original owners at the end of the election.
         Self::initialize_transferable_stakes(current_council);
         Self::initialize_transferable_stakes(current_council);
 
 
@@ -394,7 +396,9 @@ impl<T: Trait> Module<T> {
         let new_council = new_council.into_iter().map(|(_, seat)| seat).collect();
         let new_council = new_council.into_iter().map(|(_, seat)| seat).collect();
         T::CouncilElected::council_elected(new_council, Self::new_term_duration());
         T::CouncilElected::council_elected(new_council, Self::new_term_duration());
 
 
-        Self::deposit_event(RawEvent::CouncilElected(<system::Module<T>>::block_number()));
+        Self::deposit_event(RawEvent::CouncilElected(
+            <frame_system::Module<T>>::block_number(),
+        ));
     }
     }
 
 
     fn teardown_election(
     fn teardown_election(
@@ -785,7 +789,11 @@ impl<T: Trait> Module<T> {
         let mut salt = salt;
         let mut salt = salt;
 
 
         // Tries to unseal, if salt is invalid will return error
         // Tries to unseal, if salt is invalid will return error
-        sealed_vote.unseal(vote_for, &mut salt, <T as system::Trait>::Hashing::hash)?;
+        sealed_vote.unseal(
+            vote_for,
+            &mut salt,
+            <T as frame_system::Trait>::Hashing::hash,
+        )?;
 
 
         // Update the revealed vote
         // Update the revealed vote
         <Votes<T>>::insert(commitment, sealed_vote);
         <Votes<T>>::insert(commitment, sealed_vote);
@@ -881,21 +889,21 @@ decl_module! {
         #[weight = 10_000_000] // TODO: adjust weight
         #[weight = 10_000_000] // TODO: adjust weight
         fn set_stage_announcing(origin, ends_at: T::BlockNumber) {
         fn set_stage_announcing(origin, ends_at: T::BlockNumber) {
             ensure_root(origin)?;
             ensure_root(origin)?;
-            ensure!(ends_at > <system::Module<T>>::block_number(), "must end at future block number");
+            ensure!(ends_at > <frame_system::Module<T>>::block_number(), "must end at future block number");
             <Stage<T>>::put(ElectionStage::Announcing(ends_at));
             <Stage<T>>::put(ElectionStage::Announcing(ends_at));
         }
         }
 
 
         #[weight = 10_000_000] // TODO: adjust weight
         #[weight = 10_000_000] // TODO: adjust weight
         fn set_stage_revealing(origin, ends_at: T::BlockNumber) {
         fn set_stage_revealing(origin, ends_at: T::BlockNumber) {
             ensure_root(origin)?;
             ensure_root(origin)?;
-            ensure!(ends_at > <system::Module<T>>::block_number(), "must end at future block number");
+            ensure!(ends_at > <frame_system::Module<T>>::block_number(), "must end at future block number");
             <Stage<T>>::put(ElectionStage::Revealing(ends_at));
             <Stage<T>>::put(ElectionStage::Revealing(ends_at));
         }
         }
 
 
         #[weight = 10_000_000] // TODO: adjust weight
         #[weight = 10_000_000] // TODO: adjust weight
         fn set_stage_voting(origin, ends_at: T::BlockNumber) {
         fn set_stage_voting(origin, ends_at: T::BlockNumber) {
             ensure_root(origin)?;
             ensure_root(origin)?;
-            ensure!(ends_at > <system::Module<T>>::block_number(), "must end at future block number");
+            ensure!(ends_at > <frame_system::Module<T>>::block_number(), "must end at future block number");
             <Stage<T>>::put(ElectionStage::Voting(ends_at));
             <Stage<T>>::put(ElectionStage::Voting(ends_at));
         }
         }
 
 
@@ -961,7 +969,7 @@ mod tests {
     use codec::Encode;
     use codec::Encode;
     use frame_support::traits::OnFinalize;
     use frame_support::traits::OnFinalize;
     use frame_support::{assert_err, assert_ok};
     use frame_support::{assert_err, assert_ok};
-    use system::RawOrigin;
+    use frame_system::RawOrigin;
 
 
     #[test]
     #[test]
     fn election_starts_when_council_term_ends() {
     fn election_starts_when_council_term_ends() {
@@ -1022,7 +1030,7 @@ mod tests {
         });
         });
     }
     }
 
 
-    fn assert_announcing_period(expected_period: <Test as system::Trait>::BlockNumber) {
+    fn assert_announcing_period(expected_period: <Test as frame_system::Trait>::BlockNumber) {
         assert!(
         assert!(
             Election::is_election_running(),
             Election::is_election_running(),
             "Election Stage was not set"
             "Election Stage was not set"
@@ -1388,7 +1396,7 @@ mod tests {
         initial_test_ext().execute_with(|| {
         initial_test_ext().execute_with(|| {
             let _ = Balances::deposit_creating(&20, 1000);
             let _ = Balances::deposit_creating(&20, 1000);
             let payload = vec![10u8];
             let payload = vec![10u8];
-            let commitment = <Test as system::Trait>::Hashing::hash(&payload[..]);
+            let commitment = <Test as frame_system::Trait>::Hashing::hash(&payload[..]);
 
 
             assert!(Election::try_add_vote(20, 100, commitment).is_ok());
             assert!(Election::try_add_vote(20, 100, commitment).is_ok());
 
 
@@ -1424,7 +1432,7 @@ mod tests {
             );
             );
 
 
             let payload = vec![10u8];
             let payload = vec![10u8];
-            let commitment = <Test as system::Trait>::Hashing::hash(&payload[..]);
+            let commitment = <Test as frame_system::Trait>::Hashing::hash(&payload[..]);
 
 
             assert!(Election::try_add_vote(20, 100, commitment).is_ok());
             assert!(Election::try_add_vote(20, 100, commitment).is_ok());
 
 
@@ -1456,7 +1464,7 @@ mod tests {
             );
             );
 
 
             let payload = vec![10u8];
             let payload = vec![10u8];
-            let commitment = <Test as system::Trait>::Hashing::hash(&payload[..]);
+            let commitment = <Test as frame_system::Trait>::Hashing::hash(&payload[..]);
 
 
             assert!(Election::try_add_vote(20, 1000, commitment).is_err());
             assert!(Election::try_add_vote(20, 1000, commitment).is_err());
             assert_eq!(Election::commitments(), vec![]);
             assert_eq!(Election::commitments(), vec![]);
@@ -1479,7 +1487,7 @@ mod tests {
             );
             );
 
 
             let payload = vec![10u8];
             let payload = vec![10u8];
-            let commitment = <Test as system::Trait>::Hashing::hash(&payload[..]);
+            let commitment = <Test as frame_system::Trait>::Hashing::hash(&payload[..]);
 
 
             assert!(Election::try_add_vote(20, 100, commitment).is_ok());
             assert!(Election::try_add_vote(20, 100, commitment).is_ok());
 
 
@@ -1500,12 +1508,12 @@ mod tests {
     }
     }
 
 
     fn make_commitment_for_applicant(
     fn make_commitment_for_applicant(
-        applicant: <Test as system::Trait>::AccountId,
+        applicant: <Test as frame_system::Trait>::AccountId,
         salt: &mut Vec<u8>,
         salt: &mut Vec<u8>,
-    ) -> <Test as system::Trait>::Hash {
+    ) -> <Test as frame_system::Trait>::Hash {
         let mut payload = applicant.encode();
         let mut payload = applicant.encode();
         payload.append(salt);
         payload.append(salt);
-        <Test as system::Trait>::Hashing::hash(&payload[..])
+        <Test as frame_system::Trait>::Hashing::hash(&payload[..])
     }
     }
 
 
     #[test]
     #[test]

+ 9 - 5
runtime-modules/governance/src/mock.rs

@@ -4,13 +4,13 @@ pub use super::{council, election};
 pub use common::currency::GovernanceCurrency;
 pub use common::currency::GovernanceCurrency;
 
 
 use frame_support::{impl_outer_origin, parameter_types};
 use frame_support::{impl_outer_origin, parameter_types};
+pub use frame_system;
 use sp_core::H256;
 use sp_core::H256;
 use sp_runtime::{
 use sp_runtime::{
     testing::Header,
     testing::Header,
     traits::{BlakeTwo256, IdentityLookup},
     traits::{BlakeTwo256, IdentityLookup},
     BuildStorage, Perbill,
     BuildStorage, Perbill,
 };
 };
-pub use system;
 
 
 impl_outer_origin! {
 impl_outer_origin! {
     pub enum Origin for Test {}
     pub enum Origin for Test {}
@@ -27,7 +27,7 @@ parameter_types! {
     pub const MinimumPeriod: u64 = 5;
     pub const MinimumPeriod: u64 = 5;
 }
 }
 
 
-impl system::Trait for Test {
+impl frame_system::Trait for Test {
     type BaseCallFilter = ();
     type BaseCallFilter = ();
     type Origin = Origin;
     type Origin = Origin;
     type Call = ();
     type Call = ();
@@ -48,16 +48,18 @@ impl system::Trait for Test {
     type MaximumBlockLength = MaximumBlockLength;
     type MaximumBlockLength = MaximumBlockLength;
     type AvailableBlockRatio = AvailableBlockRatio;
     type AvailableBlockRatio = AvailableBlockRatio;
     type Version = ();
     type Version = ();
-    type ModuleToIndex = ();
     type AccountData = balances::AccountData<u64>;
     type AccountData = balances::AccountData<u64>;
     type OnNewAccount = ();
     type OnNewAccount = ();
     type OnKilledAccount = ();
     type OnKilledAccount = ();
+    type PalletInfo = ();
+    type SystemWeightInfo = ();
 }
 }
 
 
 impl pallet_timestamp::Trait for Test {
 impl pallet_timestamp::Trait for Test {
     type Moment = u64;
     type Moment = u64;
     type OnTimestampSet = ();
     type OnTimestampSet = ();
     type MinimumPeriod = MinimumPeriod;
     type MinimumPeriod = MinimumPeriod;
+    type WeightInfo = ();
 }
 }
 impl council::Trait for Test {
 impl council::Trait for Test {
     type Event = ();
     type Event = ();
@@ -95,6 +97,8 @@ impl balances::Trait for Test {
     type Event = ();
     type Event = ();
     type ExistentialDeposit = ExistentialDeposit;
     type ExistentialDeposit = ExistentialDeposit;
     type AccountStore = System;
     type AccountStore = System;
+    type WeightInfo = ();
+    type MaxLocks = ();
 }
 }
 
 
 impl GovernanceCurrency for Test {
 impl GovernanceCurrency for Test {
@@ -106,7 +110,7 @@ impl GovernanceCurrency for Test {
 // This function basically just builds a genesis storage key/value store according to
 // This function basically just builds a genesis storage key/value store according to
 // our desired mockup.
 // our desired mockup.
 pub fn initial_test_ext() -> sp_io::TestExternalities {
 pub fn initial_test_ext() -> sp_io::TestExternalities {
-    let mut t = system::GenesisConfig::default()
+    let mut t = frame_system::GenesisConfig::default()
         .build_storage::<Test>()
         .build_storage::<Test>()
         .unwrap();
         .unwrap();
 
 
@@ -153,5 +157,5 @@ pub fn initial_test_ext() -> sp_io::TestExternalities {
 
 
 pub type Election = election::Module<Test>;
 pub type Election = election::Module<Test>;
 pub type Council = council::Module<Test>;
 pub type Council = council::Module<Test>;
-pub type System = system::Module<Test>;
+pub type System = frame_system::Module<Test>;
 pub type Balances = balances::Module<Test>;
 pub type Balances = balances::Module<Test>;

+ 12 - 12
runtime-modules/hiring/Cargo.toml

@@ -1,24 +1,24 @@
 [package]
 [package]
 name = 'pallet-hiring'
 name = 'pallet-hiring'
-version = '3.0.0'
+version = '3.1.0'
 authors = ['Joystream contributors']
 authors = ['Joystream contributors']
 edition = '2018'
 edition = '2018'
 
 
 [dependencies]
 [dependencies]
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
-codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] }
-sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+codec = { package = 'parity-scale-codec', version = '1.3.4', default-features = false, features = ['derive'] }
+sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 stake = { package = 'pallet-stake', default-features = false, path = '../stake'}
 stake = { package = 'pallet-stake', default-features = false, path = '../stake'}
 
 
 [dev-dependencies]
 [dev-dependencies]
 mockall = "0.7.1"
 mockall = "0.7.1"
-sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 
 
 [features]
 [features]
 default = ['std']
 default = ['std']
@@ -27,8 +27,8 @@ std = [
 	'codec/std',
 	'codec/std',
 	'sp-std/std',
 	'sp-std/std',
 	'frame-support/std',
 	'frame-support/std',
-	'system/std',
+	'frame-system/std',
 	'sp-arithmetic/std',
 	'sp-arithmetic/std',
 	'sp-runtime/std',
 	'sp-runtime/std',
 	'stake/std',
 	'stake/std',
-]
+]

+ 14 - 13
runtime-modules/hiring/src/lib.rs

@@ -48,7 +48,7 @@ mod test;
 pub use hiring::*;
 pub use hiring::*;
 
 
 /// Main trait of hiring substrate module
 /// Main trait of hiring substrate module
-pub trait Trait: system::Trait + stake::Trait + Sized {
+pub trait Trait: frame_system::Trait + stake::Trait + Sized {
     /// OpeningId type
     /// OpeningId type
     type OpeningId: Parameter
     type OpeningId: Parameter
         + Member
         + Member
@@ -179,7 +179,7 @@ impl<T: Trait> Module<T> {
         role_staking_policy: Option<StakingPolicy<BalanceOf<T>, T::BlockNumber>>,
         role_staking_policy: Option<StakingPolicy<BalanceOf<T>, T::BlockNumber>>,
         human_readable_text: Vec<u8>,
         human_readable_text: Vec<u8>,
     ) -> Result<T::OpeningId, AddOpeningError> {
     ) -> Result<T::OpeningId, AddOpeningError> {
-        let current_block_height = <system::Module<T>>::block_number();
+        let current_block_height = <frame_system::Module<T>>::block_number();
 
 
         Self::ensure_can_add_opening(
         Self::ensure_can_add_opening(
             current_block_height,
             current_block_height,
@@ -240,7 +240,7 @@ impl<T: Trait> Module<T> {
         )?;
         )?;
 
 
         //
         //
-        let current_block_height = <system::Module<T>>::block_number(); // move later!
+        let current_block_height = <frame_system::Module<T>>::block_number(); // move later!
         let new_active_stage = active_stage.new_stage_on_cancelling(current_block_height)?;
         let new_active_stage = active_stage.new_stage_on_cancelling(current_block_height)?;
 
 
         // Ensure unstaking periods are OK.
         // Ensure unstaking periods are OK.
@@ -316,7 +316,7 @@ impl<T: Trait> Module<T> {
         // == MUTATION SAFE ==
         // == MUTATION SAFE ==
         //
         //
 
 
-        let current_block_height = <system::Module<T>>::block_number();
+        let current_block_height = <frame_system::Module<T>>::block_number();
 
 
         // Update state of opening
         // Update state of opening
         let new_opening = opening.clone_with_new_active_opening_stage(
         let new_opening = opening.clone_with_new_active_opening_stage(
@@ -354,7 +354,7 @@ impl<T: Trait> Module<T> {
         // == MUTATION SAFE ==
         // == MUTATION SAFE ==
         //
         //
 
 
-        let current_block_height = <system::Module<T>>::block_number();
+        let current_block_height = <frame_system::Module<T>>::block_number();
 
 
         let new_opening =
         let new_opening =
             opening.clone_with_new_active_opening_stage(hiring::ActiveOpeningStage::ReviewPeriod {
             opening.clone_with_new_active_opening_stage(hiring::ActiveOpeningStage::ReviewPeriod {
@@ -494,7 +494,7 @@ impl<T: Trait> Module<T> {
         );
         );
 
 
         // Grab current block height
         // Grab current block height
-        let current_block_height = <system::Module<T>>::block_number();
+        let current_block_height = <frame_system::Module<T>>::block_number();
         // Get opening with updated counters
         // Get opening with updated counters
         let opening_needed_for_data = <OpeningById<T>>::get(opening_id);
         let opening_needed_for_data = <OpeningById<T>>::get(opening_id);
 
 
@@ -650,7 +650,7 @@ impl<T: Trait> Module<T> {
         );
         );
 
 
         // Grab current block height
         // Grab current block height
-        let current_block_height = <system::Module<T>>::block_number();
+        let current_block_height = <frame_system::Module<T>>::block_number();
 
 
         // Compute index for this new application
         // Compute index for this new application
         let application_index_in_opening =
         let application_index_in_opening =
@@ -794,7 +794,7 @@ impl<T: Trait> Module<T> {
 
 
         // Drop stake from stake to application map
         // Drop stake from stake to application map
         <ApplicationIdByStakingId<T>>::remove(stake_id);
         <ApplicationIdByStakingId<T>>::remove(stake_id);
-        let current_block_height = <system::Module<T>>::block_number();
+        let current_block_height = <frame_system::Module<T>>::block_number();
 
 
         // New application computed
         // New application computed
         let mut new_application = application.clone();
         let mut new_application = application.clone();
@@ -944,11 +944,12 @@ pub enum ApplicationWouldGetAddedEvaluation<T: Trait> {
 
 
 /// Balance alias
 /// Balance alias
 pub type BalanceOf<T> =
 pub type BalanceOf<T> =
-    <<T as stake::Trait>::Currency as Currency<<T as system::Trait>::AccountId>>::Balance;
+    <<T as stake::Trait>::Currency as Currency<<T as frame_system::Trait>::AccountId>>::Balance;
 
 
 /// Balance alias for staking
 /// Balance alias for staking
-pub type NegativeImbalance<T> =
-    <<T as stake::Trait>::Currency as Currency<<T as system::Trait>::AccountId>>::NegativeImbalance;
+pub type NegativeImbalance<T> = <<T as stake::Trait>::Currency as Currency<
+    <T as frame_system::Trait>::AccountId,
+>>::NegativeImbalance;
 
 
 /*
 /*
  *  ======== ======== ======== ======== =======
  *  ======== ======== ======== ======== =======
@@ -966,7 +967,7 @@ type ApplicationBTreeMap<T> = BTreeMap<
     <T as Trait>::ApplicationId,
     <T as Trait>::ApplicationId,
     hiring::Application<
     hiring::Application<
         <T as Trait>::OpeningId,
         <T as Trait>::OpeningId,
-        <T as system::Trait>::BlockNumber,
+        <T as frame_system::Trait>::BlockNumber,
         <T as stake::Trait>::StakeId,
         <T as stake::Trait>::StakeId,
     >,
     >,
 >;
 >;
@@ -1144,7 +1145,7 @@ impl<T: Trait> Module<T> {
                 let was_unstaked = application_was_unstaked || role_was_unstaked;
                 let was_unstaked = application_was_unstaked || role_was_unstaked;
 
 
                 // Grab current block height
                 // Grab current block height
-                let current_block_height = <system::Module<T>>::block_number();
+                let current_block_height = <frame_system::Module<T>>::block_number();
 
 
                 /*
                 /*
                  * TODO:
                  * TODO:

+ 8 - 5
runtime-modules/hiring/src/mock.rs

@@ -31,7 +31,7 @@ parameter_types! {
 #[derive(Clone, PartialEq, Eq, Debug)]
 #[derive(Clone, PartialEq, Eq, Debug)]
 pub struct Test;
 pub struct Test;
 
 
-impl system::Trait for Test {
+impl frame_system::Trait for Test {
     type BaseCallFilter = ();
     type BaseCallFilter = ();
     type Origin = Origin;
     type Origin = Origin;
     type Call = ();
     type Call = ();
@@ -52,10 +52,11 @@ impl system::Trait for Test {
     type MaximumBlockLength = MaximumBlockLength;
     type MaximumBlockLength = MaximumBlockLength;
     type AvailableBlockRatio = AvailableBlockRatio;
     type AvailableBlockRatio = AvailableBlockRatio;
     type Version = ();
     type Version = ();
-    type ModuleToIndex = ();
     type AccountData = balances::AccountData<u64>;
     type AccountData = balances::AccountData<u64>;
     type OnNewAccount = ();
     type OnNewAccount = ();
     type OnKilledAccount = ();
     type OnKilledAccount = ();
+    type SystemWeightInfo = ();
+    type PalletInfo = ();
 }
 }
 
 
 parameter_types! {
 parameter_types! {
@@ -69,6 +70,8 @@ impl balances::Trait for Test {
     type Event = ();
     type Event = ();
     type ExistentialDeposit = ExistentialDeposit;
     type ExistentialDeposit = ExistentialDeposit;
     type AccountStore = System;
     type AccountStore = System;
+    type WeightInfo = ();
+    type MaxLocks = ();
 }
 }
 
 
 impl Trait for Test {
 impl Trait for Test {
@@ -87,7 +90,7 @@ impl stake::Trait for Test {
 }
 }
 
 
 pub type Balances = balances::Module<Test>;
 pub type Balances = balances::Module<Test>;
-pub type System = system::Module<Test>;
+pub type System = frame_system::Module<Test>;
 pub type Hiring = Module<Test>;
 pub type Hiring = Module<Test>;
 
 
 // Intercepts panic method
 // Intercepts panic method
@@ -141,7 +144,7 @@ pub(crate) fn test_expectation_and_clear_mock() {
 }
 }
 
 
 pub fn build_test_externalities() -> sp_io::TestExternalities {
 pub fn build_test_externalities() -> sp_io::TestExternalities {
-    let t = system::GenesisConfig::default()
+    let t = frame_system::GenesisConfig::default()
         .build_storage::<Test>()
         .build_storage::<Test>()
         .unwrap();
         .unwrap();
 
 
@@ -195,4 +198,4 @@ impl TestApplicationDeactivatedHandler {
 }
 }
 
 
 // Test fixtures starting block.
 // Test fixtures starting block.
-pub(crate) static FIRST_BLOCK_HEIGHT: <Test as system::Trait>::BlockNumber = 0;
+pub(crate) static FIRST_BLOCK_HEIGHT: <Test as frame_system::Trait>::BlockNumber = 0;

+ 4 - 3
runtime-modules/hiring/src/test/mod.rs

@@ -15,10 +15,11 @@ use std::panic;
 
 
 pub(crate) type OpeningId = <Test as Trait>::OpeningId;
 pub(crate) type OpeningId = <Test as Trait>::OpeningId;
 pub(crate) type ApplicationId = <Test as Trait>::ApplicationId;
 pub(crate) type ApplicationId = <Test as Trait>::ApplicationId;
-pub(crate) type BlockNumber = <Test as system::Trait>::BlockNumber;
+pub(crate) type BlockNumber = <Test as frame_system::Trait>::BlockNumber;
 pub(crate) type StakeId = <Test as stake::Trait>::StakeId;
 pub(crate) type StakeId = <Test as stake::Trait>::StakeId;
-pub(crate) type Balance =
-    <<Test as stake::Trait>::Currency as Currency<<Test as system::Trait>::AccountId>>::Balance;
+pub(crate) type Balance = <<Test as stake::Trait>::Currency as Currency<
+    <Test as frame_system::Trait>::AccountId,
+>>::Balance;
 
 
 // Debug test object content. Recurring temporary usage - do not delete.
 // Debug test object content. Recurring temporary usage - do not delete.
 #[allow(dead_code)]
 #[allow(dead_code)]

+ 13 - 13
runtime-modules/membership/Cargo.toml

@@ -1,24 +1,24 @@
 [package]
 [package]
 name = 'pallet-membership'
 name = 'pallet-membership'
-version = '3.0.0'
+version = '3.1.0'
 authors = ['Joystream contributors']
 authors = ['Joystream contributors']
 edition = '2018'
 edition = '2018'
 
 
 [dependencies]
 [dependencies]
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
-codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] }
-sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+codec = { package = 'parity-scale-codec', version = '1.3.4', default-features = false, features = ['derive'] }
+sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 common = { package = 'pallet-common', default-features = false, path = '../common'}
 common = { package = 'pallet-common', default-features = false, path = '../common'}
 
 
 [dev-dependencies]
 [dev-dependencies]
-sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 
 
 [features]
 [features]
 default = ['std']
 default = ['std']
@@ -26,10 +26,10 @@ std = [
 	'serde',
 	'serde',
 	'codec/std',
 	'codec/std',
 	'frame-support/std',
 	'frame-support/std',
-	'system/std',
+	'frame-system/std',
 	'sp-std/std',
 	'sp-std/std',
 	'sp-arithmetic/std',
 	'sp-arithmetic/std',
 	'sp-runtime/std',
 	'sp-runtime/std',
 	'pallet-timestamp/std',
 	'pallet-timestamp/std',
 	'common/std',
 	'common/std',
-]
+]

+ 8 - 8
runtime-modules/membership/src/lib.rs

@@ -12,12 +12,12 @@ mod tests;
 use codec::{Codec, Decode, Encode};
 use codec::{Codec, Decode, Encode};
 use frame_support::traits::Currency;
 use frame_support::traits::Currency;
 use frame_support::{decl_event, decl_module, decl_storage, ensure, Parameter};
 use frame_support::{decl_event, decl_module, decl_storage, ensure, Parameter};
+use frame_system::{ensure_root, ensure_signed};
 use sp_arithmetic::traits::{BaseArithmetic, One};
 use sp_arithmetic::traits::{BaseArithmetic, One};
 use sp_runtime::traits::{MaybeSerialize, Member};
 use sp_runtime::traits::{MaybeSerialize, Member};
 use sp_std::borrow::ToOwned;
 use sp_std::borrow::ToOwned;
 use sp_std::vec;
 use sp_std::vec;
 use sp_std::vec::Vec;
 use sp_std::vec::Vec;
-use system::{ensure_root, ensure_signed};
 
 
 use common::currency::{BalanceOf, GovernanceCurrency};
 use common::currency::{BalanceOf, GovernanceCurrency};
 
 
@@ -25,8 +25,8 @@ use common::currency::{BalanceOf, GovernanceCurrency};
 /// Result with string error message. This exists for backward compatibility purpose.
 /// Result with string error message. This exists for backward compatibility purpose.
 pub type DispatchResult = Result<(), &'static str>;
 pub type DispatchResult = Result<(), &'static str>;
 
 
-pub trait Trait: system::Trait + GovernanceCurrency + pallet_timestamp::Trait {
-    type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;
+pub trait Trait: frame_system::Trait + GovernanceCurrency + pallet_timestamp::Trait {
+    type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>;
 
 
     type MemberId: Parameter
     type MemberId: Parameter
         + Member
         + Member
@@ -80,11 +80,11 @@ const DEFAULT_MAX_ABOUT_TEXT_LENGTH: u32 = 2048;
 
 
 /// Public membership object alias.
 /// Public membership object alias.
 pub type Membership<T> = MembershipObject<
 pub type Membership<T> = MembershipObject<
-    <T as system::Trait>::BlockNumber,
+    <T as frame_system::Trait>::BlockNumber,
     <T as pallet_timestamp::Trait>::Moment,
     <T as pallet_timestamp::Trait>::Moment,
     <T as Trait>::PaidTermId,
     <T as Trait>::PaidTermId,
     <T as Trait>::SubscriptionId,
     <T as Trait>::SubscriptionId,
-    <T as system::Trait>::AccountId,
+    <T as frame_system::Trait>::AccountId,
 >;
 >;
 
 
 #[derive(Encode, Decode, Default)]
 #[derive(Encode, Decode, Default)]
@@ -243,7 +243,7 @@ decl_storage! {
 
 
 decl_event! {
 decl_event! {
     pub enum Event<T> where
     pub enum Event<T> where
-      <T as system::Trait>::AccountId,
+      <T as frame_system::Trait>::AccountId,
       <T as Trait>::MemberId,
       <T as Trait>::MemberId,
     {
     {
         MemberRegistered(MemberId, AccountId),
         MemberRegistered(MemberId, AccountId),
@@ -286,7 +286,7 @@ decl_module! {
                 &who,
                 &who,
                 &user_info,
                 &user_info,
                 EntryMethod::Paid(paid_terms_id),
                 EntryMethod::Paid(paid_terms_id),
-                <system::Module<T>>::block_number(),
+                <frame_system::Module<T>>::block_number(),
                 <pallet_timestamp::Module<T>>::now()
                 <pallet_timestamp::Module<T>>::now()
             )?;
             )?;
 
 
@@ -434,7 +434,7 @@ decl_module! {
                 &new_member_account,
                 &new_member_account,
                 &user_info,
                 &user_info,
                 EntryMethod::Screening(sender),
                 EntryMethod::Screening(sender),
-                <system::Module<T>>::block_number(),
+                <frame_system::Module<T>>::block_number(),
                 <pallet_timestamp::Module<T>>::now()
                 <pallet_timestamp::Module<T>>::now()
             )?;
             )?;
 
 

+ 11 - 7
runtime-modules/membership/src/mock.rs

@@ -4,13 +4,13 @@ pub use crate::{GenesisConfig, Trait, DEFAULT_PAID_TERM_ID};
 
 
 pub use frame_support::traits::Currency;
 pub use frame_support::traits::Currency;
 use frame_support::{impl_outer_origin, parameter_types};
 use frame_support::{impl_outer_origin, parameter_types};
+pub use frame_system;
 use sp_core::H256;
 use sp_core::H256;
 use sp_runtime::{
 use sp_runtime::{
     testing::Header,
     testing::Header,
     traits::{BlakeTwo256, IdentityLookup},
     traits::{BlakeTwo256, IdentityLookup},
     Perbill,
     Perbill,
 };
 };
-pub use system;
 
 
 pub use common::currency::GovernanceCurrency;
 pub use common::currency::GovernanceCurrency;
 
 
@@ -29,7 +29,7 @@ parameter_types! {
     pub const MinimumPeriod: u64 = 5;
     pub const MinimumPeriod: u64 = 5;
 }
 }
 
 
-impl system::Trait for Test {
+impl frame_system::Trait for Test {
     type BaseCallFilter = ();
     type BaseCallFilter = ();
     type Origin = Origin;
     type Origin = Origin;
     type Call = ();
     type Call = ();
@@ -50,16 +50,18 @@ impl system::Trait for Test {
     type MaximumBlockLength = MaximumBlockLength;
     type MaximumBlockLength = MaximumBlockLength;
     type AvailableBlockRatio = AvailableBlockRatio;
     type AvailableBlockRatio = AvailableBlockRatio;
     type Version = ();
     type Version = ();
-    type ModuleToIndex = ();
     type AccountData = balances::AccountData<u64>;
     type AccountData = balances::AccountData<u64>;
     type OnNewAccount = ();
     type OnNewAccount = ();
     type OnKilledAccount = ();
     type OnKilledAccount = ();
+    type SystemWeightInfo = ();
+    type PalletInfo = ();
 }
 }
 
 
 impl pallet_timestamp::Trait for Test {
 impl pallet_timestamp::Trait for Test {
     type Moment = u64;
     type Moment = u64;
     type OnTimestampSet = ();
     type OnTimestampSet = ();
     type MinimumPeriod = MinimumPeriod;
     type MinimumPeriod = MinimumPeriod;
+    type WeightInfo = ();
 }
 }
 
 
 parameter_types! {
 parameter_types! {
@@ -72,6 +74,8 @@ impl balances::Trait for Test {
     type Event = ();
     type Event = ();
     type ExistentialDeposit = ExistentialDeposit;
     type ExistentialDeposit = ExistentialDeposit;
     type AccountStore = System;
     type AccountStore = System;
+    type WeightInfo = ();
+    type MaxLocks = ();
 }
 }
 
 
 impl GovernanceCurrency for Test {
 impl GovernanceCurrency for Test {
@@ -87,7 +91,7 @@ impl Trait for Test {
 }
 }
 
 
 pub struct TestExternalitiesBuilder<T: Trait> {
 pub struct TestExternalitiesBuilder<T: Trait> {
-    system_config: Option<system::GenesisConfig>,
+    system_config: Option<frame_system::GenesisConfig>,
     membership_config: Option<GenesisConfig<T>>,
     membership_config: Option<GenesisConfig<T>>,
 }
 }
 
 
@@ -106,10 +110,10 @@ impl<T: Trait> TestExternalitiesBuilder<T> {
         self
         self
     }
     }
     pub fn build(self) -> sp_io::TestExternalities {
     pub fn build(self) -> sp_io::TestExternalities {
-        // Add system
+        // Add frame_system
         let mut t = self
         let mut t = self
             .system_config
             .system_config
-            .unwrap_or(system::GenesisConfig::default())
+            .unwrap_or(frame_system::GenesisConfig::default())
             .build_storage::<T>()
             .build_storage::<T>()
             .unwrap();
             .unwrap();
 
 
@@ -125,4 +129,4 @@ impl<T: Trait> TestExternalitiesBuilder<T> {
 
 
 pub type Balances = balances::Module<Test>;
 pub type Balances = balances::Module<Test>;
 pub type Members = crate::Module<Test>;
 pub type Members = crate::Module<Test>;
-pub type System = system::Module<Test>;
+pub type System = frame_system::Module<Test>;

+ 8 - 8
runtime-modules/memo/Cargo.toml

@@ -1,15 +1,15 @@
 [package]
 [package]
 name = 'pallet-memo'
 name = 'pallet-memo'
-version = '3.0.0'
+version = '3.1.0'
 authors = ['Joystream contributors']
 authors = ['Joystream contributors']
 edition = '2018'
 edition = '2018'
 
 
 [dependencies]
 [dependencies]
-codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] }
-sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+codec = { package = 'parity-scale-codec', version = '1.3.4', default-features = false, features = ['derive'] }
+sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 common = { package = 'pallet-common', default-features = false, path = '../common'}
 common = { package = 'pallet-common', default-features = false, path = '../common'}
 
 
 [features]
 [features]
@@ -19,6 +19,6 @@ std = [
 	'sp-arithmetic/std',
 	'sp-arithmetic/std',
 	'sp-std/std',
 	'sp-std/std',
 	'frame-support/std',
 	'frame-support/std',
-	'system/std',
+	'frame-system/std',
 	'common/std',
 	'common/std',
-]
+]

+ 4 - 4
runtime-modules/memo/src/lib.rs

@@ -3,14 +3,14 @@
 
 
 use frame_support::traits::Currency;
 use frame_support::traits::Currency;
 use frame_support::{decl_event, decl_module, decl_storage, ensure};
 use frame_support::{decl_event, decl_module, decl_storage, ensure};
+use frame_system::ensure_signed;
 use sp_arithmetic::traits::Zero;
 use sp_arithmetic::traits::Zero;
 use sp_std::vec::Vec;
 use sp_std::vec::Vec;
-use system::ensure_signed;
 
 
 use common::currency::GovernanceCurrency;
 use common::currency::GovernanceCurrency;
 
 
-pub trait Trait: system::Trait + GovernanceCurrency {
-    type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;
+pub trait Trait: frame_system::Trait + GovernanceCurrency {
+    type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>;
 }
 }
 
 
 pub type MemoText = Vec<u8>;
 pub type MemoText = Vec<u8>;
@@ -23,7 +23,7 @@ decl_storage! {
 }
 }
 
 
 decl_event! {
 decl_event! {
-    pub enum Event<T> where <T as system::Trait>::AccountId {
+    pub enum Event<T> where <T as frame_system::Trait>::AccountId {
         MemoUpdated(AccountId),
         MemoUpdated(AccountId),
     }
     }
 }
 }

+ 16 - 16
runtime-modules/proposals/codex/Cargo.toml

@@ -1,20 +1,20 @@
 [package]
 [package]
 name = 'pallet-proposals-codex'
 name = 'pallet-proposals-codex'
-version = '3.0.0'
+version = '3.1.0'
 authors = ['Joystream contributors']
 authors = ['Joystream contributors']
 edition = '2018'
 edition = '2018'
 
 
 [dependencies]
 [dependencies]
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
-codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] }
-sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-staking = { package = 'pallet-staking', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+codec = { package = 'parity-scale-codec', version = '1.3.4', default-features = false, features = ['derive'] }
+sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+staking = { package = 'pallet-staking', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 membership = { package = 'pallet-membership', default-features = false, path = '../../membership'}
 membership = { package = 'pallet-membership', default-features = false, path = '../../membership'}
 stake = { package = 'pallet-stake', default-features = false, path = '../../stake'}
 stake = { package = 'pallet-stake', default-features = false, path = '../../stake'}
 governance = { package = 'pallet-governance', default-features = false, path = '../../governance'}
 governance = { package = 'pallet-governance', default-features = false, path = '../../governance'}
@@ -26,10 +26,10 @@ proposals-engine = { package = 'pallet-proposals-engine', default-features = fal
 proposals-discussion = { package = 'pallet-proposals-discussion', default-features = false, path = '../discussion'}
 proposals-discussion = { package = 'pallet-proposals-discussion', default-features = false, path = '../discussion'}
 
 
 [dev-dependencies]
 [dev-dependencies]
-sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-staking = { package = 'sp-staking', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-pallet-staking-reward-curve = { package = 'pallet-staking-reward-curve', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-staking = { package = 'sp-staking', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+pallet-staking-reward-curve = { package = 'pallet-staking-reward-curve', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 recurring-rewards = { package = 'pallet-recurring-reward', default-features = false, path = '../../recurring-reward'}
 recurring-rewards = { package = 'pallet-recurring-reward', default-features = false, path = '../../recurring-reward'}
 strum = {version = "0.19", default-features = false}
 strum = {version = "0.19", default-features = false}
 
 
@@ -42,7 +42,7 @@ std = [
     'frame-support/std',
     'frame-support/std',
     'sp-arithmetic/std',
     'sp-arithmetic/std',
     'sp-runtime/std',
     'sp-runtime/std',
-    'system/std',
+    'frame-system/std',
     'staking/std',
     'staking/std',
     'pallet-timestamp/std',
     'pallet-timestamp/std',
     'balances/std',
     'balances/std',
@@ -55,4 +55,4 @@ std = [
     'common/std',
     'common/std',
     'proposals-engine/std',
     'proposals-engine/std',
     'proposals-discussion/std',
     'proposals-discussion/std',
-]
+]

+ 11 - 10
runtime-modules/proposals/codex/src/lib.rs

@@ -1,10 +1,10 @@
 //! # Proposals codex module
 //! # Proposals codex module
 //! Proposals `codex` module for the Joystream platform. Version 2.
 //! Proposals `codex` module for the Joystream platform. Version 2.
-//! Component of the proposals system. It contains preset proposal types.
+//! Component of the proposals frame_system. It contains preset proposal types.
 //!
 //!
 //! ## Overview
 //! ## Overview
 //!
 //!
-//! The proposals codex module serves as a facade and entry point of the proposals system. It uses
+//! The proposals codex module serves as a facade and entry point of the proposals frame_system. It uses
 //! proposals `engine` module to maintain a lifecycle of the proposal and to execute proposals.
 //! proposals `engine` module to maintain a lifecycle of the proposal and to execute proposals.
 //! During the proposal creation, `codex` also create a discussion thread using the `discussion`
 //! During the proposal creation, `codex` also create a discussion thread using the `discussion`
 //! proposals module. `Codex` uses predefined parameters (eg.:`voting_period`) for each proposal and
 //! proposals module. `Codex` uses predefined parameters (eg.:`voting_period`) for each proposal and
@@ -64,11 +64,11 @@ mod tests;
 use frame_support::dispatch::DispatchResult;
 use frame_support::dispatch::DispatchResult;
 use frame_support::traits::{Currency, Get};
 use frame_support::traits::{Currency, Get};
 use frame_support::{decl_error, decl_module, decl_storage, ensure, print};
 use frame_support::{decl_error, decl_module, decl_storage, ensure, print};
+use frame_system::ensure_root;
 use sp_arithmetic::traits::Zero;
 use sp_arithmetic::traits::Zero;
 use sp_std::clone::Clone;
 use sp_std::clone::Clone;
 use sp_std::str::from_utf8;
 use sp_std::str::from_utf8;
 use sp_std::vec::Vec;
 use sp_std::vec::Vec;
-use system::ensure_root;
 
 
 use common::origin::ActorOriginValidator;
 use common::origin::ActorOriginValidator;
 use common::working_group::WorkingGroup;
 use common::working_group::WorkingGroup;
@@ -134,7 +134,7 @@ struct CreateProposalParameters<T: Trait> {
 
 
 /// 'Proposals codex' substrate module Trait
 /// 'Proposals codex' substrate module Trait
 pub trait Trait:
 pub trait Trait:
-    system::Trait
+    frame_system::Trait
     + proposals_engine::Trait
     + proposals_engine::Trait
     + proposals_discussion::Trait
     + proposals_discussion::Trait
     + membership::Trait
     + membership::Trait
@@ -161,7 +161,7 @@ pub trait Trait:
 
 
 /// Balance alias for `stake` module
 /// Balance alias for `stake` module
 pub type BalanceOf<T> =
 pub type BalanceOf<T> =
-    <<T as stake::Trait>::Currency as Currency<<T as system::Trait>::AccountId>>::Balance;
+    <<T as stake::Trait>::Currency as Currency<<T as frame_system::Trait>::AccountId>>::Balance;
 
 
 /// Currency alias for `stake` module
 /// Currency alias for `stake` module
 pub type CurrencyOf<T> = <T as stake::Trait>::Currency;
 pub type CurrencyOf<T> = <T as stake::Trait>::Currency;
@@ -169,16 +169,17 @@ pub type CurrencyOf<T> = <T as stake::Trait>::Currency;
 /// Balance alias for GovernanceCurrency from `common` module. TODO: replace with BalanceOf
 /// Balance alias for GovernanceCurrency from `common` module. TODO: replace with BalanceOf
 pub type BalanceOfGovernanceCurrency<T> =
 pub type BalanceOfGovernanceCurrency<T> =
     <<T as common::currency::GovernanceCurrency>::Currency as Currency<
     <<T as common::currency::GovernanceCurrency>::Currency as Currency<
-        <T as system::Trait>::AccountId,
+        <T as frame_system::Trait>::AccountId,
     >>::Balance;
     >>::Balance;
 
 
 /// Balance alias for token mint balance from `token mint` module. TODO: replace with BalanceOf
 /// Balance alias for token mint balance from `token mint` module. TODO: replace with BalanceOf
 pub type BalanceOfMint<T> =
 pub type BalanceOfMint<T> =
-    <<T as minting::Trait>::Currency as Currency<<T as system::Trait>::AccountId>>::Balance;
+    <<T as minting::Trait>::Currency as Currency<<T as frame_system::Trait>::AccountId>>::Balance;
 
 
 /// Negative imbalance alias for staking
 /// Negative imbalance alias for staking
-pub type NegativeImbalance<T> =
-    <<T as stake::Trait>::Currency as Currency<<T as system::Trait>::AccountId>>::NegativeImbalance;
+pub type NegativeImbalance<T> = <<T as stake::Trait>::Currency as Currency<
+    <T as frame_system::Trait>::AccountId,
+>>::NegativeImbalance;
 
 
 type MemberId<T> = <T as membership::Trait>::MemberId;
 type MemberId<T> = <T as membership::Trait>::MemberId;
 
 
@@ -804,7 +805,7 @@ decl_module! {
 
 
             print("Runtime upgrade proposal execution started.");
             print("Runtime upgrade proposal execution started.");
 
 
-            <system::Module<T>>::set_code(cloned_origin2, wasm)?;
+            <frame_system::Module<T>>::set_code(cloned_origin2, wasm)?;
 
 
             print("Runtime upgrade proposal execution finished.");
             print("Runtime upgrade proposal execution finished.");
         }
         }

+ 2 - 2
runtime-modules/proposals/codex/src/proposal_types/mod.rs

@@ -20,8 +20,8 @@ pub trait ProposalEncoder<T: crate::Trait> {
 pub type ProposalDetailsOf<T> = ProposalDetails<
 pub type ProposalDetailsOf<T> = ProposalDetails<
     crate::BalanceOfMint<T>,
     crate::BalanceOfMint<T>,
     crate::BalanceOfGovernanceCurrency<T>,
     crate::BalanceOfGovernanceCurrency<T>,
-    <T as system::Trait>::BlockNumber,
-    <T as system::Trait>::AccountId,
+    <T as frame_system::Trait>::BlockNumber,
+    <T as frame_system::Trait>::AccountId,
     working_group::OpeningId<T>,
     working_group::OpeningId<T>,
     working_group::ApplicationId<T>,
     working_group::ApplicationId<T>,
     crate::BalanceOf<T>,
     crate::BalanceOf<T>,

+ 14 - 9
runtime-modules/proposals/codex/src/tests/mock.rs

@@ -1,6 +1,7 @@
 #![cfg(test)]
 #![cfg(test)]
 
 
 use frame_support::{impl_outer_dispatch, impl_outer_origin, parameter_types};
 use frame_support::{impl_outer_dispatch, impl_outer_origin, parameter_types};
+pub use frame_system;
 use sp_core::H256;
 use sp_core::H256;
 use sp_runtime::curve::PiecewiseLinear;
 use sp_runtime::curve::PiecewiseLinear;
 use sp_runtime::{
 use sp_runtime::{
@@ -9,7 +10,6 @@ use sp_runtime::{
     Perbill,
     Perbill,
 };
 };
 use sp_staking::SessionIndex;
 use sp_staking::SessionIndex;
-pub use system;
 
 
 use crate::{ProposalDetailsOf, ProposalEncoder};
 use crate::{ProposalDetailsOf, ProposalEncoder};
 use proposals_engine::VotersParameters;
 use proposals_engine::VotersParameters;
@@ -36,7 +36,7 @@ impl_outer_dispatch! {
         codex::ProposalCodex,
         codex::ProposalCodex,
         proposals::ProposalsEngine,
         proposals::ProposalsEngine,
         staking::Staking,
         staking::Staking,
-        system::System,
+        frame_system::System,
     }
     }
 }
 }
 
 
@@ -62,6 +62,8 @@ impl balances::Trait for Test {
     type Event = ();
     type Event = ();
     type ExistentialDeposit = ExistentialDeposit;
     type ExistentialDeposit = ExistentialDeposit;
     type AccountStore = System;
     type AccountStore = System;
+    type WeightInfo = ();
+    type MaxLocks = ();
 }
 }
 
 
 impl stake::Trait for Test {
 impl stake::Trait for Test {
@@ -113,7 +115,7 @@ impl governance::council::Trait for Test {
 
 
 impl common::origin::ActorOriginValidator<Origin, u64, u64> for () {
 impl common::origin::ActorOriginValidator<Origin, u64, u64> for () {
     fn ensure_actor_origin(origin: Origin, _: u64) -> Result<u64, &'static str> {
     fn ensure_actor_origin(origin: Origin, _: u64) -> Result<u64, &'static str> {
-        let account_id = system::ensure_signed(origin)?;
+        let account_id = frame_system::ensure_signed(origin)?;
 
 
         Ok(account_id)
         Ok(account_id)
     }
     }
@@ -214,7 +216,7 @@ impl staking::Trait for Test {
     type SessionsPerEra = SessionsPerEra;
     type SessionsPerEra = SessionsPerEra;
     type BondingDuration = BondingDuration;
     type BondingDuration = BondingDuration;
     type SlashDeferDuration = ();
     type SlashDeferDuration = ();
-    type SlashCancelOrigin = system::EnsureRoot<Self::AccountId>;
+    type SlashCancelOrigin = frame_system::EnsureRoot<Self::AccountId>;
     type SessionInterface = Self;
     type SessionInterface = Self;
     type RewardCurve = RewardCurve;
     type RewardCurve = RewardCurve;
     type NextNewSession = ();
     type NextNewSession = ();
@@ -224,9 +226,10 @@ impl staking::Trait for Test {
     type MinSolutionScoreBump = ();
     type MinSolutionScoreBump = ();
     type MaxNominatorRewardedPerValidator = ();
     type MaxNominatorRewardedPerValidator = ();
     type UnsignedPriority = ();
     type UnsignedPriority = ();
+    type WeightInfo = ();
 }
 }
 
 
-impl<LocalCall> system::offchain::SendTransactionTypes<LocalCall> for Test
+impl<LocalCall> frame_system::offchain::SendTransactionTypes<LocalCall> for Test
 where
 where
     Call: From<LocalCall>,
     Call: From<LocalCall>,
 {
 {
@@ -263,7 +266,7 @@ impl ProposalEncoder<Test> for () {
     }
     }
 }
 }
 
 
-impl system::Trait for Test {
+impl frame_system::Trait for Test {
     type BaseCallFilter = ();
     type BaseCallFilter = ();
     type Origin = Origin;
     type Origin = Origin;
     type Call = Call;
     type Call = Call;
@@ -284,20 +287,22 @@ impl system::Trait for Test {
     type MaximumBlockLength = MaximumBlockLength;
     type MaximumBlockLength = MaximumBlockLength;
     type AvailableBlockRatio = AvailableBlockRatio;
     type AvailableBlockRatio = AvailableBlockRatio;
     type Version = ();
     type Version = ();
-    type ModuleToIndex = ();
     type AccountData = balances::AccountData<u64>;
     type AccountData = balances::AccountData<u64>;
     type OnNewAccount = ();
     type OnNewAccount = ();
     type OnKilledAccount = ();
     type OnKilledAccount = ();
+    type PalletInfo = ();
+    type SystemWeightInfo = ();
 }
 }
 
 
 impl pallet_timestamp::Trait for Test {
 impl pallet_timestamp::Trait for Test {
     type Moment = u64;
     type Moment = u64;
     type OnTimestampSet = ();
     type OnTimestampSet = ();
     type MinimumPeriod = MinimumPeriod;
     type MinimumPeriod = MinimumPeriod;
+    type WeightInfo = ();
 }
 }
 
 
 pub fn initial_test_ext() -> sp_io::TestExternalities {
 pub fn initial_test_ext() -> sp_io::TestExternalities {
-    let t = system::GenesisConfig::default()
+    let t = frame_system::GenesisConfig::default()
         .build_storage::<Test>()
         .build_storage::<Test>()
         .unwrap();
         .unwrap();
 
 
@@ -309,4 +314,4 @@ pub type ProposalCodex = crate::Module<Test>;
 pub type ProposalsEngine = proposals_engine::Module<Test>;
 pub type ProposalsEngine = proposals_engine::Module<Test>;
 pub type Balances = balances::Module<Test>;
 pub type Balances = balances::Module<Test>;
 pub type Timestamp = pallet_timestamp::Module<Test>;
 pub type Timestamp = pallet_timestamp::Module<Test>;
-pub type System = system::Module<Test>;
+pub type System = frame_system::Module<Test>;

+ 3 - 1
runtime-modules/proposals/codex/src/tests/mod.rs

@@ -3,7 +3,7 @@ mod mock;
 use frame_support::dispatch::{DispatchError, DispatchResult};
 use frame_support::dispatch::{DispatchError, DispatchResult};
 use frame_support::storage::StorageMap;
 use frame_support::storage::StorageMap;
 use frame_support::traits::Currency;
 use frame_support::traits::Currency;
-use system::RawOrigin;
+use frame_system::RawOrigin;
 
 
 use common::working_group::WorkingGroup;
 use common::working_group::WorkingGroup;
 use governance::election_params::ElectionParameters;
 use governance::election_params::ElectionParameters;
@@ -621,6 +621,8 @@ fn create_set_validator_count_proposal_common_checks_succeed() {
 #[test]
 #[test]
 fn create_set_validator_count_proposal_failed_with_invalid_validator_count() {
 fn create_set_validator_count_proposal_failed_with_invalid_validator_count() {
     initial_test_ext().execute_with(|| {
     initial_test_ext().execute_with(|| {
+        staking::MinimumValidatorCount::put(10);
+
         assert_eq!(
         assert_eq!(
             ProposalCodex::create_set_validator_count_proposal(
             ProposalCodex::create_set_validator_count_proposal(
                 RawOrigin::Signed(1).into(),
                 RawOrigin::Signed(1).into(),

+ 12 - 12
runtime-modules/proposals/discussion/Cargo.toml

@@ -1,24 +1,24 @@
 [package]
 [package]
 name = 'pallet-proposals-discussion'
 name = 'pallet-proposals-discussion'
-version = '3.0.0'
+version = '3.1.0'
 authors = ['Joystream contributors']
 authors = ['Joystream contributors']
 edition = '2018'
 edition = '2018'
 
 
 [dependencies]
 [dependencies]
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
-codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] }
-sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+codec = { package = 'parity-scale-codec', version = '1.3.4', default-features = false, features = ['derive'] }
+sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 membership = { package = 'pallet-membership', default-features = false, path = '../../membership'}
 membership = { package = 'pallet-membership', default-features = false, path = '../../membership'}
 common = { package = 'pallet-common', default-features = false, path = '../../common'}
 common = { package = 'pallet-common', default-features = false, path = '../../common'}
 
 
 [dev-dependencies]
 [dev-dependencies]
-sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 
 
 [features]
 [features]
 default = ['std']
 default = ['std']
@@ -27,7 +27,7 @@ std = [
 	'codec/std',
 	'codec/std',
 	'sp-std/std',
 	'sp-std/std',
 	'frame-support/std',
 	'frame-support/std',
-	'system/std',
+	'frame-system/std',
     'membership/std',
     'membership/std',
     'common/std',
     'common/std',
-]
+]

+ 5 - 5
runtime-modules/proposals/discussion/src/lib.rs

@@ -20,7 +20,7 @@
 //!
 //!
 //! ```
 //! ```
 //! use frame_support::decl_module;
 //! use frame_support::decl_module;
-//! use system::ensure_root;
+//! use frame_system::ensure_root;
 //! use pallet_proposals_discussion::{self as discussions};
 //! use pallet_proposals_discussion::{self as discussions};
 //!
 //!
 //! pub trait Trait: discussions::Trait + membership::Trait {}
 //! pub trait Trait: discussions::Trait + membership::Trait {}
@@ -79,9 +79,9 @@ decl_event!(
 );
 );
 
 
 /// 'Proposal discussion' substrate module Trait
 /// 'Proposal discussion' substrate module Trait
-pub trait Trait: system::Trait + membership::Trait {
+pub trait Trait: frame_system::Trait + membership::Trait {
     /// Discussion event type.
     /// Discussion event type.
-    type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;
+    type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>;
 
 
     /// Validates post author id and origin combination
     /// Validates post author id and origin combination
     type PostAuthorOriginValidator: ActorOriginValidator<
     type PostAuthorOriginValidator: ActorOriginValidator<
@@ -329,9 +329,9 @@ impl<T: Trait> Module<T> {
 }
 }
 
 
 impl<T: Trait> Module<T> {
 impl<T: Trait> Module<T> {
-    // Wrapper-function over system::block_number()
+    // Wrapper-function over frame_system::block_number()
     fn current_block() -> T::BlockNumber {
     fn current_block() -> T::BlockNumber {
-        <system::Module<T>>::block_number()
+        <frame_system::Module<T>>::block_number()
     }
     }
 
 
     // returns incremented thread counter if last thread author equals with provided parameter
     // returns incremented thread counter if last thread author equals with provided parameter

+ 11 - 7
runtime-modules/proposals/discussion/src/tests/mock.rs

@@ -1,6 +1,6 @@
 #![cfg(test)]
 #![cfg(test)]
 
 
-pub use system;
+pub use frame_system;
 
 
 use frame_support::traits::{OnFinalize, OnInitialize};
 use frame_support::traits::{OnFinalize, OnInitialize};
 use frame_support::{impl_outer_event, impl_outer_origin, parameter_types};
 use frame_support::{impl_outer_event, impl_outer_origin, parameter_types};
@@ -49,7 +49,7 @@ impl_outer_event! {
         discussion<T>,
         discussion<T>,
         balances<T>,
         balances<T>,
         membership_mod<T>,
         membership_mod<T>,
-        system<T>,
+        frame_system<T>,
     }
     }
 }
 }
 
 
@@ -65,6 +65,8 @@ impl balances::Trait for Test {
     type Event = TestEvent;
     type Event = TestEvent;
     type ExistentialDeposit = ExistentialDeposit;
     type ExistentialDeposit = ExistentialDeposit;
     type AccountStore = System;
     type AccountStore = System;
+    type WeightInfo = ();
+    type MaxLocks = ();
 }
 }
 
 
 impl common::currency::GovernanceCurrency for Test {
 impl common::currency::GovernanceCurrency for Test {
@@ -92,7 +94,7 @@ impl crate::Trait for Test {
 
 
 impl ActorOriginValidator<Origin, u64, u64> for () {
 impl ActorOriginValidator<Origin, u64, u64> for () {
     fn ensure_actor_origin(origin: Origin, actor_id: u64) -> Result<u64, &'static str> {
     fn ensure_actor_origin(origin: Origin, actor_id: u64) -> Result<u64, &'static str> {
-        if system::ensure_none(origin).is_ok() {
+        if frame_system::ensure_none(origin).is_ok() {
             return Ok(1);
             return Ok(1);
         }
         }
 
 
@@ -104,7 +106,7 @@ impl ActorOriginValidator<Origin, u64, u64> for () {
     }
     }
 }
 }
 
 
-impl system::Trait for Test {
+impl frame_system::Trait for Test {
     type BaseCallFilter = ();
     type BaseCallFilter = ();
     type Origin = Origin;
     type Origin = Origin;
     type Call = ();
     type Call = ();
@@ -125,20 +127,22 @@ impl system::Trait for Test {
     type MaximumBlockLength = MaximumBlockLength;
     type MaximumBlockLength = MaximumBlockLength;
     type AvailableBlockRatio = AvailableBlockRatio;
     type AvailableBlockRatio = AvailableBlockRatio;
     type Version = ();
     type Version = ();
-    type ModuleToIndex = ();
     type AccountData = balances::AccountData<u64>;
     type AccountData = balances::AccountData<u64>;
     type OnNewAccount = ();
     type OnNewAccount = ();
     type OnKilledAccount = ();
     type OnKilledAccount = ();
+    type PalletInfo = ();
+    type SystemWeightInfo = ();
 }
 }
 
 
 impl pallet_timestamp::Trait for Test {
 impl pallet_timestamp::Trait for Test {
     type Moment = u64;
     type Moment = u64;
     type OnTimestampSet = ();
     type OnTimestampSet = ();
     type MinimumPeriod = MinimumPeriod;
     type MinimumPeriod = MinimumPeriod;
+    type WeightInfo = ();
 }
 }
 
 
 pub fn initial_test_ext() -> sp_io::TestExternalities {
 pub fn initial_test_ext() -> sp_io::TestExternalities {
-    let t = system::GenesisConfig::default()
+    let t = frame_system::GenesisConfig::default()
         .build_storage::<Test>()
         .build_storage::<Test>()
         .unwrap();
         .unwrap();
 
 
@@ -146,7 +150,7 @@ pub fn initial_test_ext() -> sp_io::TestExternalities {
 }
 }
 
 
 pub type Discussions = crate::Module<Test>;
 pub type Discussions = crate::Module<Test>;
-pub type System = system::Module<Test>;
+pub type System = frame_system::Module<Test>;
 
 
 // Recommendation from Parity on testing on_finalize
 // Recommendation from Parity on testing on_finalize
 // https://substrate.dev/docs/en/next/development/module/tests
 // https://substrate.dev/docs/en/next/development/module/tests

+ 2 - 2
runtime-modules/proposals/discussion/src/tests/mod.rs

@@ -1,8 +1,8 @@
 mod mock;
 mod mock;
 
 
 use frame_support::dispatch::{DispatchError, DispatchResult};
 use frame_support::dispatch::{DispatchError, DispatchResult};
-use system::RawOrigin;
-use system::{EventRecord, Phase};
+use frame_system::RawOrigin;
+use frame_system::{EventRecord, Phase};
 
 
 use crate::*;
 use crate::*;
 use mock::*;
 use mock::*;

+ 13 - 13
runtime-modules/proposals/engine/Cargo.toml

@@ -1,27 +1,27 @@
 [package]
 [package]
 name = 'pallet-proposals-engine'
 name = 'pallet-proposals-engine'
-version = '3.0.0'
+version = '3.1.0'
 authors = ['Joystream contributors']
 authors = ['Joystream contributors']
 edition = '2018'
 edition = '2018'
 
 
 [dependencies]
 [dependencies]
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
-codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] }
-sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+codec = { package = 'parity-scale-codec', version = '1.3.4', default-features = false, features = ['derive'] }
+sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 membership = { package = 'pallet-membership', default-features = false, path = '../../membership'}
 membership = { package = 'pallet-membership', default-features = false, path = '../../membership'}
 stake = { package = 'pallet-stake', default-features = false, path = '../../stake'}
 stake = { package = 'pallet-stake', default-features = false, path = '../../stake'}
 common = { package = 'pallet-common', default-features = false, path = '../../common'}
 common = { package = 'pallet-common', default-features = false, path = '../../common'}
 
 
 [dev-dependencies]
 [dev-dependencies]
 mockall = "0.7.1"
 mockall = "0.7.1"
-sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 
 
 [features]
 [features]
 default = ['std']
 default = ['std']
@@ -30,11 +30,11 @@ std = [
 	'codec/std',
 	'codec/std',
 	'sp-std/std',
 	'sp-std/std',
 	'frame-support/std',
 	'frame-support/std',
-	'system/std',
+	'frame-system/std',
 	'pallet-timestamp/std',
 	'pallet-timestamp/std',
 	'sp-arithmetic/std',
 	'sp-arithmetic/std',
 	'sp-runtime/std',
 	'sp-runtime/std',
     'membership/std',
     'membership/std',
     'stake/std',
     'stake/std',
     'common/std',
     'common/std',
-]
+]

+ 15 - 15
runtime-modules/proposals/engine/src/lib.rs

@@ -1,6 +1,6 @@
 //! # Proposals engine module
 //! # Proposals engine module
 //! Proposals `engine` module for the Joystream platform. Version 2.
 //! Proposals `engine` module for the Joystream platform. Version 2.
-//! The main component of the proposals system. Provides methods and extrinsics to create and
+//! The main component of the proposals frame_system. Provides methods and extrinsics to create and
 //! vote for proposals, inspired by Parity **Democracy module**.
 //! vote for proposals, inspired by Parity **Democracy module**.
 //!
 //!
 //! ## Overview
 //! ## Overview
@@ -58,7 +58,7 @@
 //!
 //!
 //! ```
 //! ```
 //! use frame_support::{decl_module, print};
 //! use frame_support::{decl_module, print};
-//! use system::ensure_signed;
+//! use frame_system::ensure_signed;
 //! use codec::Encode;
 //! use codec::Encode;
 //! use pallet_proposals_engine::{self as engine, ProposalParameters};
 //! use pallet_proposals_engine::{self as engine, ProposalParameters};
 //!
 //!
@@ -134,9 +134,9 @@ use frame_support::traits::{Currency, Get};
 use frame_support::{
 use frame_support::{
     decl_error, decl_event, decl_module, decl_storage, ensure, print, Parameter, StorageDoubleMap,
     decl_error, decl_event, decl_module, decl_storage, ensure, print, Parameter, StorageDoubleMap,
 };
 };
+use frame_system::{ensure_root, RawOrigin};
 use sp_arithmetic::traits::Zero;
 use sp_arithmetic::traits::Zero;
 use sp_std::vec::Vec;
 use sp_std::vec::Vec;
-use system::{ensure_root, RawOrigin};
 
 
 use common::origin::ActorOriginValidator;
 use common::origin::ActorOriginValidator;
 
 
@@ -144,10 +144,10 @@ type MemberId<T> = <T as membership::Trait>::MemberId;
 
 
 /// Proposals engine trait.
 /// Proposals engine trait.
 pub trait Trait:
 pub trait Trait:
-    system::Trait + pallet_timestamp::Trait + stake::Trait + membership::Trait
+    frame_system::Trait + pallet_timestamp::Trait + stake::Trait + membership::Trait
 {
 {
     /// Engine event type.
     /// Engine event type.
-    type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;
+    type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>;
 
 
     /// Validates proposer id and origin combination
     /// Validates proposer id and origin combination
     type ProposerOriginValidator: ActorOriginValidator<
     type ProposerOriginValidator: ActorOriginValidator<
@@ -193,8 +193,8 @@ decl_event!(
     where
     where
         <T as Trait>::ProposalId,
         <T as Trait>::ProposalId,
         MemberId = MemberId<T>,
         MemberId = MemberId<T>,
-        <T as system::Trait>::BlockNumber,
-        <T as system::Trait>::AccountId,
+        <T as frame_system::Trait>::BlockNumber,
+        <T as frame_system::Trait>::AccountId,
         <T as stake::Trait>::StakeId,
         <T as stake::Trait>::StakeId,
     {
     {
         /// Emits on proposal creation.
         /// Emits on proposal creation.
@@ -587,9 +587,9 @@ impl<T: Trait> Module<T> {
 }
 }
 
 
 impl<T: Trait> Module<T> {
 impl<T: Trait> Module<T> {
-    // Wrapper-function over system::block_number()
+    // Wrapper-function over frame_system::block_number()
     fn current_block() -> T::BlockNumber {
     fn current_block() -> T::BlockNumber {
-        <system::Module<T>>::block_number()
+        <frame_system::Module<T>>::block_number()
     }
     }
 
 
     // Enumerates through active proposals. Tally Voting results.
     // Enumerates through active proposals. Tally Voting results.
@@ -819,28 +819,28 @@ impl<T: Trait> Module<T> {
 // Simplification of the 'FinalizedProposalData' type
 // Simplification of the 'FinalizedProposalData' type
 type FinalizedProposal<T> = FinalizedProposalData<
 type FinalizedProposal<T> = FinalizedProposalData<
     <T as Trait>::ProposalId,
     <T as Trait>::ProposalId,
-    <T as system::Trait>::BlockNumber,
+    <T as frame_system::Trait>::BlockNumber,
     MemberId<T>,
     MemberId<T>,
     types::BalanceOf<T>,
     types::BalanceOf<T>,
     <T as stake::Trait>::StakeId,
     <T as stake::Trait>::StakeId,
-    <T as system::Trait>::AccountId,
+    <T as frame_system::Trait>::AccountId,
 >;
 >;
 
 
 // Simplification of the 'ApprovedProposalData' type
 // Simplification of the 'ApprovedProposalData' type
 type ApprovedProposal<T> = ApprovedProposalData<
 type ApprovedProposal<T> = ApprovedProposalData<
     <T as Trait>::ProposalId,
     <T as Trait>::ProposalId,
-    <T as system::Trait>::BlockNumber,
+    <T as frame_system::Trait>::BlockNumber,
     MemberId<T>,
     MemberId<T>,
     types::BalanceOf<T>,
     types::BalanceOf<T>,
     <T as stake::Trait>::StakeId,
     <T as stake::Trait>::StakeId,
-    <T as system::Trait>::AccountId,
+    <T as frame_system::Trait>::AccountId,
 >;
 >;
 
 
 // Simplification of the 'Proposal' type
 // Simplification of the 'Proposal' type
 type ProposalOf<T> = Proposal<
 type ProposalOf<T> = Proposal<
-    <T as system::Trait>::BlockNumber,
+    <T as frame_system::Trait>::BlockNumber,
     MemberId<T>,
     MemberId<T>,
     types::BalanceOf<T>,
     types::BalanceOf<T>,
     <T as stake::Trait>::StakeId,
     <T as stake::Trait>::StakeId,
-    <T as system::Trait>::AccountId,
+    <T as frame_system::Trait>::AccountId,
 >;
 >;

+ 11 - 7
runtime-modules/proposals/engine/src/tests/mock/mod.rs

@@ -9,13 +9,13 @@
 #![cfg(test)]
 #![cfg(test)]
 
 
 use frame_support::{impl_outer_event, impl_outer_origin, parameter_types};
 use frame_support::{impl_outer_event, impl_outer_origin, parameter_types};
+pub use frame_system;
 use sp_core::H256;
 use sp_core::H256;
 use sp_runtime::{
 use sp_runtime::{
     testing::Header,
     testing::Header,
     traits::{BlakeTwo256, IdentityLookup},
     traits::{BlakeTwo256, IdentityLookup},
     Perbill,
     Perbill,
 };
 };
-pub use system;
 
 
 mod balance_manager;
 mod balance_manager;
 pub(crate) mod proposals;
 pub(crate) mod proposals;
@@ -46,7 +46,7 @@ impl_outer_event! {
         balances<T>,
         balances<T>,
         engine<T>,
         engine<T>,
         membership_mod<T>,
         membership_mod<T>,
-        system<T>,
+        frame_system<T>,
     }
     }
 }
 }
 
 
@@ -60,6 +60,8 @@ impl balances::Trait for Test {
     type Event = TestEvent;
     type Event = TestEvent;
     type ExistentialDeposit = ExistentialDeposit;
     type ExistentialDeposit = ExistentialDeposit;
     type AccountStore = System;
     type AccountStore = System;
+    type WeightInfo = ();
+    type MaxLocks = ();
 }
 }
 
 
 impl common::currency::GovernanceCurrency for Test {
 impl common::currency::GovernanceCurrency for Test {
@@ -115,7 +117,7 @@ impl Default for proposals::Call<Test> {
 
 
 impl common::origin::ActorOriginValidator<Origin, u64, u64> for () {
 impl common::origin::ActorOriginValidator<Origin, u64, u64> for () {
     fn ensure_actor_origin(origin: Origin, _account_id: u64) -> Result<u64, &'static str> {
     fn ensure_actor_origin(origin: Origin, _account_id: u64) -> Result<u64, &'static str> {
-        let signed_account_id = system::ensure_signed(origin)?;
+        let signed_account_id = frame_system::ensure_signed(origin)?;
 
 
         Ok(signed_account_id)
         Ok(signed_account_id)
     }
     }
@@ -138,7 +140,7 @@ parameter_types! {
     pub const StakePoolId: [u8; 8] = *b"joystake";
     pub const StakePoolId: [u8; 8] = *b"joystake";
 }
 }
 
 
-impl system::Trait for Test {
+impl frame_system::Trait for Test {
     type BaseCallFilter = ();
     type BaseCallFilter = ();
     type Origin = Origin;
     type Origin = Origin;
     type Call = ();
     type Call = ();
@@ -159,20 +161,22 @@ impl system::Trait for Test {
     type MaximumBlockLength = MaximumBlockLength;
     type MaximumBlockLength = MaximumBlockLength;
     type AvailableBlockRatio = AvailableBlockRatio;
     type AvailableBlockRatio = AvailableBlockRatio;
     type Version = ();
     type Version = ();
-    type ModuleToIndex = ();
     type AccountData = balances::AccountData<u64>;
     type AccountData = balances::AccountData<u64>;
     type OnNewAccount = ();
     type OnNewAccount = ();
     type OnKilledAccount = ();
     type OnKilledAccount = ();
+    type PalletInfo = ();
+    type SystemWeightInfo = ();
 }
 }
 
 
 impl pallet_timestamp::Trait for Test {
 impl pallet_timestamp::Trait for Test {
     type Moment = u64;
     type Moment = u64;
     type OnTimestampSet = ();
     type OnTimestampSet = ();
     type MinimumPeriod = MinimumPeriod;
     type MinimumPeriod = MinimumPeriod;
+    type WeightInfo = ();
 }
 }
 
 
 pub fn initial_test_ext() -> sp_io::TestExternalities {
 pub fn initial_test_ext() -> sp_io::TestExternalities {
-    let t = system::GenesisConfig::default()
+    let t = frame_system::GenesisConfig::default()
         .build_storage::<Test>()
         .build_storage::<Test>()
         .unwrap();
         .unwrap();
 
 
@@ -180,5 +184,5 @@ pub fn initial_test_ext() -> sp_io::TestExternalities {
 }
 }
 
 
 pub type ProposalsEngine = crate::Module<Test>;
 pub type ProposalsEngine = crate::Module<Test>;
-pub type System = system::Module<Test>;
+pub type System = frame_system::Module<Test>;
 pub type Balances = balances::Module<Test>;
 pub type Balances = balances::Module<Test>;

+ 1 - 1
runtime-modules/proposals/engine/src/tests/mock/proposals.rs

@@ -2,7 +2,7 @@
 
 
 use frame_support::decl_module;
 use frame_support::decl_module;
 use sp_std::vec::Vec;
 use sp_std::vec::Vec;
-pub trait Trait: system::Trait {}
+pub trait Trait: frame_system::Trait {}
 
 
 decl_module! {
 decl_module! {
     pub struct Module<T: Trait> for enum Call where origin: T::Origin {
     pub struct Module<T: Trait> for enum Call where origin: T::Origin {

+ 9 - 4
runtime-modules/proposals/engine/src/tests/mod.rs

@@ -7,9 +7,9 @@ use codec::Encode;
 use frame_support::dispatch::DispatchResult;
 use frame_support::dispatch::DispatchResult;
 use frame_support::traits::{Currency, OnFinalize, OnInitialize};
 use frame_support::traits::{Currency, OnFinalize, OnInitialize};
 use frame_support::{StorageDoubleMap, StorageMap, StorageValue};
 use frame_support::{StorageDoubleMap, StorageMap, StorageValue};
+use frame_system::RawOrigin;
+use frame_system::{EventRecord, Phase};
 use sp_std::rc::Rc;
 use sp_std::rc::Rc;
-use system::RawOrigin;
-use system::{EventRecord, Phase};
 
 
 pub(crate) fn increase_total_balance_issuance_using_account_id(account_id: u64, balance: u64) {
 pub(crate) fn increase_total_balance_issuance_using_account_id(account_id: u64, balance: u64) {
     let initial_balance = Balances::total_issuance();
     let initial_balance = Balances::total_issuance();
@@ -240,7 +240,7 @@ impl VoteGenerator {
         }
         }
 
 
         ProposalsEngine::vote(
         ProposalsEngine::vote(
-            system::RawOrigin::Signed(self.current_account_id).into(),
+            frame_system::RawOrigin::Signed(self.current_account_id).into(),
             self.current_voter_id,
             self.current_voter_id,
             self.proposal_id,
             self.proposal_id,
             vote_kind,
             vote_kind,
@@ -305,7 +305,12 @@ fn vote_succeeds() {
 fn vote_fails_with_insufficient_rights() {
 fn vote_fails_with_insufficient_rights() {
     initial_test_ext().execute_with(|| {
     initial_test_ext().execute_with(|| {
         assert_eq!(
         assert_eq!(
-            ProposalsEngine::vote(system::RawOrigin::None.into(), 1, 1, VoteKind::Approve),
+            ProposalsEngine::vote(
+                frame_system::RawOrigin::None.into(),
+                1,
+                1,
+                VoteKind::Approve
+            ),
             Err(DispatchError::Other("Bad origin"))
             Err(DispatchError::Other("Bad origin"))
         );
         );
     });
     });

+ 6 - 5
runtime-modules/proposals/engine/src/types/mod.rs

@@ -125,7 +125,7 @@ pub struct ActiveStake<StakeId, AccountId> {
     pub source_account_id: AccountId,
     pub source_account_id: AccountId,
 }
 }
 
 
-/// 'Proposal' contains information necessary for the proposal system functioning.
+/// 'Proposal' contains information necessary for the proposal frame_system functioning.
 #[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
 #[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
 #[derive(Encode, Decode, Default, Clone, PartialEq, Eq, Debug)]
 #[derive(Encode, Decode, Default, Clone, PartialEq, Eq, Debug)]
 pub struct Proposal<BlockNumber, ProposerId, Balance, StakeId, AccountId> {
 pub struct Proposal<BlockNumber, ProposerId, Balance, StakeId, AccountId> {
@@ -308,7 +308,7 @@ pub trait ProposalExecutable {
 }
 }
 
 
 /// Proposal code binary converter
 /// Proposal code binary converter
-pub trait ProposalCodeDecoder<T: system::Trait> {
+pub trait ProposalCodeDecoder<T: frame_system::Trait> {
     /// Converts proposal code binary to executable representation
     /// Converts proposal code binary to executable representation
     fn decode_proposal(
     fn decode_proposal(
         proposal_type: u32,
         proposal_type: u32,
@@ -318,11 +318,12 @@ pub trait ProposalCodeDecoder<T: system::Trait> {
 
 
 /// Balance alias
 /// Balance alias
 pub type BalanceOf<T> =
 pub type BalanceOf<T> =
-    <<T as stake::Trait>::Currency as Currency<<T as system::Trait>::AccountId>>::Balance;
+    <<T as stake::Trait>::Currency as Currency<<T as frame_system::Trait>::AccountId>>::Balance;
 
 
 /// Balance alias for staking
 /// Balance alias for staking
-pub type NegativeImbalance<T> =
-    <<T as stake::Trait>::Currency as Currency<<T as system::Trait>::AccountId>>::NegativeImbalance;
+pub type NegativeImbalance<T> = <<T as stake::Trait>::Currency as Currency<
+    <T as frame_system::Trait>::AccountId,
+>>::NegativeImbalance;
 
 
 /// Balance type of runtime
 /// Balance type of runtime
 pub type CurrencyOf<T> = <T as stake::Trait>::Currency;
 pub type CurrencyOf<T> = <T as stake::Trait>::Currency;

+ 10 - 10
runtime-modules/recurring-reward/Cargo.toml

@@ -1,21 +1,21 @@
 [package]
 [package]
 name = 'pallet-recurring-reward'
 name = 'pallet-recurring-reward'
-version = '3.0.0'
+version = '3.1.0'
 authors = ['Joystream contributors']
 authors = ['Joystream contributors']
 edition = '2018'
 edition = '2018'
 
 
 [dependencies]
 [dependencies]
-codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] }
-sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+codec = { package = 'parity-scale-codec', version = '1.3.4', default-features = false, features = ['derive'] }
+sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 minting = { package = 'pallet-token-mint', default-features = false, path = '../token-minting'}
 minting = { package = 'pallet-token-mint', default-features = false, path = '../token-minting'}
 
 
 [dev-dependencies]
 [dev-dependencies]
-sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 
 
 [features]
 [features]
 default = ['std']
 default = ['std']
@@ -24,6 +24,6 @@ std = [
 	'sp-arithmetic/std',
 	'sp-arithmetic/std',
 	'sp-runtime/std',
 	'sp-runtime/std',
 	'frame-support/std',
 	'frame-support/std',
-	'system/std',
+	'frame-system/std',
 	'minting/std',
 	'minting/std',
 ]
 ]

+ 3 - 3
runtime-modules/recurring-reward/src/lib.rs

@@ -19,7 +19,7 @@ use minting::BalanceOf;
 mod mock;
 mod mock;
 mod tests;
 mod tests;
 
 
-pub trait Trait: system::Trait + minting::Trait {
+pub trait Trait: frame_system::Trait + minting::Trait {
     type PayoutStatusHandler: PayoutStatusHandler<Self>;
     type PayoutStatusHandler: PayoutStatusHandler<Self>;
 
 
     /// Type of identifier for recipients.
     /// Type of identifier for recipients.
@@ -199,7 +199,7 @@ impl<T: Trait> Module<T> {
             RewardsError::RecipientNotFound
             RewardsError::RecipientNotFound
         );
         );
         ensure!(
         ensure!(
-            next_payment_at_block > <system::Module<T>>::block_number(),
+            next_payment_at_block > <frame_system::Module<T>>::block_number(),
             RewardsError::NextPaymentNotInFuture
             RewardsError::NextPaymentNotInFuture
         );
         );
 
 
@@ -300,7 +300,7 @@ impl<T: Trait> Module<T> {
         if let Some(next_payout_at_block) = new_next_payment_at {
         if let Some(next_payout_at_block) = new_next_payment_at {
             if let Some(blocknumber) = next_payout_at_block {
             if let Some(blocknumber) = next_payout_at_block {
                 ensure!(
                 ensure!(
-                    blocknumber > <system::Module<T>>::block_number(),
+                    blocknumber > <frame_system::Module<T>>::block_number(),
                     RewardsError::NextPaymentNotInFuture
                     RewardsError::NextPaymentNotInFuture
                 );
                 );
             }
             }

+ 7 - 4
runtime-modules/recurring-reward/src/mock/mod.rs

@@ -30,7 +30,7 @@ parameter_types! {
     pub const MinimumPeriod: u64 = 5;
     pub const MinimumPeriod: u64 = 5;
 }
 }
 
 
-impl system::Trait for Test {
+impl frame_system::Trait for Test {
     type BaseCallFilter = ();
     type BaseCallFilter = ();
     type Origin = Origin;
     type Origin = Origin;
     type Call = ();
     type Call = ();
@@ -51,10 +51,11 @@ impl system::Trait for Test {
     type MaximumBlockLength = MaximumBlockLength;
     type MaximumBlockLength = MaximumBlockLength;
     type AvailableBlockRatio = AvailableBlockRatio;
     type AvailableBlockRatio = AvailableBlockRatio;
     type Version = ();
     type Version = ();
-    type ModuleToIndex = ();
     type AccountData = balances::AccountData<u64>;
     type AccountData = balances::AccountData<u64>;
     type OnNewAccount = ();
     type OnNewAccount = ();
     type OnKilledAccount = ();
     type OnKilledAccount = ();
+    type SystemWeightInfo = ();
+    type PalletInfo = ();
 }
 }
 
 
 parameter_types! {
 parameter_types! {
@@ -67,6 +68,8 @@ impl balances::Trait for Test {
     type Event = ();
     type Event = ();
     type ExistentialDeposit = ExistentialDeposit;
     type ExistentialDeposit = ExistentialDeposit;
     type AccountStore = System;
     type AccountStore = System;
+    type WeightInfo = ();
+    type MaxLocks = ();
 }
 }
 
 
 impl Trait for Test {
 impl Trait for Test {
@@ -83,14 +86,14 @@ impl minting::Trait for Test {
 pub fn build_test_externalities() -> sp_io::TestExternalities {
 pub fn build_test_externalities() -> sp_io::TestExternalities {
     MockStatusHandler::reset();
     MockStatusHandler::reset();
 
 
-    let t = system::GenesisConfig::default()
+    let t = frame_system::GenesisConfig::default()
         .build_storage::<Test>()
         .build_storage::<Test>()
         .unwrap();
         .unwrap();
 
 
     t.into()
     t.into()
 }
 }
 
 
-pub type System = system::Module<Test>;
+pub type System = frame_system::Module<Test>;
 pub type Balances = balances::Module<Test>;
 pub type Balances = balances::Module<Test>;
 pub type Rewards = Module<Test>;
 pub type Rewards = Module<Test>;
 pub type Minting = minting::Module<Test>;
 pub type Minting = minting::Module<Test>;

+ 12 - 12
runtime-modules/service-discovery/Cargo.toml

@@ -1,23 +1,23 @@
 [package]
 [package]
 name = 'pallet-service-discovery'
 name = 'pallet-service-discovery'
-version = '3.0.0'
+version = '3.1.0'
 authors = ['Joystream contributors']
 authors = ['Joystream contributors']
 edition = '2018'
 edition = '2018'
 
 
 [dependencies]
 [dependencies]
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
-codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] }
-sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+codec = { package = 'parity-scale-codec', version = '1.3.4', default-features = false, features = ['derive'] }
+sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 working-group = { package = 'pallet-working-group', default-features = false, path = '../working-group'}
 working-group = { package = 'pallet-working-group', default-features = false, path = '../working-group'}
 
 
 [dev-dependencies]
 [dev-dependencies]
-sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 membership = { package = 'pallet-membership', default-features = false, path = '../membership'}
 membership = { package = 'pallet-membership', default-features = false, path = '../membership'}
 stake = { package = 'pallet-stake', default-features = false, path = '../stake'}
 stake = { package = 'pallet-stake', default-features = false, path = '../stake'}
 hiring = { package = 'pallet-hiring', default-features = false, path = '../hiring'}
 hiring = { package = 'pallet-hiring', default-features = false, path = '../hiring'}
@@ -32,7 +32,7 @@ std = [
 	'codec/std',
 	'codec/std',
 	'sp-std/std',
 	'sp-std/std',
 	'frame-support/std',
 	'frame-support/std',
-	'system/std',
+	'frame-system/std',
 	'sp-runtime/std',
 	'sp-runtime/std',
 	'working-group/std',
 	'working-group/std',
-]
+]

+ 6 - 6
runtime-modules/service-discovery/src/lib.rs

@@ -1,6 +1,6 @@
 //! # Service discovery module
 //! # Service discovery module
 //! Service discovery module for the Joystream platform supports the storage providers.
 //! Service discovery module for the Joystream platform supports the storage providers.
-//! It registers their 'pings' in the system with the expiration time, and stores the bootstrap
+//! It registers their 'pings' in the frame_system with the expiration time, and stores the bootstrap
 //! nodes for the Colossus.
 //! nodes for the Colossus.
 //!
 //!
 //! ## Comments
 //! ## Comments
@@ -27,8 +27,8 @@ use codec::{Decode, Encode};
 use serde::{Deserialize, Serialize};
 use serde::{Deserialize, Serialize};
 
 
 use frame_support::{decl_event, decl_module, decl_storage, ensure};
 use frame_support::{decl_event, decl_module, decl_storage, ensure};
+use frame_system::ensure_root;
 use sp_std::vec::Vec;
 use sp_std::vec::Vec;
-use system::ensure_root;
 /*
 /*
   Although there is support for ed25519 keys as the IPNS identity key and we could potentially
   Although there is support for ed25519 keys as the IPNS identity key and we could potentially
   reuse the same key for the role account and ipns (and make this discovery module obselete)
   reuse the same key for the role account and ipns (and make this discovery module obselete)
@@ -71,9 +71,9 @@ pub struct ServiceProviderRecord<BlockNumber> {
 }
 }
 
 
 /// The _Service discovery_ main _Trait_.
 /// The _Service discovery_ main _Trait_.
-pub trait Trait: system::Trait + working_group::Trait<StorageWorkingGroupInstance> {
+pub trait Trait: frame_system::Trait + working_group::Trait<StorageWorkingGroupInstance> {
     /// _Service discovery_ event type.
     /// _Service discovery_ event type.
-    type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;
+    type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>;
 }
 }
 
 
 decl_storage! {
 decl_storage! {
@@ -133,7 +133,7 @@ decl_module! {
 
 
             <AccountInfoByStorageProviderId<T>>::insert(storage_provider_id, ServiceProviderRecord {
             <AccountInfoByStorageProviderId<T>>::insert(storage_provider_id, ServiceProviderRecord {
                 identity: id.clone(),
                 identity: id.clone(),
-                expires_at: <system::Module<T>>::block_number() + Self::default_lifetime(),
+                expires_at: <frame_system::Module<T>>::block_number() + Self::default_lifetime(),
             });
             });
 
 
             Self::deposit_event(RawEvent::AccountInfoUpdated(storage_provider_id, id));
             Self::deposit_event(RawEvent::AccountInfoUpdated(storage_provider_id, id));
@@ -183,7 +183,7 @@ impl<T: Trait> Module<T> {
     /// Verifies that account info for the storage provider is still valid.
     /// Verifies that account info for the storage provider is still valid.
     pub fn is_account_info_expired(storage_provider_id: &StorageProviderId<T>) -> bool {
     pub fn is_account_info_expired(storage_provider_id: &StorageProviderId<T>) -> bool {
         !<AccountInfoByStorageProviderId<T>>::contains_key(storage_provider_id)
         !<AccountInfoByStorageProviderId<T>>::contains_key(storage_provider_id)
-            || <system::Module<T>>::block_number()
+            || <frame_system::Module<T>>::block_number()
                 > <AccountInfoByStorageProviderId<T>>::get(storage_provider_id).expires_at
                 > <AccountInfoByStorageProviderId<T>>::get(storage_provider_id).expires_at
     }
     }
 }
 }

+ 9 - 5
runtime-modules/service-discovery/src/mock.rs

@@ -37,7 +37,7 @@ impl_outer_event! {
         balances<T>,
         balances<T>,
         membership_mod<T>,
         membership_mod<T>,
         working_group_mod StorageWorkingGroupInstance <T>,
         working_group_mod StorageWorkingGroupInstance <T>,
-        system<T>,
+        frame_system<T>,
     }
     }
 }
 }
 
 
@@ -54,7 +54,7 @@ parameter_types! {
     pub const ExistentialDeposit: u32 = 0;
     pub const ExistentialDeposit: u32 = 0;
 }
 }
 
 
-impl system::Trait for Test {
+impl frame_system::Trait for Test {
     type BaseCallFilter = ();
     type BaseCallFilter = ();
     type Origin = Origin;
     type Origin = Origin;
     type Call = ();
     type Call = ();
@@ -75,10 +75,11 @@ impl system::Trait for Test {
     type MaximumBlockLength = MaximumBlockLength;
     type MaximumBlockLength = MaximumBlockLength;
     type AvailableBlockRatio = AvailableBlockRatio;
     type AvailableBlockRatio = AvailableBlockRatio;
     type Version = ();
     type Version = ();
-    type ModuleToIndex = ();
     type AccountData = balances::AccountData<u64>;
     type AccountData = balances::AccountData<u64>;
     type OnNewAccount = ();
     type OnNewAccount = ();
     type OnKilledAccount = ();
     type OnKilledAccount = ();
+    type SystemWeightInfo = ();
+    type PalletInfo = ();
 }
 }
 
 
 impl Trait for Test {
 impl Trait for Test {
@@ -123,6 +124,8 @@ impl balances::Trait for Test {
     type Event = MetaEvent;
     type Event = MetaEvent;
     type ExistentialDeposit = ExistentialDeposit;
     type ExistentialDeposit = ExistentialDeposit;
     type AccountStore = System;
     type AccountStore = System;
+    type WeightInfo = ();
+    type MaxLocks = ();
 }
 }
 
 
 impl recurringrewards::Trait for Test {
 impl recurringrewards::Trait for Test {
@@ -144,10 +147,11 @@ impl pallet_timestamp::Trait for Test {
     type Moment = u64;
     type Moment = u64;
     type OnTimestampSet = ();
     type OnTimestampSet = ();
     type MinimumPeriod = MinimumPeriod;
     type MinimumPeriod = MinimumPeriod;
+    type WeightInfo = ();
 }
 }
 
 
 pub fn initial_test_ext() -> sp_io::TestExternalities {
 pub fn initial_test_ext() -> sp_io::TestExternalities {
-    let t = system::GenesisConfig::default()
+    let t = frame_system::GenesisConfig::default()
         .build_storage::<Test>()
         .build_storage::<Test>()
         .unwrap();
         .unwrap();
 
 
@@ -155,7 +159,7 @@ pub fn initial_test_ext() -> sp_io::TestExternalities {
 }
 }
 
 
 pub type Balances = balances::Module<Test>;
 pub type Balances = balances::Module<Test>;
-pub type System = system::Module<Test>;
+pub type System = frame_system::Module<Test>;
 pub type Discovery = Module<Test>;
 pub type Discovery = Module<Test>;
 
 
 pub(crate) fn hire_storage_provider() -> (u64, u64) {
 pub(crate) fn hire_storage_provider() -> (u64, u64) {

+ 4 - 4
runtime-modules/service-discovery/src/tests.rs

@@ -2,7 +2,7 @@
 
 
 use super::mock::*;
 use super::mock::*;
 
 
-use system::{EventRecord, Phase, RawOrigin};
+use frame_system::{EventRecord, Phase, RawOrigin};
 
 
 #[test]
 #[test]
 fn set_ipns_id() {
 fn set_ipns_id() {
@@ -13,7 +13,7 @@ fn set_ipns_id() {
         let (storage_provider_account_id, storage_provider_id) = hire_storage_provider();
         let (storage_provider_account_id, storage_provider_id) = hire_storage_provider();
 
 
         let identity = "alice".as_bytes().to_vec();
         let identity = "alice".as_bytes().to_vec();
-        let ttl = <Test as system::Trait>::BlockNumber::from(DEFAULT_LIFETIME);
+        let ttl = <Test as frame_system::Trait>::BlockNumber::from(DEFAULT_LIFETIME);
         assert!(Discovery::set_ipns_id(
         assert!(Discovery::set_ipns_id(
             Origin::signed(storage_provider_account_id),
             Origin::signed(storage_provider_account_id),
             storage_provider_id,
             storage_provider_id,
@@ -137,7 +137,7 @@ fn is_account_info_expired() {
 #[test]
 #[test]
 fn set_default_lifetime() {
 fn set_default_lifetime() {
     initial_test_ext().execute_with(|| {
     initial_test_ext().execute_with(|| {
-        let lifetime = <Test as system::Trait>::BlockNumber::from(MINIMUM_LIFETIME + 2000);
+        let lifetime = <Test as frame_system::Trait>::BlockNumber::from(MINIMUM_LIFETIME + 2000);
         // privileged method should fail if not from root origin
         // privileged method should fail if not from root origin
         assert!(
         assert!(
             Discovery::set_default_lifetime(Origin::signed(1), lifetime).is_err(),
             Discovery::set_default_lifetime(Origin::signed(1), lifetime).is_err(),
@@ -151,7 +151,7 @@ fn set_default_lifetime() {
 
 
         // cannot set default lifetime to less than minimum
         // cannot set default lifetime to less than minimum
         let less_than_min_lifetime =
         let less_than_min_lifetime =
-            <Test as system::Trait>::BlockNumber::from(MINIMUM_LIFETIME - 1);
+            <Test as frame_system::Trait>::BlockNumber::from(MINIMUM_LIFETIME - 1);
         assert!(
         assert!(
             Discovery::set_default_lifetime(RawOrigin::Root.into(), less_than_min_lifetime)
             Discovery::set_default_lifetime(RawOrigin::Root.into(), less_than_min_lifetime)
                 .is_err(),
                 .is_err(),

+ 13 - 13
runtime-modules/stake/Cargo.toml

@@ -1,22 +1,22 @@
 [package]
 [package]
 name = 'pallet-stake'
 name = 'pallet-stake'
-version = '3.0.0'
+version = '3.1.0'
 authors = ['Joystream contributors']
 authors = ['Joystream contributors']
 edition = '2018'
 edition = '2018'
 
 
 [dependencies]
 [dependencies]
-codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] }
-sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+codec = { package = 'parity-scale-codec', version = '1.3.4', default-features = false, features = ['derive'] }
+sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 
 
 [dev-dependencies]
 [dev-dependencies]
-sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 
 
 [features]
 [features]
 default = ['std']
 default = ['std']
@@ -24,7 +24,7 @@ std = [
 	'codec/std',
 	'codec/std',
 	'sp-std/std',
 	'sp-std/std',
 	'frame-support/std',
 	'frame-support/std',
-	'system/std',
+	'frame-system/std',
 	'sp-arithmetic/std',
 	'sp-arithmetic/std',
 	'sp-runtime/std',
 	'sp-runtime/std',
-]
+]

+ 10 - 6
runtime-modules/stake/src/lib.rs

@@ -18,12 +18,12 @@ mod mock;
 mod tests;
 mod tests;
 
 
 pub type BalanceOf<T> =
 pub type BalanceOf<T> =
-    <<T as Trait>::Currency as Currency<<T as system::Trait>::AccountId>>::Balance;
+    <<T as Trait>::Currency as Currency<<T as frame_system::Trait>::AccountId>>::Balance;
 
 
 pub type NegativeImbalance<T> =
 pub type NegativeImbalance<T> =
-    <<T as Trait>::Currency as Currency<<T as system::Trait>::AccountId>>::NegativeImbalance;
+    <<T as Trait>::Currency as Currency<<T as frame_system::Trait>::AccountId>>::NegativeImbalance;
 
 
-pub trait Trait: system::Trait + Sized {
+pub trait Trait: frame_system::Trait + Sized {
     /// The currency that is managed by the module
     /// The currency that is managed by the module
     type Currency: Currency<Self::AccountId>;
     type Currency: Currency<Self::AccountId>;
 
 
@@ -744,7 +744,10 @@ impl<T: Trait> Module<T> {
         let stake_id = Self::stakes_created();
         let stake_id = Self::stakes_created();
         <StakesCreated<T>>::put(stake_id + One::one());
         <StakesCreated<T>>::put(stake_id + One::one());
 
 
-        <Stakes<T>>::insert(&stake_id, Stake::new(<system::Module<T>>::block_number()));
+        <Stakes<T>>::insert(
+            &stake_id,
+            Stake::new(<frame_system::Module<T>>::block_number()),
+        );
 
 
         stake_id
         stake_id
     }
     }
@@ -1036,7 +1039,7 @@ impl<T: Trait> Module<T> {
         let slash_id = stake.initiate_slashing(
         let slash_id = stake.initiate_slashing(
             slash_amount,
             slash_amount,
             slash_period,
             slash_period,
-            <system::Module<T>>::block_number(),
+            <frame_system::Module<T>>::block_number(),
         )?;
         )?;
 
 
         <Stakes<T>>::insert(stake_id, stake);
         <Stakes<T>>::insert(stake_id, stake);
@@ -1092,7 +1095,8 @@ impl<T: Trait> Module<T> {
         let mut stake = ensure_stake_exists!(T, stake_id, StakeActionError::StakeNotFound)?;
         let mut stake = ensure_stake_exists!(T, stake_id, StakeActionError::StakeNotFound)?;
 
 
         if let Some(unstaking_period) = unstaking_period {
         if let Some(unstaking_period) = unstaking_period {
-            stake.initiate_unstaking(unstaking_period, <system::Module<T>>::block_number())?;
+            stake
+                .initiate_unstaking(unstaking_period, <frame_system::Module<T>>::block_number())?;
             <Stakes<T>>::insert(stake_id, stake);
             <Stakes<T>>::insert(stake_id, stake);
         } else {
         } else {
             let staked_amount = stake.unstake()?;
             let staked_amount = stake.unstake()?;

+ 8 - 5
runtime-modules/stake/src/mock.rs

@@ -25,7 +25,7 @@ parameter_types! {
     pub const AvailableBlockRatio: Perbill = Perbill::one();
     pub const AvailableBlockRatio: Perbill = Perbill::one();
 }
 }
 
 
-impl system::Trait for Test {
+impl frame_system::Trait for Test {
     type BaseCallFilter = ();
     type BaseCallFilter = ();
     type Origin = Origin;
     type Origin = Origin;
     type Call = ();
     type Call = ();
@@ -46,10 +46,11 @@ impl system::Trait for Test {
     type MaximumBlockLength = MaximumBlockLength;
     type MaximumBlockLength = MaximumBlockLength;
     type AvailableBlockRatio = AvailableBlockRatio;
     type AvailableBlockRatio = AvailableBlockRatio;
     type Version = ();
     type Version = ();
-    type ModuleToIndex = ();
     type AccountData = balances::AccountData<u64>;
     type AccountData = balances::AccountData<u64>;
     type OnNewAccount = ();
     type OnNewAccount = ();
     type OnKilledAccount = ();
     type OnKilledAccount = ();
+    type SystemWeightInfo = ();
+    type PalletInfo = ();
 }
 }
 
 
 parameter_types! {
 parameter_types! {
@@ -63,6 +64,8 @@ impl balances::Trait for Test {
     type Event = ();
     type Event = ();
     type ExistentialDeposit = ExistentialDeposit;
     type ExistentialDeposit = ExistentialDeposit;
     type AccountStore = System;
     type AccountStore = System;
+    type WeightInfo = ();
+    type MaxLocks = ();
 }
 }
 
 
 impl Trait for Test {
 impl Trait for Test {
@@ -74,14 +77,14 @@ impl Trait for Test {
 }
 }
 
 
 pub fn build_test_externalities() -> sp_io::TestExternalities {
 pub fn build_test_externalities() -> sp_io::TestExternalities {
-    let t = system::GenesisConfig::default()
+    let t = frame_system::GenesisConfig::default()
         .build_storage::<Test>()
         .build_storage::<Test>()
         .unwrap();
         .unwrap();
 
 
     t.into()
     t.into()
 }
 }
 
 
-pub type System = system::Module<Test>;
+pub type System = frame_system::Module<Test>;
 pub type Balances = balances::Module<Test>;
 pub type Balances = balances::Module<Test>;
 pub type StakePool = Module<Test>;
 pub type StakePool = Module<Test>;
 
 
@@ -90,6 +93,6 @@ pub mod fixtures {
     use super::*;
     use super::*;
     pub type OngoingSlashes = BTreeMap<
     pub type OngoingSlashes = BTreeMap<
         <Test as Trait>::SlashId,
         <Test as Trait>::SlashId,
-        Slash<<Test as system::Trait>::BlockNumber, BalanceOf<Test>>,
+        Slash<<Test as frame_system::Trait>::BlockNumber, BalanceOf<Test>>,
     >;
     >;
 }
 }

+ 12 - 12
runtime-modules/storage/Cargo.toml

@@ -1,26 +1,26 @@
 [package]
 [package]
 name = 'pallet-storage'
 name = 'pallet-storage'
-version = '3.0.0'
+version = '3.1.0'
 authors = ['Joystream contributors']
 authors = ['Joystream contributors']
 edition = '2018'
 edition = '2018'
 
 
 [dependencies]
 [dependencies]
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
-codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] }
-sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+codec = { package = 'parity-scale-codec', version = '1.3.4', default-features = false, features = ['derive'] }
+sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 membership = { package = 'pallet-membership', default-features = false, path = '../membership'}
 membership = { package = 'pallet-membership', default-features = false, path = '../membership'}
-pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 working-group = { package = 'pallet-working-group', default-features = false, path = '../working-group'}
 working-group = { package = 'pallet-working-group', default-features = false, path = '../working-group'}
 common = { package = 'pallet-common', default-features = false, path = '../common'}
 common = { package = 'pallet-common', default-features = false, path = '../common'}
 
 
 [dev-dependencies]
 [dev-dependencies]
-sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 stake = { package = 'pallet-stake', default-features = false, path = '../stake'}
 stake = { package = 'pallet-stake', default-features = false, path = '../stake'}
 hiring = { package = 'pallet-hiring', default-features = false, path = '../hiring'}
 hiring = { package = 'pallet-hiring', default-features = false, path = '../hiring'}
 minting = { package = 'pallet-token-mint', default-features = false, path = '../token-minting'}
 minting = { package = 'pallet-token-mint', default-features = false, path = '../token-minting'}
@@ -33,7 +33,7 @@ std = [
 	'codec/std',
 	'codec/std',
 	'sp-std/std',
 	'sp-std/std',
 	'frame-support/std',
 	'frame-support/std',
-	'system/std',
+	'frame-system/std',
 	'sp-arithmetic/std',
 	'sp-arithmetic/std',
 	'sp-runtime/std',
 	'sp-runtime/std',
 	'membership/std',
 	'membership/std',

+ 8 - 8
runtime-modules/storage/src/data_directory.rs

@@ -1,6 +1,6 @@
 //! # Data directory module
 //! # Data directory module
 //! Data directory module for the Joystream platform manages IPFS content id, storage providers,
 //! Data directory module for the Joystream platform manages IPFS content id, storage providers,
-//! owners of the content. It allows to add and accept or reject the content in the system.
+//! owners of the content. It allows to add and accept or reject the content in the frame_system.
 //!
 //!
 //! ## Comments
 //! ## Comments
 //!
 //!
@@ -9,7 +9,7 @@
 //! ## Supported extrinsics
 //! ## Supported extrinsics
 //!
 //!
 //! ### Public extrinsic
 //! ### Public extrinsic
-//! - [add_content](./struct.Module.html#method.add_content) - Adds the content to the system.
+//! - [add_content](./struct.Module.html#method.add_content) - Adds the content to the frame_system.
 //!
 //!
 //! ### Private extrinsics
 //! ### Private extrinsics
 //! - accept_content - Storage provider accepts a content.
 //! - accept_content - Storage provider accepts a content.
@@ -25,10 +25,10 @@ use codec::{Decode, Encode};
 use frame_support::dispatch::DispatchResult;
 use frame_support::dispatch::DispatchResult;
 use frame_support::traits::Get;
 use frame_support::traits::Get;
 use frame_support::{decl_error, decl_event, decl_module, decl_storage, ensure, Parameter};
 use frame_support::{decl_error, decl_event, decl_module, decl_storage, ensure, Parameter};
+use frame_system::ensure_root;
 use sp_runtime::traits::{MaybeSerialize, Member};
 use sp_runtime::traits::{MaybeSerialize, Member};
 use sp_std::collections::btree_map::BTreeMap;
 use sp_std::collections::btree_map::BTreeMap;
 use sp_std::vec::Vec;
 use sp_std::vec::Vec;
-use system::ensure_root;
 
 
 #[cfg(feature = "std")]
 #[cfg(feature = "std")]
 use serde::{Deserialize, Serialize};
 use serde::{Deserialize, Serialize};
@@ -43,13 +43,13 @@ use crate::{MemberId, StorageProviderId, StorageWorkingGroup, StorageWorkingGrou
 /// The _Data directory_ main _Trait_.
 /// The _Data directory_ main _Trait_.
 pub trait Trait:
 pub trait Trait:
     pallet_timestamp::Trait
     pallet_timestamp::Trait
-    + system::Trait
+    + frame_system::Trait
     + data_object_type_registry::Trait
     + data_object_type_registry::Trait
     + membership::Trait
     + membership::Trait
     + working_group::Trait<StorageWorkingGroupInstance>
     + working_group::Trait<StorageWorkingGroupInstance>
 {
 {
     /// _Data directory_ event type.
     /// _Data directory_ event type.
-    type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;
+    type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>;
 
 
     /// Content id.
     /// Content id.
     type ContentId: Parameter + Member + MaybeSerialize + Copy + Ord + Default;
     type ContentId: Parameter + Member + MaybeSerialize + Copy + Ord + Default;
@@ -112,7 +112,7 @@ impl Default for LiaisonJudgement {
 /// Alias for DataObjectInternal
 /// Alias for DataObjectInternal
 pub type DataObject<T> = DataObjectInternal<
 pub type DataObject<T> = DataObjectInternal<
     MemberId<T>,
     MemberId<T>,
-    <T as system::Trait>::BlockNumber,
+    <T as frame_system::Trait>::BlockNumber,
     <T as pallet_timestamp::Trait>::Moment,
     <T as pallet_timestamp::Trait>::Moment,
     <T as data_object_type_registry::Trait>::DataObjectTypeId,
     <T as data_object_type_registry::Trait>::DataObjectTypeId,
     StorageProviderId<T>,
     StorageProviderId<T>,
@@ -149,7 +149,7 @@ pub type DataObjectsMap<T> = BTreeMap<<T as Trait>::ContentId, DataObject<T>>;
 
 
 decl_storage! {
 decl_storage! {
     trait Store for Module<T: Trait> as DataDirectory {
     trait Store for Module<T: Trait> as DataDirectory {
-        /// List of ids known to the system.
+        /// List of ids known to the frame_system.
         pub KnownContentIds get(fn known_content_ids) config(): Vec<T::ContentId> = Vec::new();
         pub KnownContentIds get(fn known_content_ids) config(): Vec<T::ContentId> = Vec::new();
 
 
         /// Maps data objects by their content id.
         /// Maps data objects by their content id.
@@ -197,7 +197,7 @@ decl_module! {
         /// Maximum objects allowed per inject_data_objects() transaction
         /// Maximum objects allowed per inject_data_objects() transaction
         const MaxObjectsPerInjection: u32 = T::MaxObjectsPerInjection::get();
         const MaxObjectsPerInjection: u32 = T::MaxObjectsPerInjection::get();
 
 
-        /// Adds the content to the system. Member id should match its origin. The created DataObject
+        /// Adds the content to the frame_system. Member id should match its origin. The created DataObject
         /// awaits liaison to accept or reject it.
         /// awaits liaison to accept or reject it.
         #[weight = 10_000_000] // TODO: adjust weight
         #[weight = 10_000_000] // TODO: adjust weight
         pub fn add_content(
         pub fn add_content(

+ 2 - 2
runtime-modules/storage/src/data_object_storage_registry.rs

@@ -37,12 +37,12 @@ const DEFAULT_FIRST_RELATIONSHIP_ID: u8 = 1;
 /// The _Data object storage registry_ main _Trait_.
 /// The _Data object storage registry_ main _Trait_.
 pub trait Trait:
 pub trait Trait:
     pallet_timestamp::Trait
     pallet_timestamp::Trait
-    + system::Trait
+    + frame_system::Trait
     + data_directory::Trait
     + data_directory::Trait
     + working_group::Trait<StorageWorkingGroupInstance>
     + working_group::Trait<StorageWorkingGroupInstance>
 {
 {
     /// _Data object storage registry_ event type.
     /// _Data object storage registry_ event type.
-    type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;
+    type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>;
 
 
     /// Type for data object storage relationship id
     /// Type for data object storage relationship id
     type DataObjectStorageRelationshipId: Parameter
     type DataObjectStorageRelationshipId: Parameter

+ 2 - 2
runtime-modules/storage/src/data_object_type_registry.rs

@@ -36,9 +36,9 @@ const DEFAULT_TYPE_DESCRIPTION: &str = "Default data object type for audio and v
 const DEFAULT_FIRST_DATA_OBJECT_TYPE_ID: u8 = 1;
 const DEFAULT_FIRST_DATA_OBJECT_TYPE_ID: u8 = 1;
 
 
 /// The _Data object type registry_ main _Trait_.
 /// The _Data object type registry_ main _Trait_.
-pub trait Trait: system::Trait + working_group::Trait<StorageWorkingGroupInstance> {
+pub trait Trait: frame_system::Trait + working_group::Trait<StorageWorkingGroupInstance> {
     /// _Data object type registry_ event type.
     /// _Data object type registry_ event type.
-    type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;
+    type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>;
 
 
     /// _Data object type id_ type
     /// _Data object type id_ type
     type DataObjectTypeId: Parameter
     type DataObjectTypeId: Parameter

+ 5 - 2
runtime-modules/storage/src/tests/data_directory.rs

@@ -1,8 +1,8 @@
 #![cfg(test)]
 #![cfg(test)]
 
 
 use frame_support::dispatch::DispatchError;
 use frame_support::dispatch::DispatchError;
+use frame_system::RawOrigin;
 use sp_std::collections::btree_map::BTreeMap;
 use sp_std::collections::btree_map::BTreeMap;
-use system::RawOrigin;
 
 
 use super::mock::*;
 use super::mock::*;
 
 
@@ -197,7 +197,10 @@ fn reject_content_as_liaison() {
 fn data_object_injection_works() {
 fn data_object_injection_works() {
     with_default_mock_builder(|| {
     with_default_mock_builder(|| {
         // No objects in directory before injection
         // No objects in directory before injection
-        assert_eq!(TestDataDirectory::known_content_ids(), vec![]);
+        assert_eq!(
+            TestDataDirectory::known_content_ids(),
+            Vec::<<Test as data_directory::Trait>::ContentId>::new()
+        );
 
 
         // new objects to inject into the directory
         // new objects to inject into the directory
         let mut objects = BTreeMap::new();
         let mut objects = BTreeMap::new();

+ 1 - 1
runtime-modules/storage/src/tests/data_object_type_registry.rs

@@ -1,7 +1,7 @@
 #![cfg(test)]
 #![cfg(test)]
 
 
 use frame_support::{StorageMap, StorageValue};
 use frame_support::{StorageMap, StorageValue};
-use system::{EventRecord, Phase, RawOrigin};
+use frame_system::{EventRecord, Phase, RawOrigin};
 
 
 use super::mock::*;
 use super::mock::*;
 
 

+ 10 - 6
runtime-modules/storage/src/tests/mock.rs

@@ -38,7 +38,7 @@ impl_outer_event! {
         balances<T>,
         balances<T>,
         members<T>,
         members<T>,
         working_group_mod StorageWorkingGroupInstance <T>,
         working_group_mod StorageWorkingGroupInstance <T>,
-        system<T>,
+        frame_system<T>,
     }
     }
 }
 }
 
 
@@ -96,7 +96,7 @@ parameter_types! {
     pub const MaxObjectsPerInjection: u32 = 5;
     pub const MaxObjectsPerInjection: u32 = 5;
 }
 }
 
 
-impl system::Trait for Test {
+impl frame_system::Trait for Test {
     type BaseCallFilter = ();
     type BaseCallFilter = ();
     type Origin = Origin;
     type Origin = Origin;
     type Call = ();
     type Call = ();
@@ -117,16 +117,18 @@ impl system::Trait for Test {
     type MaximumBlockLength = MaximumBlockLength;
     type MaximumBlockLength = MaximumBlockLength;
     type AvailableBlockRatio = AvailableBlockRatio;
     type AvailableBlockRatio = AvailableBlockRatio;
     type Version = ();
     type Version = ();
-    type ModuleToIndex = ();
     type AccountData = balances::AccountData<u64>;
     type AccountData = balances::AccountData<u64>;
     type OnNewAccount = ();
     type OnNewAccount = ();
     type OnKilledAccount = ();
     type OnKilledAccount = ();
+    type SystemWeightInfo = ();
+    type PalletInfo = ();
 }
 }
 
 
 impl pallet_timestamp::Trait for Test {
 impl pallet_timestamp::Trait for Test {
     type Moment = u64;
     type Moment = u64;
     type OnTimestampSet = ();
     type OnTimestampSet = ();
     type MinimumPeriod = MinimumPeriod;
     type MinimumPeriod = MinimumPeriod;
+    type WeightInfo = ();
 }
 }
 
 
 parameter_types! {
 parameter_types! {
@@ -140,6 +142,8 @@ impl balances::Trait for Test {
     type Event = MetaEvent;
     type Event = MetaEvent;
     type ExistentialDeposit = ExistentialDeposit;
     type ExistentialDeposit = ExistentialDeposit;
     type AccountStore = System;
     type AccountStore = System;
+    type WeightInfo = ();
+    type MaxLocks = ();
 }
 }
 
 
 impl GovernanceCurrency for Test {
 impl GovernanceCurrency for Test {
@@ -177,7 +181,7 @@ impl crate::data_directory::StorageProviderHelper<Test> for () {
 
 
 impl common::origin::ActorOriginValidator<Origin, u64, u64> for () {
 impl common::origin::ActorOriginValidator<Origin, u64, u64> for () {
     fn ensure_actor_origin(origin: Origin, _account_id: u64) -> Result<u64, &'static str> {
     fn ensure_actor_origin(origin: Origin, _account_id: u64) -> Result<u64, &'static str> {
-        let signed_account_id = system::ensure_signed(origin)?;
+        let signed_account_id = frame_system::ensure_signed(origin)?;
 
 
         Ok(signed_account_id)
         Ok(signed_account_id)
     }
     }
@@ -259,7 +263,7 @@ impl ExtBuilder {
         self
         self
     }
     }
     pub fn build(self) -> sp_io::TestExternalities {
     pub fn build(self) -> sp_io::TestExternalities {
-        let mut t = system::GenesisConfig::default()
+        let mut t = frame_system::GenesisConfig::default()
             .build_storage::<Test>()
             .build_storage::<Test>()
             .unwrap();
             .unwrap();
 
 
@@ -297,7 +301,7 @@ impl ExtBuilder {
 pub type TestDataObjectType = data_object_type_registry::DataObjectType;
 pub type TestDataObjectType = data_object_type_registry::DataObjectType;
 
 
 pub type Balances = balances::Module<Test>;
 pub type Balances = balances::Module<Test>;
-pub type System = system::Module<Test>;
+pub type System = frame_system::Module<Test>;
 pub type TestDataObjectTypeRegistry = data_object_type_registry::Module<Test>;
 pub type TestDataObjectTypeRegistry = data_object_type_registry::Module<Test>;
 pub type TestDataDirectory = data_directory::Module<Test>;
 pub type TestDataDirectory = data_directory::Module<Test>;
 pub type TestDataObjectStorageRegistry = data_object_storage_registry::Module<Test>;
 pub type TestDataObjectStorageRegistry = data_object_storage_registry::Module<Test>;

+ 10 - 10
runtime-modules/token-minting/Cargo.toml

@@ -1,20 +1,20 @@
 [package]
 [package]
 name = 'pallet-token-mint'
 name = 'pallet-token-mint'
-version = '3.0.0'
+version = '3.1.0'
 authors = ['Joystream contributors']
 authors = ['Joystream contributors']
 edition = '2018'
 edition = '2018'
 
 
 [dependencies]
 [dependencies]
-codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] }
-sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+codec = { package = 'parity-scale-codec', version = '1.3.4', default-features = false, features = ['derive'] }
+sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 
 
 [dev-dependencies]
 [dev-dependencies]
-sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 
 
 [features]
 [features]
 default = ['std']
 default = ['std']
@@ -23,5 +23,5 @@ std = [
 	'sp-arithmetic/std',
 	'sp-arithmetic/std',
 	'sp-runtime/std',
 	'sp-runtime/std',
 	'frame-support/std',
 	'frame-support/std',
-	'system/std',
+	'frame-system/std',
 ]
 ]

+ 3 - 3
runtime-modules/token-minting/src/lib.rs

@@ -19,7 +19,7 @@ mod tests;
 
 
 pub use mint::*;
 pub use mint::*;
 
 
-pub trait Trait: system::Trait {
+pub trait Trait: frame_system::Trait {
     /// The currency to mint.
     /// The currency to mint.
     type Currency: Currency<Self::AccountId>;
     type Currency: Currency<Self::AccountId>;
 
 
@@ -35,7 +35,7 @@ pub trait Trait: system::Trait {
 }
 }
 
 
 pub type BalanceOf<T> =
 pub type BalanceOf<T> =
-    <<T as Trait>::Currency as Currency<<T as system::Trait>::AccountId>>::Balance;
+    <<T as Trait>::Currency as Currency<<T as frame_system::Trait>::AccountId>>::Balance;
 
 
 #[derive(PartialEq, Eq, Debug)]
 #[derive(PartialEq, Eq, Debug)]
 pub enum GeneralError {
 pub enum GeneralError {
@@ -136,7 +136,7 @@ impl<T: Trait> Module<T> {
         initial_capacity: BalanceOf<T>,
         initial_capacity: BalanceOf<T>,
         adjustment: Option<Adjustment<BalanceOf<T>, T::BlockNumber>>,
         adjustment: Option<Adjustment<BalanceOf<T>, T::BlockNumber>>,
     ) -> Result<T::MintId, GeneralError> {
     ) -> Result<T::MintId, GeneralError> {
-        let now = <system::Module<T>>::block_number();
+        let now = <frame_system::Module<T>>::block_number();
 
 
         // Ensure the next adjustment if set, is in the future
         // Ensure the next adjustment if set, is in the future
         if let Some(adjustment) = adjustment {
         if let Some(adjustment) = adjustment {

+ 7 - 4
runtime-modules/token-minting/src/mock.rs

@@ -24,7 +24,7 @@ parameter_types! {
     pub const AvailableBlockRatio: Perbill = Perbill::one();
     pub const AvailableBlockRatio: Perbill = Perbill::one();
 }
 }
 
 
-impl system::Trait for Test {
+impl frame_system::Trait for Test {
     type BaseCallFilter = ();
     type BaseCallFilter = ();
     type Origin = Origin;
     type Origin = Origin;
     type Call = ();
     type Call = ();
@@ -45,10 +45,11 @@ impl system::Trait for Test {
     type MaximumBlockLength = MaximumBlockLength;
     type MaximumBlockLength = MaximumBlockLength;
     type AvailableBlockRatio = AvailableBlockRatio;
     type AvailableBlockRatio = AvailableBlockRatio;
     type Version = ();
     type Version = ();
-    type ModuleToIndex = ();
     type AccountData = balances::AccountData<u64>;
     type AccountData = balances::AccountData<u64>;
     type OnNewAccount = ();
     type OnNewAccount = ();
     type OnKilledAccount = ();
     type OnKilledAccount = ();
+    type SystemWeightInfo = ();
+    type PalletInfo = ();
 }
 }
 
 
 parameter_types! {
 parameter_types! {
@@ -65,6 +66,8 @@ impl balances::Trait for Test {
     type Event = ();
     type Event = ();
     type ExistentialDeposit = ExistentialDeposit;
     type ExistentialDeposit = ExistentialDeposit;
     type AccountStore = System;
     type AccountStore = System;
+    type WeightInfo = ();
+    type MaxLocks = ();
 }
 }
 
 
 impl Trait for Test {
 impl Trait for Test {
@@ -73,13 +76,13 @@ impl Trait for Test {
 }
 }
 
 
 pub fn build_test_externalities() -> sp_io::TestExternalities {
 pub fn build_test_externalities() -> sp_io::TestExternalities {
-    let t = system::GenesisConfig::default()
+    let t = frame_system::GenesisConfig::default()
         .build_storage::<Test>()
         .build_storage::<Test>()
         .unwrap();
         .unwrap();
 
 
     t.into()
     t.into()
 }
 }
 
 
-pub type System = system::Module<Test>;
+pub type System = frame_system::Module<Test>;
 pub type Balances = balances::Module<Test>;
 pub type Balances = balances::Module<Test>;
 pub type Minting = Module<Test>;
 pub type Minting = Module<Test>;

+ 12 - 12
runtime-modules/versioned-store-permissions/Cargo.toml

@@ -1,23 +1,23 @@
 [package]
 [package]
 name = 'pallet-versioned-store-permissions'
 name = 'pallet-versioned-store-permissions'
-version = '3.0.0'
+version = '3.1.0'
 authors = ['Joystream contributors']
 authors = ['Joystream contributors']
 edition = '2018'
 edition = '2018'
 
 
 [dependencies]
 [dependencies]
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
-codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] }
-sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+codec = { package = 'parity-scale-codec', version = '1.3.4', default-features = false, features = ['derive'] }
+sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 versioned-store = { package = 'pallet-versioned-store', default-features = false, path = '../versioned-store'}
 versioned-store = { package = 'pallet-versioned-store', default-features = false, path = '../versioned-store'}
 
 
 [dev-dependencies]
 [dev-dependencies]
-sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 common = { package = 'pallet-common', default-features = false, path = '../common'}
 common = { package = 'pallet-common', default-features = false, path = '../common'}
 
 
 [features]
 [features]
@@ -27,8 +27,8 @@ std = [
 	'codec/std',
 	'codec/std',
 	'sp-std/std',
 	'sp-std/std',
 	'frame-support/std',
 	'frame-support/std',
-	'system/std',
+	'frame-system/std',
 	'sp-arithmetic/std',
 	'sp-arithmetic/std',
 	'sp-runtime/std',
 	'sp-runtime/std',
     'versioned-store/std',
     'versioned-store/std',
-]
+]

+ 28 - 22
runtime-modules/versioned-store-permissions/src/lib.rs

@@ -33,7 +33,7 @@ pub trait CredentialChecker<T: Trait> {
 }
 }
 
 
 /// An implementation where no account has any credential. Effectively
 /// An implementation where no account has any credential. Effectively
-/// only the system will be able to perform any action on the versioned store.
+/// only the frame_system will be able to perform any action on the versioned store.
 impl<T: Trait> CredentialChecker<T> for () {
 impl<T: Trait> CredentialChecker<T> for () {
     fn account_has_credential(_account: &T::AccountId, _credential: T::Credential) -> bool {
     fn account_has_credential(_account: &T::AccountId, _credential: T::Credential) -> bool {
         false
         false
@@ -54,18 +54,22 @@ pub trait CreateClassPermissionsChecker<T: Trait> {
 }
 }
 
 
 /// An implementation that does not permit any account to create classes. Effectively
 /// An implementation that does not permit any account to create classes. Effectively
-/// only the system can create classes.
+/// only the frame_system can create classes.
 impl<T: Trait> CreateClassPermissionsChecker<T> for () {
 impl<T: Trait> CreateClassPermissionsChecker<T> for () {
     fn account_can_create_class_permissions(_account: &T::AccountId) -> bool {
     fn account_can_create_class_permissions(_account: &T::AccountId) -> bool {
         false
         false
     }
     }
 }
 }
 
 
-pub type ClassPermissionsType<T> =
-    ClassPermissions<ClassId, <T as Trait>::Credential, u16, <T as system::Trait>::BlockNumber>;
+pub type ClassPermissionsType<T> = ClassPermissions<
+    ClassId,
+    <T as Trait>::Credential,
+    u16,
+    <T as frame_system::Trait>::BlockNumber,
+>;
 
 
-pub trait Trait: system::Trait + versioned_store::Trait {
-    /// Type that represents an actor or group of actors in the system.
+pub trait Trait: frame_system::Trait + versioned_store::Trait {
+    /// Type that represents an actor or group of actors in the frame_system.
     type Credential: Parameter
     type Credential: Parameter
         + Member
         + Member
         + BaseArithmetic
         + BaseArithmetic
@@ -91,7 +95,7 @@ decl_storage! {
       pub ClassPermissionsByClassId get(fn class_permissions_by_class_id) config(): map hasher(blake2_128_concat)
       pub ClassPermissionsByClassId get(fn class_permissions_by_class_id) config(): map hasher(blake2_128_concat)
         ClassId => ClassPermissionsType<T>;
         ClassId => ClassPermissionsType<T>;
 
 
-      /// Owner of an entity in the versioned store. If it is None then it is owned by the system.
+      /// Owner of an entity in the versioned store. If it is None then it is owned by the frame_system.
       pub EntityMaintainerByEntityId get(fn entity_maintainer_by_entity_id) config(): map hasher(blake2_128_concat)
       pub EntityMaintainerByEntityId get(fn entity_maintainer_by_entity_id) config(): map hasher(blake2_128_concat)
         EntityId => Option<T::Credential>;
         EntityId => Option<T::Credential>;
     }
     }
@@ -257,8 +261,8 @@ decl_module! {
             let raw_origin = Self::ensure_root_or_signed(origin)?;
             let raw_origin = Self::ensure_root_or_signed(origin)?;
 
 
             let can_create_class = match raw_origin {
             let can_create_class = match raw_origin {
-                system::RawOrigin::Root => true,
-                system::RawOrigin::Signed(sender) => {
+                frame_system::RawOrigin::Root => true,
+                frame_system::RawOrigin::Signed(sender) => {
                     T::CreateClassPermissionsChecker::account_can_create_class_permissions(&sender)
                     T::CreateClassPermissionsChecker::account_can_create_class_permissions(&sender)
                 },
                 },
                 _ => false
                 _ => false
@@ -387,16 +391,18 @@ decl_module! {
 impl<T: Trait> Module<T> {
 impl<T: Trait> Module<T> {
     fn ensure_root_or_signed(
     fn ensure_root_or_signed(
         origin: T::Origin,
         origin: T::Origin,
-    ) -> Result<system::RawOrigin<T::AccountId>, &'static str> {
+    ) -> Result<frame_system::RawOrigin<T::AccountId>, &'static str> {
         match origin.into() {
         match origin.into() {
-            Ok(system::RawOrigin::Root) => Ok(system::RawOrigin::Root),
-            Ok(system::RawOrigin::Signed(account_id)) => Ok(system::RawOrigin::Signed(account_id)),
+            Ok(frame_system::RawOrigin::Root) => Ok(frame_system::RawOrigin::Root),
+            Ok(frame_system::RawOrigin::Signed(account_id)) => {
+                Ok(frame_system::RawOrigin::Signed(account_id))
+            }
             _ => Err("BadOrigin:ExpectedRootOrSigned"),
             _ => Err("BadOrigin:ExpectedRootOrSigned"),
         }
         }
     }
     }
 
 
     fn do_create_entity(
     fn do_create_entity(
-        raw_origin: &system::RawOrigin<T::AccountId>,
+        raw_origin: &frame_system::RawOrigin<T::AccountId>,
         with_credential: Option<T::Credential>,
         with_credential: Option<T::Credential>,
         class_id: ClassId,
         class_id: ClassId,
     ) -> Result<EntityId, &'static str> {
     ) -> Result<EntityId, &'static str> {
@@ -425,7 +431,7 @@ impl<T: Trait> Module<T> {
     }
     }
 
 
     fn do_update_entity_property_values(
     fn do_update_entity_property_values(
-        raw_origin: &system::RawOrigin<T::AccountId>,
+        raw_origin: &frame_system::RawOrigin<T::AccountId>,
         with_credential: Option<T::Credential>,
         with_credential: Option<T::Credential>,
         as_entity_maintainer: bool,
         as_entity_maintainer: bool,
         entity_id: EntityId,
         entity_id: EntityId,
@@ -457,7 +463,7 @@ impl<T: Trait> Module<T> {
     }
     }
 
 
     fn do_add_schema_support_to_entity(
     fn do_add_schema_support_to_entity(
-        raw_origin: &system::RawOrigin<T::AccountId>,
+        raw_origin: &frame_system::RawOrigin<T::AccountId>,
         with_credential: Option<T::Credential>,
         with_credential: Option<T::Credential>,
         as_entity_maintainer: bool,
         as_entity_maintainer: bool,
         entity_id: EntityId,
         entity_id: EntityId,
@@ -494,17 +500,17 @@ impl<T: Trait> Module<T> {
     /// Derives the AccessLevel the caller is attempting to act with.
     /// Derives the AccessLevel the caller is attempting to act with.
     /// It expects only signed or root origin.
     /// It expects only signed or root origin.
     fn derive_access_level(
     fn derive_access_level(
-        raw_origin: &system::RawOrigin<T::AccountId>,
+        raw_origin: &frame_system::RawOrigin<T::AccountId>,
         with_credential: Option<T::Credential>,
         with_credential: Option<T::Credential>,
         as_entity_maintainer: Option<EntityId>,
         as_entity_maintainer: Option<EntityId>,
     ) -> Result<AccessLevel<T::Credential>, &'static str> {
     ) -> Result<AccessLevel<T::Credential>, &'static str> {
         match raw_origin {
         match raw_origin {
-            system::RawOrigin::Root => Ok(AccessLevel::System),
-            system::RawOrigin::Signed(account_id) => {
+            frame_system::RawOrigin::Root => Ok(AccessLevel::System),
+            frame_system::RawOrigin::Signed(account_id) => {
                 if let Some(credential) = with_credential {
                 if let Some(credential) = with_credential {
                     if T::CredentialChecker::account_has_credential(&account_id, credential) {
                     if T::CredentialChecker::account_has_credential(&account_id, credential) {
                         if let Some(entity_id) = as_entity_maintainer {
                         if let Some(entity_id) = as_entity_maintainer {
-                            // is entity maintained by system
+                            // is entity maintained by frame_system
                             ensure!(
                             ensure!(
                                 <EntityMaintainerByEntityId<T>>::contains_key(entity_id),
                                 <EntityMaintainerByEntityId<T>>::contains_key(entity_id),
                                 "NotEnityMaintainer"
                                 "NotEnityMaintainer"
@@ -546,7 +552,7 @@ impl<T: Trait> Module<T> {
     /// Derives the access level of the caller.
     /// Derives the access level of the caller.
     /// If the predicate passes, the mutate method is invoked.
     /// If the predicate passes, the mutate method is invoked.
     fn mutate_class_permissions<Predicate, Mutate>(
     fn mutate_class_permissions<Predicate, Mutate>(
-        raw_origin: &system::RawOrigin<T::AccountId>,
+        raw_origin: &frame_system::RawOrigin<T::AccountId>,
         with_credential: Option<T::Credential>,
         with_credential: Option<T::Credential>,
         // predicate to test
         // predicate to test
         predicate: Predicate,
         predicate: Predicate,
@@ -564,7 +570,7 @@ impl<T: Trait> Module<T> {
 
 
         predicate(&class_permissions, &access_level)?;
         predicate(&class_permissions, &access_level)?;
         mutate(&mut class_permissions)?;
         mutate(&mut class_permissions)?;
-        class_permissions.last_permissions_update = <system::Module<T>>::block_number();
+        class_permissions.last_permissions_update = <frame_system::Module<T>>::block_number();
         <ClassPermissionsByClassId<T>>::insert(class_id, class_permissions);
         <ClassPermissionsByClassId<T>>::insert(class_id, class_permissions);
         Ok(())
         Ok(())
     }
     }
@@ -584,7 +590,7 @@ impl<T: Trait> Module<T> {
     /// If the peridcate passes the callback is invoked. Returns result of the callback
     /// If the peridcate passes the callback is invoked. Returns result of the callback
     /// or error from failed predicate.
     /// or error from failed predicate.
     fn if_class_permissions_satisfied<Predicate, Callback, R>(
     fn if_class_permissions_satisfied<Predicate, Callback, R>(
-        raw_origin: &system::RawOrigin<T::AccountId>,
+        raw_origin: &frame_system::RawOrigin<T::AccountId>,
         with_credential: Option<T::Credential>,
         with_credential: Option<T::Credential>,
         as_entity_maintainer: Option<EntityId>,
         as_entity_maintainer: Option<EntityId>,
         // predicate to test
         // predicate to test

+ 8 - 6
runtime-modules/versioned-store-permissions/src/mock.rs

@@ -27,7 +27,7 @@ parameter_types! {
     pub const MinimumPeriod: u64 = 5;
     pub const MinimumPeriod: u64 = 5;
 }
 }
 
 
-impl system::Trait for Runtime {
+impl frame_system::Trait for Runtime {
     type BaseCallFilter = ();
     type BaseCallFilter = ();
     type Origin = Origin;
     type Origin = Origin;
     type Call = ();
     type Call = ();
@@ -48,16 +48,18 @@ impl system::Trait for Runtime {
     type MaximumBlockLength = MaximumBlockLength;
     type MaximumBlockLength = MaximumBlockLength;
     type AvailableBlockRatio = AvailableBlockRatio;
     type AvailableBlockRatio = AvailableBlockRatio;
     type Version = ();
     type Version = ();
-    type ModuleToIndex = ();
     type AccountData = ();
     type AccountData = ();
     type OnNewAccount = ();
     type OnNewAccount = ();
     type OnKilledAccount = ();
     type OnKilledAccount = ();
+    type SystemWeightInfo = ();
+    type PalletInfo = ();
 }
 }
 
 
 impl pallet_timestamp::Trait for Runtime {
 impl pallet_timestamp::Trait for Runtime {
     type Moment = u64;
     type Moment = u64;
     type OnTimestampSet = ();
     type OnTimestampSet = ();
     type MinimumPeriod = MinimumPeriod;
     type MinimumPeriod = MinimumPeriod;
+    type WeightInfo = ();
 }
 }
 
 
 impl versioned_store::Trait for Runtime {
 impl versioned_store::Trait for Runtime {
@@ -90,7 +92,7 @@ pub struct MockCredentialChecker {}
 
 
 impl CredentialChecker<Runtime> for MockCredentialChecker {
 impl CredentialChecker<Runtime> for MockCredentialChecker {
     fn account_has_credential(
     fn account_has_credential(
-        account_id: &<Runtime as system::Trait>::AccountId,
+        account_id: &<Runtime as frame_system::Trait>::AccountId,
         credential_id: <Runtime as Trait>::Credential,
         credential_id: <Runtime as Trait>::Credential,
     ) -> bool {
     ) -> bool {
         if (credential_id as usize) < PRINCIPAL_GROUP_MEMBERS.len() {
         if (credential_id as usize) < PRINCIPAL_GROUP_MEMBERS.len() {
@@ -114,7 +116,7 @@ pub struct MockCreateClassPermissionsChecker {}
 
 
 impl CreateClassPermissionsChecker<Runtime> for MockCreateClassPermissionsChecker {
 impl CreateClassPermissionsChecker<Runtime> for MockCreateClassPermissionsChecker {
     fn account_can_create_class_permissions(
     fn account_can_create_class_permissions(
-        account_id: &<Runtime as system::Trait>::AccountId,
+        account_id: &<Runtime as frame_system::Trait>::AccountId,
     ) -> bool {
     ) -> bool {
         CLASS_PERMISSIONS_CREATORS
         CLASS_PERMISSIONS_CREATORS
             .iter()
             .iter()
@@ -151,7 +153,7 @@ fn default_versioned_store_genesis_config() -> versioned_store::GenesisConfig {
 }
 }
 
 
 fn build_test_externalities(config: versioned_store::GenesisConfig) -> sp_io::TestExternalities {
 fn build_test_externalities(config: versioned_store::GenesisConfig) -> sp_io::TestExternalities {
-    let mut t = system::GenesisConfig::default()
+    let mut t = frame_system::GenesisConfig::default()
         .build_storage::<Runtime>()
         .build_storage::<Runtime>()
         .unwrap();
         .unwrap();
 
 
@@ -165,7 +167,7 @@ pub fn with_test_externalities<R, F: FnOnce() -> R>(f: F) -> R {
     build_test_externalities(versioned_store_config).execute_with(f)
     build_test_externalities(versioned_store_config).execute_with(f)
 }
 }
 
 
-// pub type System = system::Module;
+// pub type System = frame_system::Module;
 
 
 /// Export module on a test runtime
 /// Export module on a test runtime
 pub type Permissions = Module<Runtime>;
 pub type Permissions = Module<Runtime>;

+ 14 - 14
runtime-modules/versioned-store-permissions/src/tests.rs

@@ -94,7 +94,7 @@ fn create_class_then_entity_with_default_class_permissions() {
         // give members of GROUP_ZERO permission to add schemas
         // give members of GROUP_ZERO permission to add schemas
         let add_schema_set = CredentialSet::from(vec![0]);
         let add_schema_set = CredentialSet::from(vec![0]);
         assert_ok!(Permissions::set_class_add_schemas_set(
         assert_ok!(Permissions::set_class_add_schemas_set(
-            system::RawOrigin::Root.into(),
+            frame_system::RawOrigin::Root.into(),
             None,
             None,
             class_id,
             class_id,
             add_schema_set
             add_schema_set
@@ -112,11 +112,11 @@ fn create_class_then_entity_with_default_class_permissions() {
         // System can always create entities (provided class exists) bypassing any permissions
         // System can always create entities (provided class exists) bypassing any permissions
         let entity_id_1 = next_entity_id();
         let entity_id_1 = next_entity_id();
         assert_ok!(Permissions::create_entity(
         assert_ok!(Permissions::create_entity(
-            system::RawOrigin::Root.into(),
+            frame_system::RawOrigin::Root.into(),
             None,
             None,
             class_id,
             class_id,
         ));
         ));
-        // entities created by system are "un-owned"
+        // entities created by frame_system are "un-owned"
         assert!(!<EntityMaintainerByEntityId<Runtime>>::contains_key(
         assert!(!<EntityMaintainerByEntityId<Runtime>>::contains_key(
             entity_id_1
             entity_id_1
         ));
         ));
@@ -136,7 +136,7 @@ fn create_class_then_entity_with_default_class_permissions() {
         );
         );
 
 
         assert_ok!(Permissions::set_class_entities_can_be_created(
         assert_ok!(Permissions::set_class_entities_can_be_created(
-            system::RawOrigin::Root.into(),
+            frame_system::RawOrigin::Root.into(),
             None,
             None,
             class_id,
             class_id,
             true
             true
@@ -154,7 +154,7 @@ fn create_class_then_entity_with_default_class_permissions() {
         // give members of GROUP_ONE permission to create entities
         // give members of GROUP_ONE permission to create entities
         let create_entities_set = CredentialSet::from(vec![1]);
         let create_entities_set = CredentialSet::from(vec![1]);
         assert_ok!(Permissions::set_class_create_entities_set(
         assert_ok!(Permissions::set_class_create_entities_set(
-            system::RawOrigin::Root.into(),
+            frame_system::RawOrigin::Root.into(),
             None,
             None,
             class_id,
             class_id,
             create_entities_set
             create_entities_set
@@ -224,7 +224,7 @@ fn class_permissions_set_admins() {
         );
         );
         assert_err!(
         assert_err!(
             Permissions::set_class_admins(
             Permissions::set_class_admins(
-                system::RawOrigin::None.into(), //unsigned inherent?
+                frame_system::RawOrigin::None.into(), //unsigned inherent?
                 class_id,
                 class_id,
                 credential_set.clone()
                 credential_set.clone()
             ),
             ),
@@ -233,7 +233,7 @@ fn class_permissions_set_admins() {
 
 
         // root origin can set admins
         // root origin can set admins
         assert_ok!(Permissions::set_class_admins(
         assert_ok!(Permissions::set_class_admins(
-            system::RawOrigin::Root.into(),
+            frame_system::RawOrigin::Root.into(),
             class_id,
             class_id,
             credential_set.clone()
             credential_set.clone()
         ));
         ));
@@ -258,7 +258,7 @@ fn class_permissions_set_add_schemas_set() {
 
 
         // root
         // root
         assert_ok!(Permissions::set_class_add_schemas_set(
         assert_ok!(Permissions::set_class_add_schemas_set(
-            system::RawOrigin::Root.into(),
+            frame_system::RawOrigin::Root.into(),
             None,
             None,
             class_id,
             class_id,
             credential_set1.clone()
             credential_set1.clone()
@@ -304,7 +304,7 @@ fn class_permissions_set_class_create_entities_set() {
 
 
         // root
         // root
         assert_ok!(Permissions::set_class_create_entities_set(
         assert_ok!(Permissions::set_class_create_entities_set(
-            system::RawOrigin::Root.into(),
+            frame_system::RawOrigin::Root.into(),
             None,
             None,
             class_id,
             class_id,
             credential_set1.clone()
             credential_set1.clone()
@@ -347,7 +347,7 @@ fn class_permissions_set_class_entities_can_be_created() {
 
 
         // root
         // root
         assert_ok!(Permissions::set_class_entities_can_be_created(
         assert_ok!(Permissions::set_class_entities_can_be_created(
-            system::RawOrigin::Root.into(),
+            frame_system::RawOrigin::Root.into(),
             None,
             None,
             class_id,
             class_id,
             true
             true
@@ -395,7 +395,7 @@ fn class_permissions_set_class_entity_permissions() {
 
 
         //root
         //root
         assert_ok!(Permissions::set_class_entity_permissions(
         assert_ok!(Permissions::set_class_entity_permissions(
-            system::RawOrigin::Root.into(),
+            frame_system::RawOrigin::Root.into(),
             None,
             None,
             class_id,
             class_id,
             entity_permissions1.clone()
             entity_permissions1.clone()
@@ -449,7 +449,7 @@ fn class_permissions_set_class_reference_constraint() {
 
 
         //root
         //root
         assert_ok!(Permissions::set_class_reference_constraint(
         assert_ok!(Permissions::set_class_reference_constraint(
-            system::RawOrigin::Root.into(),
+            frame_system::RawOrigin::Root.into(),
             None,
             None,
             class_id,
             class_id,
             reference_constraint1.clone()
             reference_constraint1.clone()
@@ -513,7 +513,7 @@ fn batch_transaction_simple() {
         }];
         }];
 
 
         assert_ok!(Permissions::add_class_schema(
         assert_ok!(Permissions::add_class_schema(
-            system::RawOrigin::Root.into(),
+            frame_system::RawOrigin::Root.into(),
             None,
             None,
             new_class_id,
             new_class_id,
             vec![],
             vec![],
@@ -597,7 +597,7 @@ fn batch_transaction_vector_of_entities() {
         }];
         }];
 
 
         assert_ok!(Permissions::add_class_schema(
         assert_ok!(Permissions::add_class_schema(
-            system::RawOrigin::Root.into(),
+            frame_system::RawOrigin::Root.into(),
             None,
             None,
             new_class_id,
             new_class_id,
             vec![],
             vec![],

+ 11 - 11
runtime-modules/versioned-store/Cargo.toml

@@ -1,22 +1,22 @@
 [package]
 [package]
 name = 'pallet-versioned-store'
 name = 'pallet-versioned-store'
-version = '3.0.0'
+version = '3.1.0'
 authors = ['Joystream contributors']
 authors = ['Joystream contributors']
 edition = '2018'
 edition = '2018'
 
 
 [dependencies]
 [dependencies]
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
-codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] }
-sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+codec = { package = 'parity-scale-codec', version = '1.3.4', default-features = false, features = ['derive'] }
+sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 common = { package = 'pallet-common', default-features = false, path = '../common'}
 common = { package = 'pallet-common', default-features = false, path = '../common'}
 
 
 [dev-dependencies]
 [dev-dependencies]
-sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 
 
 [features]
 [features]
 default = ['std']
 default = ['std']
@@ -25,6 +25,6 @@ std = [
 	'codec/std',
 	'codec/std',
 	'sp-std/std',
 	'sp-std/std',
 	'frame-support/std',
 	'frame-support/std',
-	'system/std',
+	'frame-system/std',
 	'common/std'
 	'common/std'
-]
+]

+ 3 - 3
runtime-modules/versioned-store/src/lib.rs

@@ -213,8 +213,8 @@ pub struct ClassPropertyValue {
     pub value: PropertyValue,
     pub value: PropertyValue,
 }
 }
 
 
-pub trait Trait: system::Trait + Sized {
-    type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;
+pub trait Trait: frame_system::Trait + Sized {
+    type Event: From<Event<Self>> + Into<<Self as frame_system::Trait>::Event>;
 }
 }
 
 
 decl_storage! {
 decl_storage! {
@@ -246,7 +246,7 @@ decl_storage! {
 decl_event!(
 decl_event!(
     pub enum Event<T>
     pub enum Event<T>
     where
     where
-        <T as system::Trait>::AccountId,
+        <T as frame_system::Trait>::AccountId,
     {
     {
         ClassCreated(ClassId),
         ClassCreated(ClassId),
         ClassSchemaAdded(ClassId, u16),
         ClassSchemaAdded(ClassId, u16),

+ 5 - 3
runtime-modules/versioned-store/src/mock.rs

@@ -26,7 +26,7 @@ parameter_types! {
     pub const MinimumPeriod: u64 = 5;
     pub const MinimumPeriod: u64 = 5;
 }
 }
 
 
-impl system::Trait for Runtime {
+impl frame_system::Trait for Runtime {
     type BaseCallFilter = ();
     type BaseCallFilter = ();
     type Origin = Origin;
     type Origin = Origin;
     type Call = ();
     type Call = ();
@@ -47,16 +47,18 @@ impl system::Trait for Runtime {
     type MaximumBlockLength = MaximumBlockLength;
     type MaximumBlockLength = MaximumBlockLength;
     type AvailableBlockRatio = AvailableBlockRatio;
     type AvailableBlockRatio = AvailableBlockRatio;
     type Version = ();
     type Version = ();
-    type ModuleToIndex = ();
     type AccountData = ();
     type AccountData = ();
     type OnNewAccount = ();
     type OnNewAccount = ();
     type OnKilledAccount = ();
     type OnKilledAccount = ();
+    type SystemWeightInfo = ();
+    type PalletInfo = ();
 }
 }
 
 
 impl pallet_timestamp::Trait for Runtime {
 impl pallet_timestamp::Trait for Runtime {
     type Moment = u64;
     type Moment = u64;
     type OnTimestampSet = ();
     type OnTimestampSet = ();
     type MinimumPeriod = MinimumPeriod;
     type MinimumPeriod = MinimumPeriod;
+    type WeightInfo = ();
 }
 }
 
 
 impl Trait for Runtime {
 impl Trait for Runtime {
@@ -242,7 +244,7 @@ pub fn default_genesis_config() -> GenesisConfig {
 }
 }
 
 
 fn build_test_externalities(config: GenesisConfig) -> sp_io::TestExternalities {
 fn build_test_externalities(config: GenesisConfig) -> sp_io::TestExternalities {
-    let mut t = system::GenesisConfig::default()
+    let mut t = frame_system::GenesisConfig::default()
         .build_storage::<Runtime>()
         .build_storage::<Runtime>()
         .unwrap();
         .unwrap();
 
 

+ 13 - 13
runtime-modules/working-group/Cargo.toml

@@ -1,17 +1,17 @@
 [package]
 [package]
 name = 'pallet-working-group'
 name = 'pallet-working-group'
-version = '3.0.0'
+version = '3.1.0'
 authors = ['Joystream contributors']
 authors = ['Joystream contributors']
 edition = '2018'
 edition = '2018'
 
 
 [dependencies]
 [dependencies]
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
 serde = { version = "1.0.101", optional = true, features = ["derive"] }
-codec = { package = 'parity-scale-codec', version = '1.3.1', default-features = false, features = ['derive'] }
-sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+codec = { package = 'parity-scale-codec', version = '1.3.4', default-features = false, features = ['derive'] }
+sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+frame-system = { package = 'frame-system', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 membership = { package = 'pallet-membership', default-features = false, path = '../membership'}
 membership = { package = 'pallet-membership', default-features = false, path = '../membership'}
 stake = { package = 'pallet-stake', default-features = false, path = '../stake'}
 stake = { package = 'pallet-stake', default-features = false, path = '../stake'}
 hiring = { package = 'pallet-hiring', default-features = false, path = '../hiring'}
 hiring = { package = 'pallet-hiring', default-features = false, path = '../hiring'}
@@ -20,10 +20,10 @@ recurringrewards = { package = 'pallet-recurring-reward', default-features = fal
 common = { package = 'pallet-common', default-features = false, path = '../common'}
 common = { package = 'pallet-common', default-features = false, path = '../common'}
 
 
 [dev-dependencies]
 [dev-dependencies]
-sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
-pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
+sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
+pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = 'a200cdb93c6af5763b9c7bf313fa708764ac88ca'}
 
 
 [features]
 [features]
 default = ['std']
 default = ['std']
@@ -32,7 +32,7 @@ std = [
 	'codec/std',
 	'codec/std',
 	'sp-std/std',
 	'sp-std/std',
 	'frame-support/std',
 	'frame-support/std',
-	'system/std',
+	'frame-system/std',
 	'sp-arithmetic/std',
 	'sp-arithmetic/std',
 	'sp-runtime/std',
 	'sp-runtime/std',
 	'membership/std',
 	'membership/std',
@@ -41,4 +41,4 @@ std = [
 	'minting/std',
 	'minting/std',
 	'recurringrewards/std',
 	'recurringrewards/std',
 	'common/std',
 	'common/std',
-]
+]

+ 22 - 17
runtime-modules/working-group/src/lib.rs

@@ -56,11 +56,11 @@ use frame_support::dispatch::{DispatchError, DispatchResult};
 use frame_support::storage::IterableStorageMap;
 use frame_support::storage::IterableStorageMap;
 use frame_support::traits::{Currency, ExistenceRequirement, Get, Imbalance, WithdrawReasons};
 use frame_support::traits::{Currency, ExistenceRequirement, Get, Imbalance, WithdrawReasons};
 use frame_support::{decl_event, decl_module, decl_storage, ensure, print, StorageValue};
 use frame_support::{decl_event, decl_module, decl_storage, ensure, print, StorageValue};
+use frame_system::{ensure_root, ensure_signed};
 use sp_arithmetic::traits::{Bounded, One, Zero};
 use sp_arithmetic::traits::{Bounded, One, Zero};
 use sp_std::collections::{btree_map::BTreeMap, btree_set::BTreeSet};
 use sp_std::collections::{btree_map::BTreeMap, btree_set::BTreeSet};
 use sp_std::vec;
 use sp_std::vec;
 use sp_std::vec::Vec;
 use sp_std::vec::Vec;
-use system::{ensure_root, ensure_signed};
 
 
 use crate::types::ExitInitiationOrigin;
 use crate::types::ExitInitiationOrigin;
 use common::constraints::InputValidationLengthConstraint;
 use common::constraints::InputValidationLengthConstraint;
@@ -89,18 +89,19 @@ pub type ApplicationId<T> = <T as hiring::Trait>::ApplicationId;
 
 
 /// Balance type of runtime
 /// Balance type of runtime
 pub type BalanceOf<T> =
 pub type BalanceOf<T> =
-    <<T as stake::Trait>::Currency as Currency<<T as system::Trait>::AccountId>>::Balance;
+    <<T as stake::Trait>::Currency as Currency<<T as frame_system::Trait>::AccountId>>::Balance;
 
 
 /// Balance type of runtime reward
 /// Balance type of runtime reward
 pub type BalanceOfMint<T> =
 pub type BalanceOfMint<T> =
-    <<T as minting::Trait>::Currency as Currency<<T as system::Trait>::AccountId>>::Balance;
+    <<T as minting::Trait>::Currency as Currency<<T as frame_system::Trait>::AccountId>>::Balance;
 
 
 /// Balance type of runtime
 /// Balance type of runtime
 pub type CurrencyOf<T> = <T as stake::Trait>::Currency;
 pub type CurrencyOf<T> = <T as stake::Trait>::Currency;
 
 
 /// Negative imbalance of runtime.
 /// Negative imbalance of runtime.
-pub type NegativeImbalance<T> =
-    <<T as stake::Trait>::Currency as Currency<<T as system::Trait>::AccountId>>::NegativeImbalance;
+pub type NegativeImbalance<T> = <<T as stake::Trait>::Currency as Currency<
+    <T as frame_system::Trait>::AccountId,
+>>::NegativeImbalance;
 
 
 /// Alias for the worker application id to the worker id dictionary
 /// Alias for the worker application id to the worker id dictionary
 pub type ApplicationIdToWorkerIdMap<T> = BTreeMap<ApplicationId<T>, WorkerId<T>>;
 pub type ApplicationIdToWorkerIdMap<T> = BTreeMap<ApplicationId<T>, WorkerId<T>>;
@@ -114,7 +115,7 @@ pub type HiringApplicationId<T> = <T as hiring::Trait>::ApplicationId;
 // Type simplification
 // Type simplification
 type OpeningInfo<T> = (
 type OpeningInfo<T> = (
     OpeningOf<T>,
     OpeningOf<T>,
-    hiring::Opening<BalanceOf<T>, <T as system::Trait>::BlockNumber, HiringApplicationId<T>>,
+    hiring::Opening<BalanceOf<T>, <T as frame_system::Trait>::BlockNumber, HiringApplicationId<T>>,
 );
 );
 
 
 // Type simplification
 // Type simplification
@@ -123,33 +124,37 @@ type ApplicationInfo<T> = (ApplicationOf<T>, ApplicationId<T>, OpeningOf<T>);
 // Type simplification
 // Type simplification
 type RewardSettings<T> = (
 type RewardSettings<T> = (
     <T as minting::Trait>::MintId,
     <T as minting::Trait>::MintId,
-    RewardPolicy<BalanceOfMint<T>, <T as system::Trait>::BlockNumber>,
+    RewardPolicy<BalanceOfMint<T>, <T as frame_system::Trait>::BlockNumber>,
 );
 );
 
 
 // Type simplification
 // Type simplification
 type WorkerOf<T> = Worker<
 type WorkerOf<T> = Worker<
-    <T as system::Trait>::AccountId,
+    <T as frame_system::Trait>::AccountId,
     <T as recurringrewards::Trait>::RewardRelationshipId,
     <T as recurringrewards::Trait>::RewardRelationshipId,
     <T as stake::Trait>::StakeId,
     <T as stake::Trait>::StakeId,
-    <T as system::Trait>::BlockNumber,
+    <T as frame_system::Trait>::BlockNumber,
     MemberId<T>,
     MemberId<T>,
 >;
 >;
 
 
 // Type simplification
 // Type simplification
 type OpeningOf<T> = Opening<
 type OpeningOf<T> = Opening<
     <T as hiring::Trait>::OpeningId,
     <T as hiring::Trait>::OpeningId,
-    <T as system::Trait>::BlockNumber,
+    <T as frame_system::Trait>::BlockNumber,
     BalanceOf<T>,
     BalanceOf<T>,
     ApplicationId<T>,
     ApplicationId<T>,
 >;
 >;
 
 
 // Type simplification
 // Type simplification
-type ApplicationOf<T> =
-    Application<<T as system::Trait>::AccountId, OpeningId<T>, MemberId<T>, HiringApplicationId<T>>;
+type ApplicationOf<T> = Application<
+    <T as frame_system::Trait>::AccountId,
+    OpeningId<T>,
+    MemberId<T>,
+    HiringApplicationId<T>,
+>;
 
 
 /// The _Working group_ main _Trait_
 /// The _Working group_ main _Trait_
 pub trait Trait<I: Instance>:
 pub trait Trait<I: Instance>:
-    system::Trait
+    frame_system::Trait
     + membership::Trait
     + membership::Trait
     + hiring::Trait
     + hiring::Trait
     + minting::Trait
     + minting::Trait
@@ -157,7 +162,7 @@ pub trait Trait<I: Instance>:
     + recurringrewards::Trait
     + recurringrewards::Trait
 {
 {
     /// _Working group_ event type.
     /// _Working group_ event type.
-    type Event: From<Event<Self, I>> + Into<<Self as system::Trait>::Event>;
+    type Event: From<Event<Self, I>> + Into<<Self as frame_system::Trait>::Event>;
 
 
     /// Defines max workers number in the working group.
     /// Defines max workers number in the working group.
     type MaxWorkerNumberLimit: Get<u32>;
     type MaxWorkerNumberLimit: Get<u32>;
@@ -168,7 +173,7 @@ decl_event!(
     pub enum Event<T, I>
     pub enum Event<T, I>
     where
     where
         WorkerId = WorkerId<T>,
         WorkerId = WorkerId<T>,
-        <T as system::Trait>::AccountId,
+        <T as frame_system::Trait>::AccountId,
         OpeningId = OpeningId<T>,
         OpeningId = OpeningId<T>,
         ApplicationId = ApplicationId<T>,
         ApplicationId = ApplicationId<T>,
         ApplicationIdToWorkerIdMap = ApplicationIdToWorkerIdMap<T>,
         ApplicationIdToWorkerIdMap = ApplicationIdToWorkerIdMap<T>,
@@ -608,7 +613,7 @@ decl_module! {
             // Ensure origin which will server as the source account for staked funds is signed
             // Ensure origin which will server as the source account for staked funds is signed
             let source_account = ensure_signed(origin)?;
             let source_account = ensure_signed(origin)?;
 
 
-            // In absence of a more general key delegation system which allows an account with some funds to
+            // In absence of a more general key delegation frame_system which allows an account with some funds to
             // grant another account permission to stake from its funds, the origin of this call must have the funds
             // grant another account permission to stake from its funds, the origin of this call must have the funds
             // and cannot specify another arbitrary account as the source account.
             // and cannot specify another arbitrary account as the source account.
             // Ensure the source_account is either the controller or root account of member with given id
             // Ensure the source_account is either the controller or root account of member with given id
@@ -816,7 +821,7 @@ decl_module! {
                 let mint_id = Self::mint();
                 let mint_id = Self::mint();
 
 
                 // Make sure valid parameters are selected for next payment at block number
                 // Make sure valid parameters are selected for next payment at block number
-                ensure!(policy.next_payment_at_block > <system::Module<T>>::block_number(),
+                ensure!(policy.next_payment_at_block > <frame_system::Module<T>>::block_number(),
                     Error::<T, I>::FillOpeningInvalidNextPaymentBlock);
                     Error::<T, I>::FillOpeningInvalidNextPaymentBlock);
 
 
                 // The verified reward settings to use
                 // The verified reward settings to use

+ 1 - 1
runtime-modules/working-group/src/tests/fixtures.rs

@@ -1,7 +1,7 @@
 use frame_support::dispatch::{DispatchError, DispatchResult};
 use frame_support::dispatch::{DispatchError, DispatchResult};
 use frame_support::storage::{StorageMap, StorageValue};
 use frame_support::storage::{StorageMap, StorageValue};
+use frame_system::{EventRecord, Phase, RawOrigin};
 use std::collections::BTreeSet;
 use std::collections::BTreeSet;
-use system::{EventRecord, Phase, RawOrigin};
 
 
 use super::mock::{
 use super::mock::{
     Balances, Membership, System, Test, TestEvent, TestWorkingGroup, TestWorkingGroupInstance,
     Balances, Membership, System, Test, TestEvent, TestWorkingGroup, TestWorkingGroupInstance,

+ 1 - 1
runtime-modules/working-group/src/tests/hiring_workflow.rs

@@ -1,5 +1,5 @@
 use frame_support::dispatch::{DispatchError, DispatchResult};
 use frame_support::dispatch::{DispatchError, DispatchResult};
-use system::RawOrigin;
+use frame_system::RawOrigin;
 
 
 use crate::tests::fixtures::{
 use crate::tests::fixtures::{
     create_mint, increase_total_balance_issuance_using_account_id, set_mint_id, setup_members,
     create_mint, increase_total_balance_issuance_using_account_id, set_mint_id, setup_members,

+ 10 - 6
runtime-modules/working-group/src/tests/mock.rs

@@ -1,6 +1,7 @@
 use frame_support::storage::StorageMap;
 use frame_support::storage::StorageMap;
 use frame_support::traits::{OnFinalize, OnInitialize};
 use frame_support::traits::{OnFinalize, OnInitialize};
 use frame_support::{impl_outer_event, impl_outer_origin, parameter_types};
 use frame_support::{impl_outer_event, impl_outer_origin, parameter_types};
+use frame_system;
 use sp_core::H256;
 use sp_core::H256;
 use sp_runtime::{
 use sp_runtime::{
     testing::Header,
     testing::Header,
@@ -8,7 +9,6 @@ use sp_runtime::{
     Perbill,
     Perbill,
 };
 };
 use std::marker::PhantomData;
 use std::marker::PhantomData;
-use system;
 
 
 use crate::{BalanceOf, Module, NegativeImbalance, Trait};
 use crate::{BalanceOf, Module, NegativeImbalance, Trait};
 use common::constraints::InputValidationLengthConstraint;
 use common::constraints::InputValidationLengthConstraint;
@@ -31,7 +31,7 @@ impl_outer_event! {
         balances<T>,
         balances<T>,
         working_group TestWorkingGroupInstance <T>,
         working_group TestWorkingGroupInstance <T>,
         membership_mod<T>,
         membership_mod<T>,
-        system<T>,
+        frame_system<T>,
     }
     }
 }
 }
 
 
@@ -49,7 +49,7 @@ parameter_types! {
 #[derive(Clone, PartialEq, Eq, Debug)]
 #[derive(Clone, PartialEq, Eq, Debug)]
 pub struct Test;
 pub struct Test;
 
 
-impl system::Trait for Test {
+impl frame_system::Trait for Test {
     type BaseCallFilter = ();
     type BaseCallFilter = ();
     type Origin = Origin;
     type Origin = Origin;
     type Call = ();
     type Call = ();
@@ -70,10 +70,11 @@ impl system::Trait for Test {
     type MaximumBlockLength = MaximumBlockLength;
     type MaximumBlockLength = MaximumBlockLength;
     type AvailableBlockRatio = AvailableBlockRatio;
     type AvailableBlockRatio = AvailableBlockRatio;
     type Version = ();
     type Version = ();
-    type ModuleToIndex = ();
     type AccountData = balances::AccountData<u64>;
     type AccountData = balances::AccountData<u64>;
     type OnNewAccount = ();
     type OnNewAccount = ();
     type OnKilledAccount = ();
     type OnKilledAccount = ();
+    type PalletInfo = ();
+    type SystemWeightInfo = ();
 }
 }
 
 
 impl hiring::Trait for Test {
 impl hiring::Trait for Test {
@@ -112,6 +113,7 @@ impl pallet_timestamp::Trait for Test {
     type Moment = u64;
     type Moment = u64;
     type OnTimestampSet = ();
     type OnTimestampSet = ();
     type MinimumPeriod = MinimumPeriod;
     type MinimumPeriod = MinimumPeriod;
+    type WeightInfo = ();
 }
 }
 
 
 impl balances::Trait for Test {
 impl balances::Trait for Test {
@@ -120,6 +122,8 @@ impl balances::Trait for Test {
     type Event = TestEvent;
     type Event = TestEvent;
     type ExistentialDeposit = ExistentialDeposit;
     type ExistentialDeposit = ExistentialDeposit;
     type AccountStore = System;
     type AccountStore = System;
+    type WeightInfo = ();
+    type MaxLocks = ();
 }
 }
 
 
 impl recurringrewards::Trait for Test {
 impl recurringrewards::Trait for Test {
@@ -129,7 +133,7 @@ impl recurringrewards::Trait for Test {
 }
 }
 
 
 pub type Balances = balances::Module<Test>;
 pub type Balances = balances::Module<Test>;
-pub type System = system::Module<Test>;
+pub type System = frame_system::Module<Test>;
 
 
 parameter_types! {
 parameter_types! {
     pub const MaxWorkerNumberLimit: u32 = 3;
     pub const MaxWorkerNumberLimit: u32 = 3;
@@ -150,7 +154,7 @@ pub(crate) const WORKING_GROUP_CONSTRAINT_MIN: u16 = 1;
 pub(crate) const WORKING_GROUP_CONSTRAINT_DIFF: u16 = 40;
 pub(crate) const WORKING_GROUP_CONSTRAINT_DIFF: u16 = 40;
 
 
 pub fn build_test_externalities() -> sp_io::TestExternalities {
 pub fn build_test_externalities() -> sp_io::TestExternalities {
-    let mut t = system::GenesisConfig::default()
+    let mut t = frame_system::GenesisConfig::default()
         .build_storage::<Test>()
         .build_storage::<Test>()
         .unwrap();
         .unwrap();
 
 

+ 4 - 4
runtime-modules/working-group/src/tests/mod.rs

@@ -4,12 +4,12 @@ mod mock;
 
 
 use frame_support::dispatch::DispatchError;
 use frame_support::dispatch::DispatchError;
 use frame_support::storage::{StorageMap, StorageValue};
 use frame_support::storage::{StorageMap, StorageValue};
+use frame_system::RawOrigin;
 use std::collections::BTreeMap;
 use std::collections::BTreeMap;
-use system::RawOrigin;
 
 
 use crate::tests::hiring_workflow::HiringWorkflow;
 use crate::tests::hiring_workflow::HiringWorkflow;
 use crate::types::{OpeningPolicyCommitment, OpeningType, RewardPolicy};
 use crate::types::{OpeningPolicyCommitment, OpeningType, RewardPolicy};
-use crate::{Error, RawEvent, Worker};
+use crate::{Error, RawEvent, Worker, WorkerId};
 use common::constraints::InputValidationLengthConstraint;
 use common::constraints::InputValidationLengthConstraint;
 use fixtures::*;
 use fixtures::*;
 use mock::{
 use mock::{
@@ -2160,7 +2160,7 @@ fn slash_worker_stake_fails_with_not_set_lead() {
 fn get_regular_worker_ids_succeeds() {
 fn get_regular_worker_ids_succeeds() {
     build_test_externalities().execute_with(|| {
     build_test_externalities().execute_with(|| {
         let worker_ids = TestWorkingGroup::get_regular_worker_ids();
         let worker_ids = TestWorkingGroup::get_regular_worker_ids();
-        assert_eq!(worker_ids, Vec::new());
+        assert_eq!(worker_ids, Vec::<WorkerId<Test>>::new());
 
 
         let leader_worker_id = HireLeadFixture::default().hire_lead();
         let leader_worker_id = HireLeadFixture::default().hire_lead();
 
 
@@ -2186,7 +2186,7 @@ fn get_regular_worker_ids_succeeds() {
 fn get_all_worker_ids_succeeds() {
 fn get_all_worker_ids_succeeds() {
     build_test_externalities().execute_with(|| {
     build_test_externalities().execute_with(|| {
         let worker_ids = TestWorkingGroup::get_all_worker_ids();
         let worker_ids = TestWorkingGroup::get_all_worker_ids();
-        assert_eq!(worker_ids, Vec::new());
+        assert_eq!(worker_ids, Vec::<WorkerId<Test>>::new());
 
 
         let leader_worker_id = HireLeadFixture::default().hire_lead();
         let leader_worker_id = HireLeadFixture::default().hire_lead();
 
 

Some files were not shown because too many files changed in this diff