Documentation ¶
Index ¶
- type WrappedBankKeeper
- func (k WrappedBankKeeper) BurnCoins(ctx context.Context, moduleName string, amt sdk.Coins) error
- func (k WrappedBankKeeper) Logger(ctx context.Context) log.Logger
- func (k WrappedBankKeeper) MintCoins(ctx context.Context, moduleName string, amt sdk.Coins) error
- func (k *WrappedBankKeeper) SetDistrKeeper(dk types.DistributionKeeper)
- func (k *WrappedBankKeeper) SetMintKeeper(mintKeeper types.MintKeeper)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WrappedBankKeeper ¶
type WrappedBankKeeper struct { bankkeeper.Keeper // contains filtered or unexported fields }
WrappedBankKeeper encapsulates the underlying bank keeper and overrides its BurnCoins function to send the coins to the community pool instead of just destroying them.
Note that distrKeeper keeps the reference to the distr module keeper. Due to the circular dependency between bank-distr, distrKeeper cannot be initialized when the struct is created. Rather, SetDistrKeeper and SetAccountKeeper are expected to be called to set `distrKeeper` and `accountKeeper` respectively.
func NewWrappedBankKeeperBurnToCommunityPool ¶
func NewWrappedBankKeeperBurnToCommunityPool(bk bankkeeper.Keeper, acc types.AccountKeeper) WrappedBankKeeper
NewWrappedBankKeeperBurnToCommunityPool creates a new instance of WrappedBankKeeper with its distrKeeper and accountKeeper members set to nil.
func (WrappedBankKeeper) BurnCoins ¶
BurnCoins moves the specified amount of coins from the given module name to the community pool. The total bank of the coins will not change.
func (WrappedBankKeeper) Logger ¶
func (k WrappedBankKeeper) Logger(ctx context.Context) log.Logger
Logger returns a module-specific logger.
func (WrappedBankKeeper) MintCoins ¶
MintCoins does not create any new coins, just gets them from the community pull
func (*WrappedBankKeeper) SetDistrKeeper ¶
func (k *WrappedBankKeeper) SetDistrKeeper(dk types.DistributionKeeper)
SetDistrKeeper sets distr module keeper for this WrappedBankKeeper instance.
func (*WrappedBankKeeper) SetMintKeeper ¶
func (k *WrappedBankKeeper) SetMintKeeper(mintKeeper types.MintKeeper)