Skip to content

Commit

Permalink
Deposit Minted event for issuing new balances to the mining assets' p…
Browse files Browse the repository at this point in the history
  • Loading branch information
liuchengxu authored Dec 1, 2020
1 parent 36eb002 commit af6b803
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions xpallets/mining/asset/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,5 +304,6 @@ impl<T: Trait> xp_mining_staking::AssetMining<BalanceOf<T>> for Module<T> {
fn reward(asset_id: AssetId, value: BalanceOf<T>) {
let reward_pot = T::DetermineRewardPotAccount::reward_pot_account_for(&asset_id);
<T as xpallet_assets::Trait>::Currency::deposit_creating(&reward_pot, value);
Self::deposit_event(Event::<T>::Minted(reward_pot, value));
}
}
2 changes: 2 additions & 0 deletions xpallets/mining/asset/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ decl_event!(
{
/// An asset miner claimed the mining reward. [claimer, asset_id, amount]
Claimed(AccountId, AssetId, Balance),
/// Issue new balance to the reward pot. [reward_pot_account, amount]
Minted(AccountId, Balance),
}
);

Expand Down

0 comments on commit af6b803

Please sign in to comment.