Documentation ¶
Index ¶
- Variables
- func NewQuerier(k Keeper) sdk.Querier
- func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
- type Keeper
- func (k Keeper) BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) sdk.Error
- func (k Keeper) DelegateCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.CUAddress, recipientModule string, ...) (sdk.Result, sdk.Error)
- func (k Keeper) GetModuleAccount(ctx sdk.Context, moduleName string) exported.ModuleAccountI
- func (k Keeper) GetModuleAccountAndPermissions(ctx sdk.Context, moduleName string) (exported.ModuleAccountI, []string)
- func (k Keeper) GetModuleAddress(moduleName string) sdk.CUAddress
- func (k Keeper) GetModuleAddressAndPermissions(moduleName string) (addr sdk.CUAddress, permissions []string)
- func (k Keeper) GetSupply(ctx sdk.Context) (supply exported.SupplyI)
- func (k *Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) sdk.Error
- func (k Keeper) SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.CUAddress, recipientModule string, ...) (sdk.Result, sdk.Error)
- func (k Keeper) SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.CUAddress, ...) (sdk.Result, sdk.Error)
- func (k Keeper) SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) (sdk.Result, sdk.Error)
- func (k Keeper) SetModuleAccount(ctx sdk.Context, macc exported.ModuleAccountI)
- func (k *Keeper) SetSupply(ctx sdk.Context, supply exported.SupplyI)
- func (k *Keeper) SetTransferKeeper(transferKeeper types.TransferKeeper)
- func (k Keeper) UndelegateCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.CUAddress, ...) (sdk.Result, sdk.Error)
- func (k *Keeper) ValidatePermissions(macc exported.ModuleAccountI) error
Constants ¶
This section is empty.
Variables ¶
var DefaultCodespace sdk.CodespaceType = types.ModuleName
DefaultCodespace from the supply module
var (
SupplyKey = []byte{0x00}
)
Keys for supply store Items are stored with the following key: values
- 0x00: Supply
Functions ¶
func NewQuerier ¶
NewQuerier creates a querier for supply REST endpoints
func RegisterInvariants ¶
func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
RegisterInvariants register all supply invariants
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of the supply store
func NewKeeper ¶
func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, ck types.CUKeeper, tk types.TransferKeeper, maccPerms map[string][]string) *Keeper
NewKeeper creates a new Keeper instance
func (Keeper) BurnCoins ¶
BurnCoins burns coins deletes coins from the balance of the module CU. Panics if the name maps to a non-burner module CU or if the amount is invalid.
func (Keeper) DelegateCoinsFromAccountToModule ¶
func (k Keeper) DelegateCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.CUAddress, recipientModule string, amt sdk.Coins) (sdk.Result, sdk.Error)
DelegateCoinsFromAccountToModule delegates coins and transfers them from a delegator CU to a module CU
func (Keeper) GetModuleAccount ¶
GetModuleAccount gets the module CustodianUnit from the auth CustodianUnit store
func (Keeper) GetModuleAccountAndPermissions ¶
func (k Keeper) GetModuleAccountAndPermissions(ctx sdk.Context, moduleName string) (exported.ModuleAccountI, []string)
GetModuleAccountAndPermissions gets the module CustodianUnit from the auth CustodianUnit store and its registered permissions
func (Keeper) GetModuleAddress ¶
GetModuleAddress returns an address based on the module name
func (Keeper) GetModuleAddressAndPermissions ¶
func (k Keeper) GetModuleAddressAndPermissions(moduleName string) (addr sdk.CUAddress, permissions []string)
GetModuleAddressAndPermissions returns an address and permissions based on the module name
func (Keeper) MintCoins ¶
MintCoins creates new coins from thin air and adds it to the module CU. Panics if the name maps to a non-minter module CU or if the amount is invalid.
func (Keeper) SendCoinsFromAccountToModule ¶
func (k Keeper) SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.CUAddress, recipientModule string, amt sdk.Coins) (sdk.Result, sdk.Error)
SendCoinsFromAccountToModule transfers coins from an CUAddress to a ModuleAccount
func (Keeper) SendCoinsFromModuleToAccount ¶
func (k Keeper) SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.CUAddress, amt sdk.Coins) (sdk.Result, sdk.Error)
SendCoinsFromModuleToAccount transfers coins from a ModuleAccount to an CUAddress
func (Keeper) SendCoinsFromModuleToModule ¶
func (k Keeper) SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) (sdk.Result, sdk.Error)
SendCoinsFromModuleToModule transfers coins from a ModuleAccount to another
func (Keeper) SetModuleAccount ¶
func (k Keeper) SetModuleAccount(ctx sdk.Context, macc exported.ModuleAccountI)
SetModuleAccount sets the module CustodianUnit to the auth CustodianUnit store
func (*Keeper) SetTransferKeeper ¶
func (k *Keeper) SetTransferKeeper(transferKeeper types.TransferKeeper)
func (Keeper) UndelegateCoinsFromModuleToAccount ¶
func (k Keeper) UndelegateCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.CUAddress, amt sdk.Coins) (sdk.Result, sdk.Error)
UndelegateCoinsFromModuleToAccount undelegates the unbonding coins and transfers them from a module CU to the delegator CU
func (*Keeper) ValidatePermissions ¶
func (k *Keeper) ValidatePermissions(macc exported.ModuleAccountI) error
ValidatePermissions validates that the module CustodianUnit has been granted permissions within its set of allowed permissions.