decl_module! macro: use 'frame_system' instead of system as default ident (#6500)

* Use frame_system as default ident.

* Remove unused 'frame_system' to 'system' renaming.

* Fix construct_runtime_ui tests.

* Rename system to frame_system in sudo/utility pallet test.

* Bump runtime impl_version.

* Update formatting.
This commit is contained in:
Shaopeng Wang
2020-07-08 11:06:21 +12:00
committed by GitHub
parent 36cf6e7dc4
commit a6702b7121
30 changed files with 57 additions and 57 deletions
@@ -10,7 +10,7 @@
/// https://github.com/paritytech/substrate/blob/master/frame/example/src/lib.rs
use frame_support::{decl_module, decl_storage, decl_event, decl_error, dispatch};
use frame_system::{self as system, ensure_signed};
use frame_system::ensure_signed;
#[cfg(test)]
mod mock;
@@ -19,11 +19,11 @@ mod mock;
mod tests;
/// The pallet's configuration trait.
pub trait Trait: system::Trait {
pub trait Trait: frame_system::Trait {
// Add other types and constants required to configure this pallet.
/// 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>;
}
// This pallet's storage items.
@@ -41,7 +41,7 @@ decl_storage! {
// The pallet's events
decl_event!(
pub enum Event<T> where AccountId = <T as system::Trait>::AccountId {
pub enum Event<T> where AccountId = <T as frame_system::Trait>::AccountId {
/// Just a dummy event.
/// Event `Something` is declared with a parameter of the type `u32` and `AccountId`
/// To emit this event, we call the deposit function, from our runtime functions