Documentation ¶
Index ¶
- Constants
- func MakeTestCodec() *codec.Codec
- func NewQuerier(keeper Keeper) sdk.Querier
- func ParseCoinFloat(f float64) (i, d int64, err error)
- type Keeper
- func (keeper Keeper) AddCoins(ctx sdk.Context, toAddr sdk.AccAddress, amt sdk.Coins) (sdk.Coins, error)
- func (keeper Keeper) BurnCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) error
- func (k Keeper) BuyShr(ctx sdk.Context, shrAmt sdk.Int, addr sdk.AccAddress) error
- func (k Keeper) DeleteAccOp(ctx sdk.Context, addr sdk.AccAddress)
- func (k Keeper) DeleteDocIssuer(ctx sdk.Context, addr sdk.AccAddress)
- func (k Keeper) DeleteIdSigner(ctx sdk.Context, addr sdk.AccAddress)
- func (k Keeper) DeleteSHRPLoader(ctx sdk.Context, address string)
- func (k Keeper) DetactivateDocIssuer(ctx sdk.Context, addr sdk.AccAddress)
- func (k Keeper) DetactivateIdSigner(ctx sdk.Context, addr sdk.AccAddress)
- func (k Keeper) GetAccOp(ctx sdk.Context, accAddr sdk.AccAddress) types.AccState
- func (k Keeper) GetAuthorityAccount(ctx sdk.Context) string
- func (keeper Keeper) GetCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
- func (k Keeper) GetDocIssuer(ctx sdk.Context, accAddr sdk.AccAddress) types.AccState
- func (k Keeper) GetExchangeRate(ctx sdk.Context) string
- func (k Keeper) GetIdSigner(ctx sdk.Context, signerAddr sdk.AccAddress) types.AccState
- func (k Keeper) GetSHRPLoader(ctx sdk.Context, address string) types.SHRPLoader
- func (k Keeper) GetSHRPLoaderStatus(ctx sdk.Context, address string) string
- func (k Keeper) GetSHRPLoadersIterator(ctx sdk.Context) sdk.Iterator
- func (k Keeper) GetTreasurerAccount(ctx sdk.Context) string
- func (k Keeper) IsExchangeRatePresent(ctx sdk.Context) bool
- func (k Keeper) IsSHRPLoaderPresent(ctx sdk.Context, address string) bool
- func (k Keeper) IterateAccOps(ctx sdk.Context, cb func(loader types.AccState) (stop bool))
- func (k Keeper) IterateDocIssuers(ctx sdk.Context, cb func(loader types.AccState) (stop bool))
- func (k Keeper) IterateIdSigners(ctx sdk.Context, cb func(loader types.AccState) (stop bool))
- func (k Keeper) IterateSHRPLoaders(ctx sdk.Context, ...)
- func (keeper Keeper) LoadCoins(ctx sdk.Context, toAddr sdk.AccAddress, amt sdk.Coins) error
- func (k Keeper) NotEnoughShr(ctx sdk.Context, amt sdk.Int, addr sdk.AccAddress) (sdk.Int, bool)
- func (keeper Keeper) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
- func (k Keeper) SetAccOp(ctx sdk.Context, acc types.AccState)
- func (k Keeper) SetAuthorityAccount(ctx sdk.Context, authority string)
- func (k Keeper) SetDocIssuer(ctx sdk.Context, acc types.AccState)
- func (k Keeper) SetExchangeRate(ctx sdk.Context, rate string)
- func (k Keeper) SetIdSigner(ctx sdk.Context, signer types.AccState)
- func (k Keeper) SetSHRPLoader(ctx sdk.Context, address string, loader types.SHRPLoader)
- func (k Keeper) SetSHRPLoaderStatus(ctx sdk.Context, address string, status string)
- func (k Keeper) SetTreasurerAccount(ctx sdk.Context, treasurer string)
- func (k Keeper) ShrMintPossible(ctx sdk.Context, amt sdk.Int) bool
- func (keeper Keeper) SubtractCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) (sdk.Coins, error)
- func (keeper Keeper) SupplyBurnCoins(ctx sdk.Context, amt sdk.Coins) error
- func (keeper Keeper) SupplyMintCoins(ctx sdk.Context, amt sdk.Coins) error
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 NewQuerier ¶
func ParseCoinFloat ¶
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) 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) 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) GetDocIssuer ¶
func (Keeper) GetIdSigner ¶
func (Keeper) GetSHRPLoader ¶
func (Keeper) GetSHRPLoaderStatus ¶
func (Keeper) GetSHRPLoadersIterator ¶
func (Keeper) IsSHRPLoaderPresent ¶
func (Keeper) IterateAccOps ¶
func (Keeper) IterateDocIssuers ¶
func (Keeper) IterateIdSigners ¶
func (Keeper) IterateSHRPLoaders ¶
func (Keeper) NotEnoughShr ¶
func (Keeper) SendCoins ¶
func (keeper Keeper) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
func (Keeper) SetAuthorityAccount ¶
func (Keeper) SetSHRPLoader ¶
func (Keeper) SetSHRPLoaderStatus ¶
func (Keeper) SetTreasurerAccount ¶
func (Keeper) SubtractCoins ¶
func (Keeper) SupplyBurnCoins ¶
Click to show internal directories.
Click to hide internal directories.