keeper

package
v0.19.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2022 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl added in v0.16.0

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the issuance MsgServer interface for the provided Keeper.

func NewQuerier

func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier

NewQuerier is the module level router for state queries

func NewQueryServerImpl added in v0.16.0

func NewQueryServerImpl(k Keeper) types.QueryServer

NewQueryServerImpl creates a new server for handling gRPC queries.

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper keeper for the issuance module

func NewKeeper

func NewKeeper(cdc codec.Codec, key sdk.StoreKey, paramstore paramtypes.Subspace, ak types.AccountKeeper, bk types.BankKeeper) Keeper

NewKeeper returns a new keeper

func (Keeper) BlockAddress

func (k Keeper) BlockAddress(ctx sdk.Context, denom string, owner, blockedAddress sdk.AccAddress) error

BlockAddress adds an address to the blocked list

func (Keeper) CreateNewAssetSupply

func (k Keeper) CreateNewAssetSupply(ctx sdk.Context, denom string) types.AssetSupply

CreateNewAssetSupply creates a new AssetSupply in the store for the input denom

func (Keeper) GetAllAssetSupplies

func (k Keeper) GetAllAssetSupplies(ctx sdk.Context) (supplies []types.AssetSupply)

GetAllAssetSupplies returns all asset supplies from the store

func (Keeper) GetAsset

func (k Keeper) GetAsset(ctx sdk.Context, denom string) (types.Asset, bool)

GetAsset returns an asset from the params and a boolean for if it was found

func (Keeper) GetAssetSupply

func (k Keeper) GetAssetSupply(ctx sdk.Context, denom string) (types.AssetSupply, bool)

GetAssetSupply gets an asset's current supply from the store.

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) types.Params

GetParams returns the params from the store

func (Keeper) GetPreviousBlockTime

func (k Keeper) GetPreviousBlockTime(ctx sdk.Context) (blockTime time.Time, found bool)

GetPreviousBlockTime get the blocktime for the previous block

func (Keeper) GetRateLimit

func (k Keeper) GetRateLimit(ctx sdk.Context, denom string) (types.RateLimit, error)

GetRateLimit returns the rete-limit parameters for the input denom

func (Keeper) IncrementCurrentAssetSupply

func (k Keeper) IncrementCurrentAssetSupply(ctx sdk.Context, coin sdk.Coin) error

IncrementCurrentAssetSupply increments an asset's supply by the coin

func (Keeper) IssueTokens

func (k Keeper) IssueTokens(ctx sdk.Context, tokens sdk.Coin, owner, receiver sdk.AccAddress) error

IssueTokens mints new tokens and sends them to the receiver address

func (Keeper) IterateAssetSupplies

func (k Keeper) IterateAssetSupplies(ctx sdk.Context, cb func(supply types.AssetSupply) (stop bool))

IterateAssetSupplies provides an iterator over all stored AssetSupplies.

func (Keeper) RedeemTokens

func (k Keeper) RedeemTokens(ctx sdk.Context, tokens sdk.Coin, owner sdk.AccAddress) error

RedeemTokens sends tokens from the owner address to the module account and burns them

func (Keeper) SeizeCoinsForBlockableAssets

func (k Keeper) SeizeCoinsForBlockableAssets(ctx sdk.Context) error

SeizeCoinsForBlockableAssets seizes coins from blocked addresses for assets that have blocking enabled

func (Keeper) SeizeCoinsFromBlockedAddresses

func (k Keeper) SeizeCoinsFromBlockedAddresses(ctx sdk.Context, denom string) error

SeizeCoinsFromBlockedAddresses checks blocked addresses for coins of the input denom and transfers them to the owner account

func (Keeper) SetAsset

func (k Keeper) SetAsset(ctx sdk.Context, asset types.Asset)

SetAsset sets an asset in the params

func (Keeper) SetAssetSupply

func (k Keeper) SetAssetSupply(ctx sdk.Context, supply types.AssetSupply, denom string)

SetAssetSupply updates an asset's supply

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams sets params on the store

func (Keeper) SetPauseStatus

func (k Keeper) SetPauseStatus(ctx sdk.Context, owner sdk.AccAddress, denom string, status bool) error

SetPauseStatus pauses/un-pauses an asset

func (Keeper) SetPreviousBlockTime

func (k Keeper) SetPreviousBlockTime(ctx sdk.Context, blockTime time.Time)

SetPreviousBlockTime set the time of the previous block

func (Keeper) SynchronizeBlockList

func (k Keeper) SynchronizeBlockList(ctx sdk.Context)

SynchronizeBlockList resets the block list to empty for any asset that is not blockable - could happen if this value is changed via governance

func (Keeper) UnblockAddress

func (k Keeper) UnblockAddress(ctx sdk.Context, denom string, owner, addr sdk.AccAddress) error

UnblockAddress removes an address from the blocked list

func (Keeper) UpdateTimeBasedSupplyLimits

func (k Keeper) UpdateTimeBasedSupplyLimits(ctx sdk.Context)

UpdateTimeBasedSupplyLimits updates the time based supply for each asset, resetting it if the current time window has elapsed.

Jump to

Keyboard shortcuts

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