Skip to content

Commit

Permalink
Removed getters in channel-commission. (#1404)
Browse files Browse the repository at this point in the history
  • Loading branch information
MJLNSN authored Sep 3, 2024
1 parent 7ec6731 commit 7e5beea
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions pallets/channel-commission/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,11 @@ pub mod pallet {

/// Auto increment channel id
#[pallet::storage]
#[pallet::getter(fn channel_next_id)]
pub type ChannelNextId<T: Config> = StorageValue<_, ChannelId, ValueQuery>;

/// Mapping a channel id to a receive account and a name, 【channel_id =>(receive_account,
/// name)】
#[pallet::storage]
#[pallet::getter(fn channels)]
pub type Channels<T: Config> = StorageMap<
_,
Blake2_128Concat,
Expand All @@ -209,13 +207,11 @@ pub mod pallet {

/// Mapping a vtoken to a commission token, 【vtoken => commission_token】
#[pallet::storage]
#[pallet::getter(fn commission_tokens)]
pub type CommissionTokens<T> = StorageMap<_, Blake2_128Concat, CurrencyId, CurrencyId>;

/// Mapping a channel + vtoken to corresponding commission rate, 【(channel_id, vtoken) =>
/// commission rate】
#[pallet::storage]
#[pallet::getter(fn channel_commission_token_rates)]
pub type ChannelCommissionTokenRates<T> = StorageDoubleMap<
_,
Blake2_128Concat,
Expand All @@ -228,7 +224,6 @@ pub mod pallet {

/// Mapping a channel + vtoken to corresponding channel share, 【(channel_id, vtoken) => share】
#[pallet::storage]
#[pallet::getter(fn channel_vtoken_shares)]
pub type ChannelVtokenShares<T> = StorageDoubleMap<
_,
Blake2_128Concat,
Expand All @@ -242,28 +237,24 @@ pub mod pallet {
/// 【vtoken => (old_issuance, new_issuance)】,old_issuance is the vtoken issuance at last
/// clearing point, new_issuance is the ongoing accumulative issuance the last clearing point
#[pallet::storage]
#[pallet::getter(fn vtoken_issuance_snapshots)]
pub type VtokenIssuanceSnapshots<T> =
StorageMap<_, Blake2_128Concat, CurrencyId, (BalanceOf<T>, BalanceOf<T>), ValueQuery>;

/// Vtoken total minted amount in the ongoing period for the chain, 【vtoken => (old_total_mint,
/// new_total_mint)】
#[pallet::storage]
#[pallet::getter(fn period_vtoken_total_mint)]
pub type PeriodVtokenTotalMint<T> =
StorageMap<_, Blake2_128Concat, CurrencyId, (BalanceOf<T>, BalanceOf<T>), ValueQuery>;

/// Vtoken total redeemed amount in the ongoing period for the chain, 【vtoken =>
/// (old_total_redeem, new_total_redeem)】
#[pallet::storage]
#[pallet::getter(fn period_vtoken_total_redeem)]
pub type PeriodVtokenTotalRedeem<T> =
StorageMap<_, Blake2_128Concat, CurrencyId, (BalanceOf<T>, BalanceOf<T>), ValueQuery>;

/// Vtoken minted amount in the ongoing period for the channel, 【(channel_id, vtoken) =>
/// (old_mint_amount, new_mint_amount)】
#[pallet::storage]
#[pallet::getter(fn period_channel_vtoken_mint)]
pub type PeriodChannelVtokenMint<T> = StorageDoubleMap<
_,
Blake2_128Concat,
Expand All @@ -277,20 +268,17 @@ pub mod pallet {
/// Commission pool for last period and ongoing period, 【commission token => (old_amount,
/// new_amount)】
#[pallet::storage]
#[pallet::getter(fn period_total_commissions)]
pub type PeriodTotalCommissions<T> =
StorageMap<_, Blake2_128Concat, CurrencyId, (BalanceOf<T>, BalanceOf<T>), ValueQuery>;

/// Commission amount that has been cleared for the current clearing process, 【commission token
/// => amount】
#[pallet::storage]
#[pallet::getter(fn period_cleared_commissions)]
pub type PeriodClearedCommissions<T> =
StorageMap<_, Blake2_128Concat, CurrencyId, BalanceOf<T>, ValueQuery>;

/// Commission amount to be claimed by channels, 【channel id + commission token => amount】
#[pallet::storage]
#[pallet::getter(fn channel_claimable_commissions)]
pub type ChannelClaimableCommissions<T> = StorageDoubleMap<
_,
Blake2_128Concat,
Expand Down

0 comments on commit 7e5beea

Please sign in to comment.