Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotated parameter names for events #317

Merged
merged 1 commit into from
Jul 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions ecosystem-modules/ren/renvm-bridge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ decl_event!(
<T as system::Trait>::AccountId,
DestAddress = [u8; 20],
{
/// Asset minted (owner, amount)
/// Asset minted. [owner, amount]
Minted(AccountId, Balance),
/// Asset burnt in this chain (owner, dest, amount)
/// Asset burnt in this chain [owner, dest, amount]
Burnt(AccountId, DestAddress, Balance),
}
);
Expand Down
2 changes: 2 additions & 0 deletions modules/airdrop/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ decl_event!(
AirDropCurrencyId = AirDropCurrencyId,
Balance = Balance,
{
/// [to, currency_id, amount]
Airdrop(AccountId, AirDropCurrencyId, Balance),
/// [to, currency_id, amount]
UpdateAirdrop(AccountId, AirDropCurrencyId, Balance),
}
);
Expand Down
16 changes: 8 additions & 8 deletions modules/auction_manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,21 +145,21 @@ decl_event!(
CurrencyId = CurrencyId,
Balance = Balance,
{
/// Create a collateral auction (auction_id, collateral_type, collateral_amount, target_bid_price)
/// Create a collateral auction. [auction_id, collateral_type, collateral_amount, target_bid_price]
NewCollateralAuction(AuctionId, CurrencyId, Balance, Balance),
/// Create a debit auction (auction_id, initial_supply_amount, fix_payment_amount)
/// Create a debit auction. [auction_id, initial_supply_amount, fix_payment_amount]
NewDebitAuction(AuctionId, Balance, Balance),
/// Create a surplus auction (auction_id, fix_surplus_amount)
/// Create a surplus auction. [auction_id, fix_surplus_amount]
NewSurplusAuction(AuctionId, Balance),
/// Cancel a specific active auction (auction_id)
/// Cancel a specific active auction. [auction_id]
CancelAuction(AuctionId),
/// Collateral auction dealed (auction_id, collateral_type, collateral_amount, winner, payment_amount).
/// Collateral auction dealed. [auction_id, collateral_type, collateral_amount, winner, payment_amount]
CollateralAuctionDealed(AuctionId, CurrencyId, Balance, AccountId, Balance),
/// Surplus auction dealed (auction_id, surplus_amount, winner, payment_amount).
/// Surplus auction dealed. [auction_id, surplus_amount, winner, payment_amount]
SurplusAuctionDealed(AuctionId, Balance, AccountId, Balance),
/// Debit auction dealed (auction_id, debit_currency_amount, winner, payment_amount).
/// Debit auction dealed. [auction_id, debit_currency_amount, winner, payment_amount]
DebitAuctionDealed(AuctionId, Balance, AccountId, Balance),
/// Dex take collateral auction (auction_id, collateral_type, collateral_amount, turnover)
/// Dex take collateral auction. [auction_id, collateral_type, collateral_amount, turnover]
DEXTakeCollateralAuction(AuctionId, CurrencyId, Balance, Balance),
}
);
Expand Down
16 changes: 8 additions & 8 deletions modules/cdp_engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,21 +140,21 @@ decl_event!(
CurrencyId = CurrencyId,
Balance = Balance,
{
/// Liquidate the unsafe CDP (collateral_type, owner, collateral_amount, bad_debt_value, liquidation_strategy)
/// Liquidate the unsafe CDP. [collateral_type, owner, collateral_amount, bad_debt_value, liquidation_strategy]
LiquidateUnsafeCDP(CurrencyId, AccountId, Balance, Balance, LiquidationStrategy),
/// Settle the CDP has debit (collateral_type, owner)
/// Settle the CDP has debit. [collateral_type, owner]
SettleCDPInDebit(CurrencyId, AccountId),
/// The stability fee for specific collateral type updated (collateral_type, new_stability_fee)
/// The stability fee for specific collateral type updated. [collateral_type, new_stability_fee]
StabilityFeeUpdated(CurrencyId, Option<Rate>),
/// The liquidation fee for specific collateral type updated (collateral_type, new_liquidation_ratio)
/// The liquidation fee for specific collateral type updated. [collateral_type, new_liquidation_ratio]
LiquidationRatioUpdated(CurrencyId, Option<Ratio>),
/// The liquidation penalty rate for specific collateral type updated (collateral_type, new_liquidation_panelty)
/// The liquidation penalty rate for specific collateral type updated. [collateral_type, new_liquidation_panelty]
LiquidationPenaltyUpdated(CurrencyId, Option<Rate>),
/// The required collateral penalty rate for specific collateral type updated (collateral_type, new_required_collateral_ratio)
/// The required collateral penalty rate for specific collateral type updated. [collateral_type, new_required_collateral_ratio]
RequiredCollateralRatioUpdated(CurrencyId, Option<Ratio>),
/// The hard cap of total debit value for specific collateral type updated (collateral_type, new_total_debit_value)
/// The hard cap of total debit value for specific collateral type updated. [collateral_type, new_total_debit_value]
MaximumTotalDebitValueUpdated(CurrencyId, Balance),
/// The global stability fee for all types of collateral updated (new_global_stability_fee)
/// The global stability fee for all types of collateral updated. [new_global_stability_fee]
GlobalStabilityFeeUpdated(Rate),
}
);
Expand Down
10 changes: 5 additions & 5 deletions modules/cdp_treasury/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ pub trait Trait: system::Trait {

decl_event!(
pub enum Event {
/// The fixed size for surplus auction updated (new_size)
/// The fixed size for surplus auction updated. [new_size]
SurplusAuctionFixedSizeUpdated(Balance),
/// The buffer size of surplus pool updated (new_size)
/// The buffer size of surplus pool updated. [new_size]
SurplusBufferSizeUpdated(Balance),
/// The initial supply amount of a debit auction updated (new_amount)
/// The initial supply amount of a debit auction updated. [new_amount]
InitialAmountPerDebitAuctionUpdated(Balance),
/// The fixed size for debit auction updated (new_size)
/// The fixed size for debit auction updated. [new_size]
DebitAuctionFixedSizeUpdated(Balance),
/// The fixed size for collateral auction under specific collateral type updated (collateral_type, new_size)
/// The fixed size for collateral auction under specific collateral type updated. [collateral_type, new_size]
CollateralAuctionMaximumSizeUpdated(CurrencyId, Balance),
}
);
Expand Down
10 changes: 5 additions & 5 deletions modules/dex/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ decl_event!(
Balance = Balance,
CurrencyId = CurrencyId,
{
/// Add liquidity success (who, currency_type, added_currency_amount, added_base_currency_amount, increment_share_amount)
/// Add liquidity success. [who, currency_type, added_currency_amount, added_base_currency_amount, increment_share_amount]
AddLiquidity(AccountId, CurrencyId, Balance, Balance, Share),
/// Withdraw liquidity from the trading pool success (who, currency_type, withdrawn_currency_amount, withdrawn_base_currency_amount, burned_share_amount)
/// Withdraw liquidity from the trading pool success. [who, currency_type, withdrawn_currency_amount, withdrawn_base_currency_amount, burned_share_amount]
WithdrawLiquidity(AccountId, CurrencyId, Balance, Balance, Share),
/// Use supply currency to swap target currency (trader, supply_currency_type, supply_currency_amount, target_currency_type, target_currency_amount)
/// Use supply currency to swap target currency. [trader, supply_currency_type, supply_currency_amount, target_currency_type, target_currency_amount]
Swap(AccountId, CurrencyId, Balance, CurrencyId, Balance),
/// Incentive reward rate updated (currency_type, new_rate)
/// Incentive reward rate updated. [currency_type, new_rate]
LiquidityIncentiveRateUpdated(CurrencyId, Rate),
/// Incentive interest claimed (who, currency_type, amount)
/// Incentive interest claimed. [who, currency_type, amount]
IncentiveInterestClaimed(AccountId, CurrencyId, Balance),
}
);
Expand Down
6 changes: 3 additions & 3 deletions modules/emergency_shutdown/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ decl_event!(
Balance = Balance,
CurrencyId = CurrencyId,
{
/// Emergency shutdown occurs (block_number)
/// Emergency shutdown occurs. [block_number]
Shutdown(BlockNumber),
/// The final redemption opened (block_number)
/// The final redemption opened. [block_number]
OpenRefund(BlockNumber),
/// Refund info (caller, stable_coin_amount, refund_list)
/// Refund info. [caller, stable_coin_amount, refund_list]
Refund(AccountId, Balance, Vec<(CurrencyId, Balance)>),
}
);
Expand Down
6 changes: 3 additions & 3 deletions modules/honzon/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ decl_event!(
<T as system::Trait>::AccountId,
CurrencyId = CurrencyId,
{
/// Authorize someone to operate the loan of specific collateral (authorizer, authorizee, collateral_type)
/// Authorize someone to operate the loan of specific collateral. [authorizer, authorizee, collateral_type]
Authorization(AccountId, AccountId, CurrencyId),
/// Cancel the authorization of specific collateral for someone (authorizer, authorizee, collateral_type)
/// Cancel the authorization of specific collateral for someone. [authorizer, authorizee, collateral_type]
UnAuthorization(AccountId, AccountId, CurrencyId),
/// Cancel all authorization (authorizer)
/// Cancel all authorization. [authorizer]
UnAuthorizationAll(AccountId),
}
);
Expand Down
6 changes: 3 additions & 3 deletions modules/loans/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ decl_event!(
Balance = Balance,
CurrencyId = CurrencyId,
{
/// Position updated (owner, collateral_type, collateral_adjustment, debit_adjustment)
/// Position updated. [owner, collateral_type, collateral_adjustment, debit_adjustment]
PositionUpdated(AccountId, CurrencyId, Amount, DebitAmount),
/// Confiscate CDP's collateral assets and eliminate its debit (owner, collateral_type, confiscated_collateral_amount, deduct_debit_amount)
/// Confiscate CDP's collateral assets and eliminate its debit. [owner, collateral_type, confiscated_collateral_amount, deduct_debit_amount]
ConfiscateCollateralAndDebit(AccountId, CurrencyId, Balance, DebitBalance),
/// Transfer loan (from, to)
/// Transfer loan. [from, to, currency_id]
TransferLoan(AccountId, AccountId, CurrencyId),
}
);
Expand Down
1 change: 1 addition & 0 deletions modules/polkadot_bridge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ decl_event!(
<T as system::Trait>::AccountId,
Balance = Balance,
{
/// [account, amount]
Mint(AccountId, Balance),
}
);
Expand Down
4 changes: 2 additions & 2 deletions modules/prices/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ pub trait Trait: system::Trait {

decl_event!(
pub enum Event {
/// Lock price (currency_id, locked_price)
/// Lock price. [currency_id, locked_price]
LockPrice(CurrencyId, Price),
/// Unlock price (currency_id)
/// Unlock price. [currency_id]
UnlockPrice(CurrencyId),
}
);
Expand Down
4 changes: 4 additions & 0 deletions modules/staking_pool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,13 @@ decl_event!(
<T as system::Trait>::AccountId,
Balance = Balance,
{
/// [account, bond, mint]
BondAndMint(AccountId, Balance, Balance),
/// [who, redeem_amount]
RedeemByUnbond(AccountId, Balance),
/// [who, fee, redeem_amount, unbond_amount]
RedeemByFreeUnbonded(AccountId, Balance, Balance, Balance),
/// [who, target_era, fee, redeem_amount, unbond_amount]
RedeemByClaimUnbonding(AccountId, EraIndex, Balance, Balance, Balance),
}
);
Expand Down