diff --git a/bin/node-template/pallets/template/src/lib.rs b/bin/node-template/pallets/template/src/lib.rs index 93624170aadae..efcce785cceb8 100644 --- a/bin/node-template/pallets/template/src/lib.rs +++ b/bin/node-template/pallets/template/src/lib.rs @@ -45,6 +45,7 @@ decl_event!( /// 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 + /// [something, who] SomethingStored(u32, AccountId), } ); diff --git a/frame/assets/src/lib.rs b/frame/assets/src/lib.rs index 7a4829161e6ab..79bc9136ef4a7 100644 --- a/frame/assets/src/lib.rs +++ b/frame/assets/src/lib.rs @@ -230,11 +230,11 @@ decl_event! { ::Balance, ::AssetId, { - /// Some assets were issued. + /// Some assets were issued. [asset_id, owner, total_supply] Issued(AssetId, AccountId, Balance), - /// Some assets were transferred. + /// Some assets were transferred. [asset_id, from, to, amount] Transferred(AssetId, AccountId, AccountId, Balance), - /// Some assets were destroyed. + /// Some assets were destroyed. [asset_id, owner, balance] Destroyed(AssetId, AccountId, Balance), } } diff --git a/frame/atomic-swap/src/lib.rs b/frame/atomic-swap/src/lib.rs index 56aa67310fb48..7e8354f8b65d6 100644 --- a/frame/atomic-swap/src/lib.rs +++ b/frame/atomic-swap/src/lib.rs @@ -195,11 +195,12 @@ decl_event!( AccountId = ::AccountId, PendingSwap = PendingSwap, { - /// Swap created. + /// Swap created. [account, proof, swap] NewSwap(AccountId, HashedProof, PendingSwap), - /// Swap claimed. The last parameter indicates whether the execution succeeds. + /// Swap claimed. The last parameter indicates whether the execution succeeds. + /// [account, proof, success] SwapClaimed(AccountId, HashedProof, bool), - /// Swap cancelled. + /// Swap cancelled. [account, proof] SwapCancelled(AccountId, HashedProof), } ); diff --git a/frame/balances/src/lib.rs b/frame/balances/src/lib.rs index fefe054b6d580..3056cd19759db 100644 --- a/frame/balances/src/lib.rs +++ b/frame/balances/src/lib.rs @@ -243,23 +243,24 @@ decl_event!( ::AccountId, >::Balance { - /// An account was created with some free balance. + /// An account was created with some free balance. [account, free_balance] Endowed(AccountId, Balance), /// An account was removed whose balance was non-zero but below ExistentialDeposit, - /// resulting in an outright loss. + /// resulting in an outright loss. [account, balance] DustLost(AccountId, Balance), - /// Transfer succeeded (from, to, value). + /// Transfer succeeded. [from, to, value] Transfer(AccountId, AccountId, Balance), - /// A balance was set by root (who, free, reserved). + /// A balance was set by root. [who, free, reserved] BalanceSet(AccountId, Balance, Balance), - /// Some amount was deposited (e.g. for transaction fees). + /// Some amount was deposited (e.g. for transaction fees). [who, deposit] Deposit(AccountId, Balance), - /// Some balance was reserved (moved from free to reserved). + /// Some balance was reserved (moved from free to reserved). [who, value] Reserved(AccountId, Balance), - /// Some balance was unreserved (moved from reserved to free). + /// Some balance was unreserved (moved from reserved to free). [who, value] Unreserved(AccountId, Balance), /// Some balance was moved from the reserve of the first account to the second account. /// Final argument indicates the destination balance type. + /// [from, to, balance, destination_status] ReserveRepatriated(AccountId, AccountId, Balance, Status), } ); diff --git a/frame/collective/src/lib.rs b/frame/collective/src/lib.rs index e2567d0477585..cebf35dd2b95f 100644 --- a/frame/collective/src/lib.rs +++ b/frame/collective/src/lib.rs @@ -184,19 +184,26 @@ decl_event! { { /// A motion (given hash) has been proposed (by given account) with a threshold (given /// `MemberCount`). + /// [account, proposal_index, proposal_hash, threshold] Proposed(AccountId, ProposalIndex, Hash, MemberCount), /// A motion (given hash) has been voted on by given account, leaving /// a tally (yes votes and no votes given respectively as `MemberCount`). + /// [account, proposal_hash, voted, yes, no] Voted(AccountId, Hash, bool, MemberCount, MemberCount), /// A motion was approved by the required threshold. + /// [proposal_hash] Approved(Hash), /// A motion was not approved by the required threshold. + /// [proposal_hash] Disapproved(Hash), /// A motion was executed; result will be `Ok` if it returned without error. + /// [proposal_hash, result] Executed(Hash, DispatchResult), /// A single member did some action; result will be `Ok` if it returned without error. + /// [proposal_hash, result] MemberExecuted(Hash, DispatchResult), /// A proposal was closed because its threshold was reached or after its duration was up. + /// [proposal_hash, yes, no] Closed(Hash, MemberCount, MemberCount), } } diff --git a/frame/contracts/src/lib.rs b/frame/contracts/src/lib.rs index 18c88c02b4793..6194e3a694059 100644 --- a/frame/contracts/src/lib.rs +++ b/frame/contracts/src/lib.rs @@ -660,11 +660,12 @@ decl_event! { ::AccountId, ::Hash { - /// Contract deployed by address at the specified address. + /// Contract deployed by address at the specified address. [owner, contract] Instantiated(AccountId, AccountId), /// Contract has been evicted and is now in tombstone state. - /// + /// [contract, tombstone] + /// /// # Params /// /// - `contract`: `AccountId`: The account ID of the evicted contract. @@ -672,7 +673,8 @@ decl_event! { Evicted(AccountId, bool), /// Restoration for a contract has been successful. - /// + /// [donor, dest, code_hash, rent_allowance] + /// /// # Params /// /// - `donor`: `AccountId`: Account ID of the restoring contract @@ -682,12 +684,14 @@ decl_event! { Restored(AccountId, AccountId, Hash, Balance), /// Code with the specified hash has been stored. + /// [code_hash] CodeStored(Hash), - /// Triggered when the current schedule is updated. + /// Triggered when the current [schedule] is updated. ScheduleUpdated(u32), /// An event deposited upon execution of a contract from the account. + /// [account, data] ContractExecution(AccountId, Vec), } } diff --git a/frame/democracy/src/lib.rs b/frame/democracy/src/lib.rs index 4ee8963be5bbf..f546b87dc603b 100644 --- a/frame/democracy/src/lib.rs +++ b/frame/democracy/src/lib.rs @@ -467,39 +467,41 @@ decl_event! { ::Hash, ::BlockNumber, { - /// A motion has been proposed by a public account. + /// A motion has been proposed by a public account. [proposal_index, deposit] Proposed(PropIndex, Balance), - /// A public proposal has been tabled for referendum vote. + /// A public proposal has been tabled for referendum vote. [proposal_index, deposit, depositors] Tabled(PropIndex, Balance, Vec), /// An external proposal has been tabled. ExternalTabled, - /// A referendum has begun. + /// A referendum has begun. [ref_index, threshold] Started(ReferendumIndex, VoteThreshold), - /// A proposal has been approved by referendum. + /// A proposal has been approved by referendum. [ref_index] Passed(ReferendumIndex), - /// A proposal has been rejected by referendum. + /// A proposal has been rejected by referendum. [ref_index] NotPassed(ReferendumIndex), - /// A referendum has been cancelled. + /// A referendum has been cancelled. [ref_index] Cancelled(ReferendumIndex), - /// A proposal has been enacted. + /// A proposal has been enacted. [ref_index, is_ok] Executed(ReferendumIndex, bool), - /// An account has delegated their vote to another account. + /// An account has delegated their vote to another account. [who, target] Delegated(AccountId, AccountId), - /// An account has cancelled a previous delegation operation. + /// An [account] has cancelled a previous delegation operation. Undelegated(AccountId), - /// An external proposal has been vetoed. + /// An external proposal has been vetoed. [who, proposal_hash, until] Vetoed(AccountId, Hash, BlockNumber), - /// A proposal's preimage was noted, and the deposit taken. + /// A proposal's preimage was noted, and the deposit taken. [proposal_hash, who, deposit] PreimageNoted(Hash, AccountId, Balance), - /// A proposal preimage was removed and used (the deposit was returned). + /// A proposal preimage was removed and used (the deposit was returned). + /// [proposal_hash, provider, deposit] PreimageUsed(Hash, AccountId, Balance), - /// A proposal could not be executed because its preimage was invalid. + /// A proposal could not be executed because its preimage was invalid. [proposal_hash, ref_index] PreimageInvalid(Hash, ReferendumIndex), - /// A proposal could not be executed because its preimage was missing. + /// A proposal could not be executed because its preimage was missing. [proposal_hash, ref_index] PreimageMissing(Hash, ReferendumIndex), - /// A registered preimage was removed and the deposit collected by the reaper (last item). + /// A registered preimage was removed and the deposit collected by the reaper. + /// [proposal_hash, provider, deposit, reaper] PreimageReaped(Hash, AccountId, Balance, AccountId), - /// An account has been unlocked successfully. + /// An [account] has been unlocked successfully. Unlocked(AccountId), } } diff --git a/frame/elections-phragmen/src/lib.rs b/frame/elections-phragmen/src/lib.rs index c59ac590316de..e3ecb6ea229b5 100644 --- a/frame/elections-phragmen/src/lib.rs +++ b/frame/elections-phragmen/src/lib.rs @@ -709,7 +709,7 @@ decl_event!( Balance = BalanceOf, ::AccountId, { - /// A new term with new members. This indicates that enough candidates existed to run the + /// A new term with [new_members]. This indicates that enough candidates existed to run the /// election, not that enough have has been elected. The inner value must be examined for /// this purpose. A `NewTerm([])` indicates that some candidates got their bond slashed and /// none were elected, whilst `EmptyTerm` means that no candidates existed to begin with. @@ -717,13 +717,13 @@ decl_event!( /// No (or not enough) candidates existed for this round. This is different from /// `NewTerm([])`. See the description of `NewTerm`. EmptyTerm, - /// A member has been removed. This should always be followed by either `NewTerm` ot + /// A [member] has been removed. This should always be followed by either `NewTerm` ot /// `EmptyTerm`. MemberKicked(AccountId), - /// A member has renounced their candidacy. + /// A [member] has renounced their candidacy. MemberRenounced(AccountId), - /// A voter (first element) was reported (byt the second element) with the the report being - /// successful or not (third element). + /// A voter was reported with the the report being successful or not. + /// [voter, reporter, success] VoterReported(AccountId, AccountId, bool), } ); diff --git a/frame/elections/src/lib.rs b/frame/elections/src/lib.rs index c9d3c5455fc78..1453e2f0fd9fc 100644 --- a/frame/elections/src/lib.rs +++ b/frame/elections/src/lib.rs @@ -700,13 +700,14 @@ decl_module! { decl_event!( pub enum Event where ::AccountId { - /// reaped voter, reaper + /// Reaped [voter, reaper]. VoterReaped(AccountId, AccountId), - /// slashed reaper + /// Slashed [reaper]. BadReaperSlashed(AccountId), - /// A tally (for approval votes of seat(s)) has started. + /// A tally (for approval votes of [seats]) has started. TallyStarted(u32), - /// A tally (for approval votes of seat(s)) has ended (with one or more new members). + /// A tally (for approval votes of seat(s)) has ended (with one or more new members). + /// [incoming, outgoing] TallyFinalized(Vec, Vec), } ); diff --git a/frame/evm/src/lib.rs b/frame/evm/src/lib.rs index 1ecd65e193f7a..d55c21ea2aab4 100644 --- a/frame/evm/src/lib.rs +++ b/frame/evm/src/lib.rs @@ -201,17 +201,17 @@ decl_event! { { /// Ethereum events from contracts. Log(Log), - /// A contract has been created at given address. + /// A contract has been created at given [address]. Created(H160), - /// A contract was attempted to be created, but the execution failed. + /// A [contract] was attempted to be created, but the execution failed. CreatedFailed(H160), - /// A contract has been executed successfully with states applied. + /// A [contract] has been executed successfully with states applied. Executed(H160), - /// A contract has been executed with errors. States are reverted with only gas fees applied. + /// A [contract] has been executed with errors. States are reverted with only gas fees applied. ExecutedFailed(H160), - /// A deposit has been made at a given address. + /// A deposit has been made at a given address. [sender, address, value] BalanceDeposit(AccountId, H160, U256), - /// A withdrawal has been made from a given address. + /// A withdrawal has been made from a given address. [sender, address, value] BalanceWithdraw(AccountId, H160, U256), } } diff --git a/frame/example-offchain-worker/src/lib.rs b/frame/example-offchain-worker/src/lib.rs index aae51c6f27f68..f6a4a68e3cb3d 100644 --- a/frame/example-offchain-worker/src/lib.rs +++ b/frame/example-offchain-worker/src/lib.rs @@ -165,7 +165,8 @@ decl_storage! { decl_event!( /// Events generated by the module. pub enum Event where AccountId = ::AccountId { - /// Event generated when new price is accepted to contribute to the average. + /// Event generated when new price is accepted to contribute to the average. + /// [price, who] NewPrice(u32, AccountId), } ); diff --git a/frame/generic-asset/src/lib.rs b/frame/generic-asset/src/lib.rs index c85920edf350b..881d89439ec7b 100644 --- a/frame/generic-asset/src/lib.rs +++ b/frame/generic-asset/src/lib.rs @@ -493,15 +493,15 @@ decl_event!( ::AssetId, AssetOptions = AssetOptions<::Balance, ::AccountId> { - /// Asset created (asset_id, creator, asset_options). + /// Asset created. [asset_id, creator, asset_options] Created(AssetId, AccountId, AssetOptions), - /// Asset transfer succeeded (asset_id, from, to, amount). + /// Asset transfer succeeded. [asset_id, from, to, amount] Transferred(AssetId, AccountId, AccountId, Balance), - /// Asset permission updated (asset_id, new_permissions). + /// Asset permission updated. [asset_id, new_permissions] PermissionUpdated(AssetId, PermissionLatest), - /// New asset minted (asset_id, account, amount). + /// New asset minted. [asset_id, account, amount] Minted(AssetId, AccountId, Balance), - /// Asset burned (asset_id, account, amount). + /// Asset burned. [asset_id, account, amount] Burned(AssetId, AccountId, Balance), } ); diff --git a/frame/grandpa/src/lib.rs b/frame/grandpa/src/lib.rs index 773a78529e372..c903e081e7260 100644 --- a/frame/grandpa/src/lib.rs +++ b/frame/grandpa/src/lib.rs @@ -169,7 +169,7 @@ pub enum StoredState { decl_event! { pub enum Event { - /// New authority set has been applied. + /// New authority set has been applied. [authority_set] NewAuthorities(AuthorityList), /// Current authority set has been paused. Paused, diff --git a/frame/identity/src/lib.rs b/frame/identity/src/lib.rs index b7505a9193c33..1607835f2414b 100644 --- a/frame/identity/src/lib.rs +++ b/frame/identity/src/lib.rs @@ -462,26 +462,27 @@ decl_storage! { decl_event!( pub enum Event where AccountId = ::AccountId, Balance = BalanceOf { - /// A name was set or reset (which will remove all judgements). + /// A name was set or reset (which will remove all judgements). [who] IdentitySet(AccountId), - /// A name was cleared, and the given balance returned. + /// A name was cleared, and the given balance returned. [who, deposit] IdentityCleared(AccountId, Balance), - /// A name was removed and the given balance slashed. + /// A name was removed and the given balance slashed. [who, deposit] IdentityKilled(AccountId, Balance), - /// A judgement was asked from a registrar. + /// A judgement was asked from a registrar. [who, registrar_index] JudgementRequested(AccountId, RegistrarIndex), - /// A judgement request was retracted. + /// A judgement request was retracted. [who, registrar_index] JudgementUnrequested(AccountId, RegistrarIndex), - /// A judgement was given by a registrar. + /// A judgement was given by a registrar. [target, registrar_index] JudgementGiven(AccountId, RegistrarIndex), - /// A registrar was added. + /// A registrar was added. [registrar_index] RegistrarAdded(RegistrarIndex), - /// A sub-identity (first) was added to an identity (second) and the deposit paid. + /// A sub-identity was added to an identity and the deposit paid. [sub, main, deposit] SubIdentityAdded(AccountId, AccountId, Balance), - /// A sub-identity (first) was removed from an identity (second) and the deposit freed. + /// A sub-identity was removed from an identity and the deposit freed. + /// [sub, main, deposit] SubIdentityRemoved(AccountId, AccountId, Balance), - /// A sub-identity (first arg) was cleared, and the given deposit repatriated from the - /// main identity account (second arg) to the sub-identity account. + /// A sub-identity was cleared, and the given deposit repatriated from the + /// main identity account to the sub-identity account. [sub, main, deposit] SubIdentityRevoked(AccountId, AccountId, Balance), } ); diff --git a/frame/im-online/src/lib.rs b/frame/im-online/src/lib.rs index cdc7fea00d218..01b7b999dd004 100644 --- a/frame/im-online/src/lib.rs +++ b/frame/im-online/src/lib.rs @@ -276,11 +276,11 @@ decl_event!( ::AuthorityId, IdentificationTuple = IdentificationTuple, { - /// A new heartbeat was received from `AuthorityId` + /// A new heartbeat was received from `AuthorityId` [authority_id] HeartbeatReceived(AuthorityId), /// At the end of the session, no offence was committed. AllGood, - /// At the end of the session, at least one validator was found to be offline. + /// At the end of the session, at least one validator was found to be [offline]. SomeOffline(Vec), } ); diff --git a/frame/indices/src/lib.rs b/frame/indices/src/lib.rs index 5224e03347ceb..c99beb463bc5f 100644 --- a/frame/indices/src/lib.rs +++ b/frame/indices/src/lib.rs @@ -95,11 +95,11 @@ decl_event!( ::AccountId, ::AccountIndex { - /// A account index was assigned. + /// A account index was assigned. [who, index] IndexAssigned(AccountId, AccountIndex), - /// A account index has been freed up (unassigned). + /// A account index has been freed up (unassigned). [index] IndexFreed(AccountIndex), - /// A account index has been frozen to its current account ID. + /// A account index has been frozen to its current account ID. [who, index] IndexFrozen(AccountIndex, AccountId), } ); diff --git a/frame/multisig/src/lib.rs b/frame/multisig/src/lib.rs index 35727a1cacbf2..cbe6f2054ca3c 100644 --- a/frame/multisig/src/lib.rs +++ b/frame/multisig/src/lib.rs @@ -197,17 +197,13 @@ decl_event! { BlockNumber = ::BlockNumber, CallHash = [u8; 32] { - /// A new multisig operation has begun. First param is the account that is approving, - /// second is the multisig account, third is hash of the call. + /// A new multisig operation has begun. [approving, multisig, call_hash] NewMultisig(AccountId, AccountId, CallHash), - /// A multisig operation has been approved by someone. First param is the account that is - /// approving, third is the multisig account, fourth is hash of the call. + /// A multisig operation has been approved by someone. [approving, timepoint, multisig, call_hash] MultisigApproval(AccountId, Timepoint, AccountId, CallHash), - /// A multisig operation has been executed. First param is the account that is - /// approving, third is the multisig account, fourth is hash of the call to be executed. + /// A multisig operation has been executed. [approving, timepoint, multisig, call_hash] MultisigExecuted(AccountId, Timepoint, AccountId, CallHash, DispatchResult), - /// A multisig operation has been cancelled. First param is the account that is - /// cancelling, third is the multisig account, fourth is hash of the call. + /// A multisig operation has been cancelled. [cancelling, timepoint, multisig, call_hash] MultisigCancelled(AccountId, Timepoint, AccountId, CallHash), } } diff --git a/frame/nicks/src/lib.rs b/frame/nicks/src/lib.rs index e7595059c9b22..56262819c9654 100644 --- a/frame/nicks/src/lib.rs +++ b/frame/nicks/src/lib.rs @@ -84,15 +84,15 @@ decl_storage! { decl_event!( pub enum Event where AccountId = ::AccountId, Balance = BalanceOf { - /// A name was set. + /// A name was set. [who] NameSet(AccountId), - /// A name was forcibly set. + /// A name was forcibly set. [target] NameForced(AccountId), - /// A name was changed. + /// A name was changed. [who] NameChanged(AccountId), - /// A name was cleared, and the given balance returned. + /// A name was cleared, and the given balance returned. [who, deposit] NameCleared(AccountId, Balance), - /// A name was removed and the given balance slashed. + /// A name was removed and the given balance slashed. [target, deposit] NameKilled(AccountId, Balance), } ); diff --git a/frame/offences/src/lib.rs b/frame/offences/src/lib.rs index fe4662efa88dc..9a067d903fe2d 100644 --- a/frame/offences/src/lib.rs +++ b/frame/offences/src/lib.rs @@ -111,7 +111,8 @@ decl_event!( pub enum Event { /// There is an offence reported of the given `kind` happened at the `session_index` and /// (kind-specific) time slot. This event is not deposited for duplicate slashes. last - /// element indicates of the offence was applied (true) or queued (false). + /// element indicates of the offence was applied (true) or queued (false) + /// [kind, timeslot, applied]. Offence(Kind, OpaqueTimeSlot, bool), } ); diff --git a/frame/proxy/src/lib.rs b/frame/proxy/src/lib.rs index 79879a51fa61b..ec43007827667 100644 --- a/frame/proxy/src/lib.rs +++ b/frame/proxy/src/lib.rs @@ -141,10 +141,10 @@ decl_event! { AccountId = ::AccountId, ProxyType = ::ProxyType { - /// A proxy was executed correctly, with the given result. + /// A proxy was executed correctly, with the given [result]. ProxyExecuted(DispatchResult), - /// Anonymous account (first parameter) has been created by new proxy (second) with given - /// disambiguation index and proxy type. + /// Anonymous account has been created by new proxy with given + /// disambiguation index and proxy type. [anonymous, who, proxy_type, disambiguation_index] AnonymousCreated(AccountId, AccountId, ProxyType, u16), } } diff --git a/frame/recovery/src/lib.rs b/frame/recovery/src/lib.rs index 9c7503666a7f4..1c0dd5041380f 100644 --- a/frame/recovery/src/lib.rs +++ b/frame/recovery/src/lib.rs @@ -264,17 +264,21 @@ decl_event! { pub enum Event where AccountId = ::AccountId, { - /// A recovery process has been set up for an account + /// A recovery process has been set up for an [account]. RecoveryCreated(AccountId), - /// A recovery process has been initiated for account_1 by account_2 + /// A recovery process has been initiated for lost account by rescuer account. + /// [lost, rescuer] RecoveryInitiated(AccountId, AccountId), - /// A recovery process for account_1 by account_2 has been vouched for by account_3 + /// A recovery process for lost account by rescuer account has been vouched for by sender. + /// [lost, rescuer, sender] RecoveryVouched(AccountId, AccountId, AccountId), - /// A recovery process for account_1 by account_2 has been closed + /// A recovery process for lost account by rescuer account has been closed. + /// [lost, rescuer] RecoveryClosed(AccountId, AccountId), - /// Account_1 has been successfully recovered by account_2 + /// Lost account has been successfully recovered by rescuer account. + /// [lost, rescuer] AccountRecovered(AccountId, AccountId), - /// A recovery process has been removed for an account + /// A recovery process has been removed for an [account]. RecoveryRemoved(AccountId), } } diff --git a/frame/scheduler/src/lib.rs b/frame/scheduler/src/lib.rs index 12a3997aaf39f..831ed64d438d7 100644 --- a/frame/scheduler/src/lib.rs +++ b/frame/scheduler/src/lib.rs @@ -177,8 +177,11 @@ decl_storage! { decl_event!( pub enum Event where ::BlockNumber { + /// Scheduled some task. [when, index] Scheduled(BlockNumber, u32), + /// Canceled some task. [when, index] Canceled(BlockNumber, u32), + /// Dispatched some task. [task, id, result] Dispatched(TaskAddress, Option>, DispatchResult), } ); diff --git a/frame/session/src/lib.rs b/frame/session/src/lib.rs index 668d9b832889a..2c1cba7137dcc 100644 --- a/frame/session/src/lib.rs +++ b/frame/session/src/lib.rs @@ -484,7 +484,7 @@ decl_storage! { decl_event!( pub enum Event { - /// New session has happened. Note that the argument is the session index, not the block + /// New session has happened. Note that the argument is the [session_index], not the block /// number as the type might suggest. NewSession(SessionIndex), } diff --git a/frame/society/src/lib.rs b/frame/society/src/lib.rs index dc54d72fc8f4d..69ba46c832955 100644 --- a/frame/society/src/lib.rs +++ b/frame/society/src/lib.rs @@ -1111,40 +1111,40 @@ decl_event! { AccountId = ::AccountId, Balance = BalanceOf { - /// The society is founded by the given identity. + /// The society is founded by the given identity. [founder] Founded(AccountId), /// A membership bid just happened. The given account is the candidate's ID and their offer - /// is the second. + /// is the second. [candidate_id, offer] Bid(AccountId, Balance), /// A membership bid just happened by vouching. The given account is the candidate's ID and - /// their offer is the second. The vouching party is the third. + /// their offer is the second. The vouching party is the third. [candidate_id, offer, vouching] Vouch(AccountId, Balance, AccountId), - /// A candidate was dropped (due to an excess of bids in the system). + /// A [candidate] was dropped (due to an excess of bids in the system). AutoUnbid(AccountId), - /// A candidate was dropped (by their request). + /// A [candidate] was dropped (by their request). Unbid(AccountId), - /// A candidate was dropped (by request of who vouched for them). + /// A [candidate] was dropped (by request of who vouched for them). Unvouch(AccountId), /// A group of candidates have been inducted. The batch's primary is the first value, the - /// batch in full is the second. + /// batch in full is the second. [primary, candidates] Inducted(AccountId, Vec), - /// A suspended member has been judged + /// A suspended member has been judged. [who, judged] SuspendedMemberJudgement(AccountId, bool), - /// A candidate has been suspended + /// A [candidate] has been suspended CandidateSuspended(AccountId), - /// A member has been suspended + /// A [member] has been suspended MemberSuspended(AccountId), - /// A member has been challenged + /// A [member] has been challenged Challenged(AccountId), - /// A vote has been placed (candidate, voter, vote) + /// A vote has been placed [candidate, voter, vote] Vote(AccountId, AccountId, bool), - /// A vote has been placed for a defending member (voter, vote) + /// A vote has been placed for a defending member [voter, vote] DefenderVote(AccountId, bool), - /// A new max member count has been set + /// A new [max] member count has been set NewMaxMembers(u32), - /// Society is unfounded. + /// Society is unfounded. [founder] Unfounded(AccountId), - /// Some funds were deposited into the society account. + /// Some funds were deposited into the society account. [value] Deposit(Balance), } } diff --git a/frame/staking/src/lib.rs b/frame/staking/src/lib.rs index f90ba176e857e..be07c7e18a4f4 100644 --- a/frame/staking/src/lib.rs +++ b/frame/staking/src/lib.rs @@ -1238,28 +1238,30 @@ decl_storage! { decl_event!( pub enum Event where Balance = BalanceOf, ::AccountId { /// The era payout has been set; the first balance is the validator-payout; the second is - /// the remainder from the maximum amount of reward. + /// the remainder from the maximum amount of reward. + /// [era_index, validator_payout, remainder] EraPayout(EraIndex, Balance, Balance), - /// The staker has been rewarded by this amount. `AccountId` is the stash account. + /// The staker has been rewarded by this amount. [stash, amount] Reward(AccountId, Balance), - /// One validator (and its nominators) has been slashed by the given amount. + /// One validator (and its nominators) has been slashed by the given amount. + /// [validator, amount] Slash(AccountId, Balance), /// An old slashing report from a prior era was discarded because it could - /// not be processed. + /// not be processed. [session_index] OldSlashingReportDiscarded(SessionIndex), - /// A new set of stakers was elected with the given computation method. + /// A new set of stakers was elected with the given [compute]. StakingElection(ElectionCompute), - /// A new solution for the upcoming election has been stored. + /// A new solution for the upcoming election has been stored. [compute] SolutionStored(ElectionCompute), - /// An account has bonded this amount. + /// An account has bonded this amount. [stash, amount] /// /// NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably, /// it will not be emitted for staking rewards when they are added to stake. Bonded(AccountId, Balance), - /// An account has unbonded this amount. + /// An account has unbonded this amount. [stash, amount] Unbonded(AccountId, Balance), /// An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance` - /// from the unlocking queue. + /// from the unlocking queue. [stash, amount] Withdrawn(AccountId, Balance), } ); diff --git a/frame/sudo/src/lib.rs b/frame/sudo/src/lib.rs index cf55d9e67f31b..0f614a46467f4 100644 --- a/frame/sudo/src/lib.rs +++ b/frame/sudo/src/lib.rs @@ -210,11 +210,11 @@ decl_module! { decl_event!( pub enum Event where AccountId = ::AccountId { - /// A sudo just took place. + /// A sudo just took place. [result] Sudid(DispatchResult), - /// The sudoer just switched identity; the old key is supplied. + /// The [sudoer] just switched identity; the old key is supplied. KeyChanged(AccountId), - /// A sudo just took place. + /// A sudo just took place. [result] SudoAsDone(bool), } ); diff --git a/frame/system/src/lib.rs b/frame/system/src/lib.rs index ad68e97d462ad..0852bdd253fe5 100644 --- a/frame/system/src/lib.rs +++ b/frame/system/src/lib.rs @@ -494,15 +494,15 @@ decl_storage! { decl_event!( /// Event for the System module. pub enum Event where AccountId = ::AccountId { - /// An extrinsic completed successfully. + /// An extrinsic completed successfully. [info] ExtrinsicSuccess(DispatchInfo), - /// An extrinsic failed. + /// An extrinsic failed. [error, info] ExtrinsicFailed(DispatchError, DispatchInfo), /// `:code` was updated. CodeUpdated, - /// A new account was created. + /// A new [account] was created. NewAccount(AccountId), - /// An account was reaped. + /// An [account] was reaped. KilledAccount(AccountId), } ); diff --git a/frame/treasury/src/lib.rs b/frame/treasury/src/lib.rs index 05e4c3c9ef1ab..af8d4a3cd0c2b 100644 --- a/frame/treasury/src/lib.rs +++ b/frame/treasury/src/lib.rs @@ -277,27 +277,27 @@ decl_event!( ::AccountId, ::Hash, { - /// New proposal. + /// New proposal. [proposal_index] Proposed(ProposalIndex), - /// We have ended a spend period and will now allocate funds. + /// We have ended a spend period and will now allocate funds. [budget_remaining] Spending(Balance), - /// Some funds have been allocated. + /// Some funds have been allocated. [proposal_index, award, beneficiary] Awarded(ProposalIndex, Balance, AccountId), - /// A proposal was rejected; funds were slashed. + /// A proposal was rejected; funds were slashed. [proposal_index, slashed] Rejected(ProposalIndex, Balance), - /// Some of our funds have been burnt. + /// Some of our funds have been burnt. [burn] Burnt(Balance), - /// Spending has finished; this is the amount that rolls over until next spend. + /// Spending has finished; this is the amount that rolls over until next spend. [budget_remaining] Rollover(Balance), - /// Some funds have been deposited. + /// Some funds have been deposited. [deposit] Deposit(Balance), - /// A new tip suggestion has been opened. + /// A new tip suggestion has been opened. [tip_hash] NewTip(Hash), - /// A tip suggestion has reached threshold and is closing. + /// A tip suggestion has reached threshold and is closing. [tip_hash] TipClosing(Hash), - /// A tip suggestion has been closed. + /// A tip suggestion has been closed. [tip_hash, who, payout] TipClosed(Hash, AccountId, Balance), - /// A tip suggestion has been retracted. + /// A tip suggestion has been retracted. [tip_hash] TipRetracted(Hash), } ); diff --git a/frame/utility/src/lib.rs b/frame/utility/src/lib.rs index 0b2697f4e4ef0..cf2ea9119b973 100644 --- a/frame/utility/src/lib.rs +++ b/frame/utility/src/lib.rs @@ -102,7 +102,7 @@ decl_event! { /// Events type. pub enum Event { /// Batch of dispatches did not complete fully. Index of first failing dispatch given, as - /// well as the error. + /// well as the error. [index, error] BatchInterrupted(u32, DispatchError), /// Batch of dispatches completed fully with no error. BatchCompleted, diff --git a/frame/vesting/src/lib.rs b/frame/vesting/src/lib.rs index 3c4e95d4906d8..c521af1e03c59 100644 --- a/frame/vesting/src/lib.rs +++ b/frame/vesting/src/lib.rs @@ -171,9 +171,10 @@ decl_storage! { decl_event!( pub enum Event where AccountId = ::AccountId, Balance = BalanceOf { /// The amount vested has been updated. This could indicate more funds are available. The - /// balance given is the amount which is left unvested (and thus locked). + /// balance given is the amount which is left unvested (and thus locked). + /// [account, unvested] VestingUpdated(AccountId, Balance), - /// An account (given) has become fully vested. No further vesting can happen. + /// An [account] has become fully vested. No further vesting can happen. VestingCompleted(AccountId), } );