Documentation ¶
Index ¶
- type Keeper
- func (k Keeper) AddCoins(ctx sdk.Ctx, addr sdk.Address, amt sdk.Coins) (sdk.Coins, sdk.Error)
- func (k Keeper) BurnCoins(ctx sdk.Ctx, moduleName string, amt sdk.Coins) sdk.Error
- func (k Keeper) Codespace() sdk.CodespaceType
- func (k Keeper) ConvertState(ctx sdk.Ctx)
- func (k Keeper) DecodeAccount(bz []byte, ctx sdk.Ctx) (exported.Account, error)
- func (k Keeper) DecodeBaseAccount(bz []byte, ctx sdk.Ctx) (exported.Account, error)
- func (k Keeper) DecodeModuleAccount(bz []byte, ctx sdk.Ctx) (exported.ModuleAccountI, error)
- func (k Keeper) DecodeSupply(ctx sdk.Ctx, bz []byte) (exported.SupplyI, error)
- func (k Keeper) EncodeAccount(acc exported.Account, ctx sdk.Ctx) ([]byte, error)
- func (k Keeper) EncodeBaseAccount(acc *types.BaseAccount, ctx sdk.Ctx) ([]byte, error)
- func (k Keeper) EncodeModuleAccount(macc *types.ModuleAccount, ctx sdk.Ctx) ([]byte, error)
- func (k Keeper) EncodeSupply(ctx sdk.Ctx, supply exported.SupplyI) ([]byte, error)
- func (k Keeper) GetAccount(ctx sdk.Ctx, addr sdk.Address) exported.Account
- func (k Keeper) GetAllAccounts(ctx sdk.Ctx) []exported.Account
- func (k Keeper) GetAllAccountsExport(ctx sdk.Ctx) []exported.Account
- func (k Keeper) GetCoins(ctx sdk.Ctx, addr sdk.Address) sdk.Coins
- func (k Keeper) GetFee(ctx sdk.Ctx, msg sdk.Msg) sdk.BigInt
- func (k Keeper) GetModuleAccount(ctx sdk.Ctx, moduleName string) exported.ModuleAccountI
- func (k Keeper) GetModuleAccountAndPermissions(ctx sdk.Ctx, moduleName string) (exported.ModuleAccountI, []string)
- func (k Keeper) GetModuleAddress(moduleName string) sdk.Address
- func (k Keeper) GetModuleAddressAndPermissions(moduleName string) (addr sdk.Address, permissions []string)
- func (k Keeper) GetParams(ctx sdk.Ctx) (params types.Params)
- func (k Keeper) GetSupply(ctx sdk.Ctx) (supply exported.SupplyI)
- func (k Keeper) HasCoins(ctx sdk.Ctx, addr sdk.Address, amt sdk.Coins) bool
- func (k Keeper) IterateAccounts(ctx sdk.Ctx, process func(exported.Account) (stop bool))
- func (k Keeper) Logger(ctx sdk.Ctx) log.Logger
- func (k Keeper) MintCoins(ctx sdk.Ctx, moduleName string, amt sdk.Coins) sdk.Error
- func (k Keeper) NewAccount(ctx sdk.Ctx, acc exported.Account) exported.Account
- func (k Keeper) NewAccountWithAddress(ctx sdk.Ctx, addr sdk.Address) (*types.BaseAccount, error)
- func (k Keeper) RemoveAccount(ctx sdk.Ctx, acc exported.Account)
- func (k Keeper) SendCoins(ctx sdk.Ctx, fromAddr sdk.Address, toAddr sdk.Address, amt sdk.Coins) sdk.Error
- func (k Keeper) SendCoinsFromAccountToModule(ctx sdk.Ctx, senderAddr sdk.Address, recipientModule string, amt sdk.Coins) sdk.Error
- func (k Keeper) SendCoinsFromModuleToAccount(ctx sdk.Ctx, senderModule string, recipientAddr sdk.Address, amt sdk.Coins) sdk.Error
- func (k Keeper) SendCoinsFromModuleToModule(ctx sdk.Ctx, senderModule, recipientModule string, amt sdk.Coins) sdk.Error
- func (k Keeper) SetAccount(ctx sdk.Ctx, acc exported.Account)
- func (k Keeper) SetAccounts(ctx sdk.Ctx, acc []exported.Account)
- func (k Keeper) SetCoins(ctx sdk.Ctx, addr sdk.Address, amt sdk.Coins) sdk.Error
- func (k Keeper) SetModuleAccount(ctx sdk.Ctx, macc exported.ModuleAccountI)
- func (k Keeper) SetParams(ctx sdk.Ctx, params types.Params)
- func (k Keeper) SetSupply(ctx sdk.Ctx, supply exported.SupplyI)
- func (k Keeper) SubtractCoins(ctx sdk.Ctx, addr sdk.Address, amt sdk.Coins) (sdk.Coins, sdk.Error)
- func (k Keeper) UpgradeCodec(ctx sdk.Ctx)
- func (k Keeper) ValidatePermissions(macc exported.ModuleAccountI) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
Keeper of the supply store
func NewKeeper ¶
func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, subspace sdk.Subspace, 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 account. Panics if the name maps to a non-burner module account or if the amount is invalid.
func (Keeper) Codespace ¶
func (k Keeper) Codespace() sdk.CodespaceType
Codespace returns the keeper's codespace.
func (Keeper) ConvertState ¶
func (Keeper) DecodeAccount ¶
"DecodeAccount" - decodes into account interface
func (Keeper) DecodeBaseAccount ¶
func (Keeper) DecodeModuleAccount ¶
"DecodeModuleAccount" - encodes account interface into protobuf
func (Keeper) DecodeSupply ¶
func (Keeper) EncodeAccount ¶
"EncodeAccount" - encodes the account interface to bz
func (Keeper) EncodeBaseAccount ¶
func (Keeper) EncodeModuleAccount ¶
"DecodeModuleAccount" - encodes account interface into protobuf
func (Keeper) EncodeSupply ¶
func (Keeper) GetAccount ¶
GetAccount implements sdk.Keeper.
func (Keeper) GetAllAccounts ¶
GetAllAccounts returns all accounts in the accountKeeper.
func (Keeper) GetAllAccountsExport ¶
GetAllAccounts returns all accounts in the accountKeeper.
func (Keeper) GetModuleAccount ¶
GetModuleAccount gets the module account from the auth account store
func (Keeper) GetModuleAccountAndPermissions ¶
func (k Keeper) GetModuleAccountAndPermissions(ctx sdk.Ctx, moduleName string) (exported.ModuleAccountI, []string)
GetModuleAccountAndPermissions gets the module account from the auth account 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.Address, permissions []string)
GetModuleAddressAndPermissions returns an address and permissions based on the module name
func (Keeper) IterateAccounts ¶
IterateAccounts implements sdk.Keeper.
func (Keeper) MintCoins ¶
MintCoins creates new coins from thin air and adds it to the module account. Panics if the name maps to a non-minter module account or if the amount is invalid.
func (Keeper) NewAccount ¶
NewAccount creates a new account
func (Keeper) NewAccountWithAddress ¶
NewAccountWithAddress implements sdk.AuthKeeper.
func (Keeper) RemoveAccount ¶
RemoveAccount removes an account for the account mapper store. NOTE: this will cause supply invariant violation if called
func (Keeper) SendCoins ¶
func (k Keeper) SendCoins(ctx sdk.Ctx, fromAddr sdk.Address, toAddr sdk.Address, amt sdk.Coins) sdk.Error
SendCoins moves coins from one account to another
func (Keeper) SendCoinsFromAccountToModule ¶
func (k Keeper) SendCoinsFromAccountToModule(ctx sdk.Ctx, senderAddr sdk.Address, recipientModule string, amt sdk.Coins) sdk.Error
SendCoinsFromAccountToModule transfers coins from an Address to a ModuleAccount
func (Keeper) SendCoinsFromModuleToAccount ¶
func (k Keeper) SendCoinsFromModuleToAccount(ctx sdk.Ctx, senderModule string, recipientAddr sdk.Address, amt sdk.Coins) sdk.Error
SendCoinsFromModuleToAccount transfers coins from a ModuleAccount to an Address
func (Keeper) SendCoinsFromModuleToModule ¶
func (k Keeper) SendCoinsFromModuleToModule(ctx sdk.Ctx, senderModule, recipientModule string, amt sdk.Coins) sdk.Error
SendCoinsFromModuleToModule transfers coins from a ModuleAccount to another
func (Keeper) SetAccount ¶
SetAccount implements sdk.Keeper.
func (Keeper) SetModuleAccount ¶
func (k Keeper) SetModuleAccount(ctx sdk.Ctx, macc exported.ModuleAccountI)
SetModuleAccount sets the module account to the auth account store
func (Keeper) SubtractCoins ¶
SubtractCoins subtracts amt from the coins at the addr.
func (Keeper) UpgradeCodec ¶
func (Keeper) ValidatePermissions ¶
func (k Keeper) ValidatePermissions(macc exported.ModuleAccountI) error
ValidatePermissions validates that the module account has been granted permissions within its set of allowed permissions.