keeper

package
v0.5.6-x.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

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

func (k WrappedBankKeeper) BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error

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 sdk.Context) log.Logger

Logger returns a module-specific logger.

func (WrappedBankKeeper) MintCoins

func (k WrappedBankKeeper) MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL