Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
automate doc and while allow to extend it on event
  • Loading branch information
gui1117 committed Mar 22, 2019
commit e3ba1bf33f2b64ed7e4ace1bb6463b2a1ff14f5e
1 change: 0 additions & 1 deletion srml/assets/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ decl_module! {
}

decl_event!(
/// An event in this module.
pub enum Event<T> where <T as system::Trait>::AccountId, <T as Trait>::Balance {
/// Some assets were issued.
Issued(AssetId, AccountId, Balance),
Expand Down
1 change: 0 additions & 1 deletion srml/council/src/motions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ pub enum Origin {
}

decl_event!(
/// Event for this module.
pub enum Event<T> where <T as system::Trait>::Hash, <T as system::Trait>::AccountId {
/// A motion (given hash) has been proposed (by given account) with a threshold (given u32).
Proposed(AccountId, ProposalIndex, Hash, u32),
Expand Down
1 change: 0 additions & 1 deletion srml/council/src/voting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ decl_storage! {
}

decl_event!(
/// An event in this module.
pub enum Event<T> where <T as system::Trait>::Hash {
/// A voting tally has happened for a referendum cancellation vote.
/// Last three are yes, no, abstain counts.
Expand Down
2 changes: 1 addition & 1 deletion srml/example/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ decl_storage! {
}

decl_event!(
/// An event in this module. Events are simple means of reporting specific conditions and
/// Events are simple means of reporting specific conditions and
/// circumstances that have happened that users, Dapps and/or chain explorers would find
/// interesting and otherwise difficult to detect.
pub enum Event<T> where B = <T as balances::Trait>::Balance {
Expand Down
1 change: 0 additions & 1 deletion srml/grandpa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ impl<N: Decode, SessionKey: Decode> Decode for StoredPendingChange<N, SessionKey
}

decl_event!(
/// GRANDPA events.
pub enum Event<T> where <T as Trait>::SessionKey {
/// New authority set has been applied.
NewAuthorities(Vec<(SessionKey, u64)>),
Expand Down
1 change: 0 additions & 1 deletion srml/session/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ decl_module! {
}

decl_event!(
/// An event in this module.
pub enum Event<T> where <T as system::Trait>::BlockNumber {
/// New session has happened. Note that the argument is the session index, not the block
/// number as the type might suggest.
Expand Down
1 change: 0 additions & 1 deletion srml/staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,6 @@ decl_module! {
}

decl_event!(
/// An event in this module.
pub enum Event<T> where Balance = BalanceOf<T>, <T as system::Trait>::AccountId {
/// All validators have been rewarded by the given balance.
Reward(Balance),
Expand Down
1 change: 0 additions & 1 deletion srml/sudo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ decl_module! {
}

decl_event!(
/// An event in this module.
pub enum Event<T> where AccountId = <T as system::Trait>::AccountId {
/// A sudo just took place.
Sudid(bool),
Expand Down
5 changes: 5 additions & 0 deletions srml/support/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ macro_rules! decl_event {
// Workaround for https://github.com/rust-lang/rust/issues/26925 . Remove when sorted.
#[derive(Clone, PartialEq, Eq, $crate::codec::Encode, $crate::codec::Decode)]
#[cfg_attr(feature = "std", derive(Debug))]
/// Events for this module.
///
$(#[$attr])*
pub enum Event {
$(
Expand Down Expand Up @@ -277,9 +279,12 @@ macro_rules! __decl_generic_event {
/// [`RawEvent`]: enum.RawEvent.html
/// [`Trait`]: trait.Trait.html
pub type Event<$event_generic_param $(, $instance $( = $event_default_instance)? )?> = RawEvent<$( $generic_type ),* $(, $instance)? >;

// Workaround for https://github.com/rust-lang/rust/issues/26925 . Remove when sorted.
#[derive(Clone, PartialEq, Eq, $crate::codec::Encode, $crate::codec::Decode)]
#[cfg_attr(feature = "std", derive(Debug))]
/// Events for this module.
///
$(#[$attr])*
pub enum RawEvent<$( $generic_param ),* $(, $instance)? > {
$(
Expand Down
1 change: 0 additions & 1 deletion srml/system/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ pub struct EventRecord<E: Parameter + Member> {
}

decl_event!(
/// Event for the system module.
pub enum Event {
/// An extrinsic completed successfully.
ExtrinsicSuccess,
Expand Down
1 change: 0 additions & 1 deletion srml/treasury/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ decl_storage! {
}

decl_event!(
/// An event in this module.
pub enum Event<T>
where
Balance = BalanceOf<T>,
Expand Down