keeper

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxSHRSupply        = int64(4396000000)
	ExchangeRateKey     = "exchange_shrp_to_shr"
	DefaultExchangeRate = "200"
	ShrpToCentRate      = 100
	AuthorityKey        = "A"
	TreasurerKey        = "T"
	IdSignerKey         = "IDS"
	DocIssuerKey        = "DOCIS"
	AccOpKey            = "ACCOP"
)
View Source
const (
	QueryLoader            = "loader"
	QueryExchange          = "exchange"
	QuerySigner            = "id-signer"
	QuerySigners           = "id-signers"
	QueryAccountOprator    = "account-operator"
	QueryAllAccountOprator = "account-operators"
	QueryDocumentIssuer    = "document-issuer"
	QueryAllDocumentIssuer = "document-issuers"
)

Variables

This section is empty.

Functions

func MakeTestCodec

func MakeTestCodec() *codec.Codec

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

func ParseCoinFloat

func ParseCoinFloat(f float64) (i, d int64, err error)

Types

type Keeper

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

func NewKeeper

func NewKeeper(cdc *codec.Codec, storeKey sdk.StoreKey, ak auth.AccountKeeper, sk supply.Keeper, bk bank.Keeper) Keeper

NewKeeper creates new instances of the gentlemint Keeper

func (Keeper) AddCoins

func (keeper Keeper) AddCoins(ctx sdk.Context, toAddr sdk.AccAddress, amt sdk.Coins) (sdk.Coins, error)

func (Keeper) BurnCoins

func (keeper Keeper) BurnCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) error

func (Keeper) BuyShr

func (k Keeper) BuyShr(ctx sdk.Context, shrAmt sdk.Int, addr sdk.AccAddress) error

func (Keeper) DeleteAccOp

func (k Keeper) DeleteAccOp(ctx sdk.Context, addr sdk.AccAddress)

func (Keeper) DeleteDocIssuer

func (k Keeper) DeleteDocIssuer(ctx sdk.Context, addr sdk.AccAddress)

func (Keeper) DeleteIdSigner

func (k Keeper) DeleteIdSigner(ctx sdk.Context, addr sdk.AccAddress)

func (Keeper) DeleteSHRPLoader

func (k Keeper) DeleteSHRPLoader(ctx sdk.Context, address string)

func (Keeper) DetactivateDocIssuer

func (k Keeper) DetactivateDocIssuer(ctx sdk.Context, addr sdk.AccAddress)

func (Keeper) DetactivateIdSigner

func (k Keeper) DetactivateIdSigner(ctx sdk.Context, addr sdk.AccAddress)

func (Keeper) GetAccOp

func (k Keeper) GetAccOp(ctx sdk.Context, accAddr sdk.AccAddress) types.AccState

func (Keeper) GetAuthorityAccount

func (k Keeper) GetAuthorityAccount(ctx sdk.Context) string

func (Keeper) GetCoins

func (keeper Keeper) GetCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins

func (Keeper) GetDocIssuer

func (k Keeper) GetDocIssuer(ctx sdk.Context, accAddr sdk.AccAddress) types.AccState

func (Keeper) GetExchangeRate

func (k Keeper) GetExchangeRate(ctx sdk.Context) string

func (Keeper) GetIdSigner

func (k Keeper) GetIdSigner(ctx sdk.Context, signerAddr sdk.AccAddress) types.AccState

func (Keeper) GetSHRPLoader

func (k Keeper) GetSHRPLoader(ctx sdk.Context, address string) types.SHRPLoader

func (Keeper) GetSHRPLoaderStatus

func (k Keeper) GetSHRPLoaderStatus(ctx sdk.Context, address string) string

func (Keeper) GetSHRPLoadersIterator

func (k Keeper) GetSHRPLoadersIterator(ctx sdk.Context) sdk.Iterator

func (Keeper) GetTreasurerAccount

func (k Keeper) GetTreasurerAccount(ctx sdk.Context) string

func (Keeper) IsExchangeRatePresent

func (k Keeper) IsExchangeRatePresent(ctx sdk.Context) bool

func (Keeper) IsSHRPLoaderPresent

func (k Keeper) IsSHRPLoaderPresent(ctx sdk.Context, address string) bool

func (Keeper) IterateAccOps

func (k Keeper) IterateAccOps(ctx sdk.Context, cb func(loader types.AccState) (stop bool))

func (Keeper) IterateDocIssuers

func (k Keeper) IterateDocIssuers(ctx sdk.Context, cb func(loader types.AccState) (stop bool))

func (Keeper) IterateIdSigners

func (k Keeper) IterateIdSigners(ctx sdk.Context, cb func(loader types.AccState) (stop bool))

func (Keeper) IterateSHRPLoaders

func (k Keeper) IterateSHRPLoaders(ctx sdk.Context, cb func(loaderKey string, loader types.SHRPLoader) (stop bool))

func (Keeper) LoadCoins

func (keeper Keeper) LoadCoins(ctx sdk.Context, toAddr sdk.AccAddress, amt sdk.Coins) error

func (Keeper) NotEnoughShr

func (k Keeper) NotEnoughShr(ctx sdk.Context, amt sdk.Int, addr sdk.AccAddress) (sdk.Int, bool)

func (Keeper) SendCoins

func (keeper Keeper) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error

func (Keeper) SetAccOp

func (k Keeper) SetAccOp(ctx sdk.Context, acc types.AccState)

func (Keeper) SetAuthorityAccount

func (k Keeper) SetAuthorityAccount(ctx sdk.Context, authority string)

func (Keeper) SetDocIssuer

func (k Keeper) SetDocIssuer(ctx sdk.Context, acc types.AccState)

func (Keeper) SetExchangeRate

func (k Keeper) SetExchangeRate(ctx sdk.Context, rate string)

func (Keeper) SetIdSigner

func (k Keeper) SetIdSigner(ctx sdk.Context, signer types.AccState)

func (Keeper) SetSHRPLoader

func (k Keeper) SetSHRPLoader(ctx sdk.Context, address string, loader types.SHRPLoader)

func (Keeper) SetSHRPLoaderStatus

func (k Keeper) SetSHRPLoaderStatus(ctx sdk.Context, address string, status string)

func (Keeper) SetTreasurerAccount

func (k Keeper) SetTreasurerAccount(ctx sdk.Context, treasurer string)

func (Keeper) ShrMintPossible

func (k Keeper) ShrMintPossible(ctx sdk.Context, amt sdk.Int) bool

func (Keeper) SubtractCoins

func (keeper Keeper) SubtractCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) (sdk.Coins, error)

func (Keeper) SupplyBurnCoins

func (keeper Keeper) SupplyBurnCoins(ctx sdk.Context, amt sdk.Coins) error

func (Keeper) SupplyMintCoins

func (keeper Keeper) SupplyMintCoins(ctx sdk.Context, amt sdk.Coins) error

Jump to

Keyboard shortcuts

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