Skip to content

Commit

Permalink
Update event name mapping (#1203)
Browse files Browse the repository at this point in the history
* update event name

* fix
  • Loading branch information
xlc authored Jul 13, 2021
1 parent 7926f43 commit ae1dba9
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 7 deletions.
1 change: 1 addition & 0 deletions modules/auction-manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ pub mod module {

#[pallet::event]
#[pallet::generate_deposit(pub(crate) fn deposit_event)]
#[pallet::metadata(T::AccountId = "AccountId")]
pub enum Event<T: Config> {
/// Collateral auction created. \[auction_id, collateral_type,
/// collateral_amount, target_bid_price\]
Expand Down
1 change: 1 addition & 0 deletions modules/cdp-engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ pub mod module {

#[pallet::event]
#[pallet::generate_deposit(pub(crate) fn deposit_event)]
#[pallet::metadata(T::AccountId = "AccountId", Option<Rate> = "OptionRate", Option<Ratio> = "OptionRatio")]
pub enum Event<T: Config> {
/// Liquidate the unsafe CDP. \[collateral_type, owner,
/// collateral_amount, bad_debt_value, liquidation_strategy\]
Expand Down
7 changes: 6 additions & 1 deletion modules/collator-selection/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,18 @@ pub mod pallet {
}

#[pallet::event]
#[pallet::metadata(T::AccountId = "AccountId", BalanceOf<T> = "Balance")]
#[pallet::generate_deposit(pub(super) fn deposit_event)]
#[pallet::metadata(T::AccountId = "AccountId", Vec<T::AccountId> = "Vec<AccountId>", BalanceOf<T> = "Balance")]
pub enum Event<T: Config> {
/// Invulnurable was updated. \[new_invulnerables\]
NewInvulnerables(Vec<T::AccountId>),
/// Desired candidates was updated. \[new_desired_candidates\]
NewDesiredCandidates(u32),
/// Candidacy bond was updated. \[new_candidacy_bond\]
NewCandidacyBond(BalanceOf<T>),
/// A candidate was added. \[who, bond\]
CandidateAdded(T::AccountId, BalanceOf<T>),
/// A candidate was removed. \[who\]
CandidateRemoved(T::AccountId),
}

Expand Down
9 changes: 5 additions & 4 deletions modules/currencies/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,15 @@ pub mod module {

#[pallet::event]
#[pallet::generate_deposit(pub(crate) fn deposit_event)]
#[pallet::metadata(T::AccountId = "AccountId", BalanceOf<T> = "Balance", CurrencyIdOf<T> = "CurrencyId")]
pub enum Event<T: Config> {
/// Currency transfer success. [currency_id, from, to, amount]
/// Currency transfer success. \[currency_id, from, to, amount\]
Transferred(CurrencyIdOf<T>, T::AccountId, T::AccountId, BalanceOf<T>),
/// Update balance success. [currency_id, who, amount]
/// Update balance success. \[currency_id, who, amount\]
BalanceUpdated(CurrencyIdOf<T>, T::AccountId, AmountOf<T>),
/// Deposit success. [currency_id, who, amount]
/// Deposit success. \[currency_id, who, amount\]
Deposited(CurrencyIdOf<T>, T::AccountId, BalanceOf<T>),
/// Withdraw success. [currency_id, who, amount]
/// Withdraw success. \[currency_id, who, amount\]
Withdrawn(CurrencyIdOf<T>, T::AccountId, BalanceOf<T>),
}

Expand Down
1 change: 1 addition & 0 deletions modules/dex/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ pub mod module {

#[pallet::event]
#[pallet::generate_deposit(pub(crate) fn deposit_event)]
#[pallet::metadata(T::AccountId = "AccountId")]
pub enum Event<T: Config> {
/// add provision success \[who, currency_id_0, contribution_0,
/// currency_id_1, contribution_1\]
Expand Down
1 change: 1 addition & 0 deletions modules/emergency-shutdown/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ pub mod module {

#[pallet::event]
#[pallet::generate_deposit(fn deposit_event)]
#[pallet::metadata(T::AccountId = "AccountId", T::BlockNumber = "BlockNumber")]
pub enum Event<T: Config> {
/// Emergency shutdown occurs. \[block_number\]
Shutdown(T::BlockNumber),
Expand Down
1 change: 1 addition & 0 deletions modules/evm-accounts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ pub mod module {

#[pallet::event]
#[pallet::generate_deposit(fn deposit_event)]
#[pallet::metadata(T::AccountId = "AccountId")]
pub enum Event<T: Config> {
/// Mapping between Substrate accounts and EVM accounts
/// claim account. \[account_id, evm_address\]
Expand Down
1 change: 1 addition & 0 deletions modules/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ pub mod module {
/// EVM events
#[pallet::event]
#[pallet::generate_deposit(pub(crate) fn deposit_event)]
#[pallet::metadata(T::AccountId = "AccountId")]
pub enum Event<T: Config> {
/// Ethereum events from contracts.
Log(Log),
Expand Down
1 change: 1 addition & 0 deletions modules/homa-validator-list/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ pub mod module {

#[pallet::event]
#[pallet::generate_deposit(pub(crate) fn deposit_event)]
#[pallet::metadata(T::AccountId = "AccountId", T::RelaychainAccountId = "RelaychainAccountId")]
pub enum Event<T: Config> {
FreezeValidator(T::RelaychainAccountId),
ThawValidator(T::RelaychainAccountId),
Expand Down
1 change: 1 addition & 0 deletions modules/honzon/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ pub mod module {

#[pallet::event]
#[pallet::generate_deposit(fn deposit_event)]
#[pallet::metadata(T::AccountId = "AccountId")]
pub enum Event<T: Config> {
/// Authorize someone to operate the loan of specific collateral.
/// \[authorizer, authorizee, collateral_type\]
Expand Down
1 change: 1 addition & 0 deletions modules/incentives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ pub mod module {

#[pallet::event]
#[pallet::generate_deposit(pub(crate) fn deposit_event)]
#[pallet::metadata(T::AccountId = "AccountId", PoolId<T::RelaychainAccountId> = "PoolId")]
pub enum Event<T: Config> {
/// Deposit DEX share. \[who, dex_share_type, deposit_amount\]
DepositDexShare(T::AccountId, CurrencyId, Balance),
Expand Down
1 change: 1 addition & 0 deletions modules/loans/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ pub mod module {

#[pallet::event]
#[pallet::generate_deposit(pub(crate) fn deposit_event)]
#[pallet::metadata(T::AccountId = "AccountId")]
pub enum Event<T: Config> {
/// Position updated. \[owner, collateral_type, collateral_adjustment,
/// debit_adjustment\]
Expand Down
1 change: 1 addition & 0 deletions modules/nft/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ pub mod module {

#[pallet::event]
#[pallet::generate_deposit(pub(crate) fn deposit_event)]
#[pallet::metadata(T::AccountId = "AccountId", ClassIdOf<T> = "ClassId", TokenIdOf<T> = "TokenId", T::Hash = "Hash")]
pub enum Event<T: Config> {
/// Created NFT class. \[owner, class_id\]
CreatedClass(T::AccountId, ClassIdOf<T>),
Expand Down
3 changes: 2 additions & 1 deletion modules/nominees-election/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,9 @@ pub mod module {

#[pallet::event]
#[pallet::generate_deposit(pub(crate) fn deposit_event)]
#[pallet::metadata(T::AccountId = "AccountId")]
pub enum Event<T: Config<I>, I: 'static = ()> {
/// rebond. [who, amount]
/// rebond. \[who, amount\]
Rebond(T::AccountId, Balance),
}

Expand Down
1 change: 1 addition & 0 deletions modules/staking-pool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ pub mod module {

#[pallet::event]
#[pallet::generate_deposit(pub(crate) fn deposit_event)]
#[pallet::metadata(T::AccountId = "AccountId")]
pub enum Event<T: Config> {
/// Deposit staking currency(DOT) to staking pool and issue liquid
/// currency(LDOT). \[who, staking_amount_deposited,
Expand Down
2 changes: 1 addition & 1 deletion orml

0 comments on commit ae1dba9

Please sign in to comment.