supply

package
v0.0.0-...-81ad42b Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: GPL-3.0 Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WrappedSupplyKeeper

type WrappedSupplyKeeper struct {
	supply.Keeper
	// contains filtered or unexported fields
}

WrappedSupplyKeeper encapsulates the underlying supply 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 supply-distr, distrKeeper cannot be initialized when the struct is created. Rather, SetDistrKeeper is expected to be called to set `distrKeeper`.

func WrapSupplyKeeperBurnToCommunityPool

func WrapSupplyKeeperBurnToCommunityPool(sk supply.Keeper) WrappedSupplyKeeper

WrapSupplyKeeperBurnToCommunityPool creates a new instance of WrappedSupplyKeeper with its distrKeeper member set to nil.

func (WrappedSupplyKeeper) BurnCoins

func (k WrappedSupplyKeeper) 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 supply of the coins will not change.

func (WrappedSupplyKeeper) Logger

func (k WrappedSupplyKeeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

func (*WrappedSupplyKeeper) SetDistrKeeper

func (k *WrappedSupplyKeeper) SetDistrKeeper(distrKeeper *distr.Keeper)

SetDistrKeeper sets distr module keeper for this WrappedSupplyKeeper instance.

Jump to

Keyboard shortcuts

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