keeper

package
v2.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 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) SetDistrKeeper

func (k *WrappedBankKeeper) SetDistrKeeper(dk types.DistributionKeeper)

SetDistrKeeper sets distr module keeper for this WrappedBankKeeper instance.

Jump to

Keyboard shortcuts

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