Documentation ¶
Index ¶
- Variables
- func KeyAddressIssues(addr string) []byte
- func KeyAllowed(issueID string, sender sdk.AccAddress, spender sdk.AccAddress) []byte
- func KeyFreeze(issueID string, accAddress sdk.AccAddress) []byte
- func KeyIssueIdStr(seq uint64) string
- func KeyIssuer(issueIdStr string) []byte
- func KeySymbolIssues(symbol string) []byte
- func NewQuerier(k Keeper) sdk.Querier
- func NonnegativeBalanceInvariant(ak types.AccountKeeper) sdk.Invariant
- func PrefixFreeze(issueID string) []byte
- func RegisterInvariants(ir sdk.InvariantRegistry, ak types.AccountKeeper)
- type Keeper
- func (k Keeper) AddIssue(ctx sdk.Context, coinIssueInfo *types.CoinIssueInfo)
- func (k Keeper) Allowance(ctx sdk.Context, owner sdk.AccAddress, spender sdk.AccAddress, issueID string) (amount sdk.Int)
- func (k Keeper) Approve(ctx sdk.Context, sender sdk.AccAddress, spender sdk.AccAddress, issueID string, ...) sdk.Error
- func (k Keeper) BurnFrom(ctx sdk.Context, issueID string, amount sdk.Int, sender sdk.AccAddress, ...) (sdk.Coins, sdk.Error)
- func (k Keeper) BurnHolder(ctx sdk.Context, issueID string, amount sdk.Int, sender sdk.AccAddress) (sdk.Coins, sdk.Error)
- func (k Keeper) BurnOwner(ctx sdk.Context, issueID string, amount sdk.Int, sender sdk.AccAddress) (sdk.Coins, sdk.Error)
- func (k Keeper) CanMint(ctx sdk.Context, issueID string) bool
- func (k Keeper) CheckFreeze(ctx sdk.Context, from sdk.AccAddress, to sdk.AccAddress, issueID string) sdk.Error
- func (k Keeper) CreateIssue(ctx sdk.Context, coinIssueInfo *types.CoinIssueInfo) (sdk.Coins, sdk.Error)
- func (k Keeper) DecreaseApproval(ctx sdk.Context, sender sdk.AccAddress, spender sdk.AccAddress, issueID string, ...) sdk.Error
- func (k Keeper) DisableFeature(ctx sdk.Context, sender sdk.AccAddress, issueID string, feature string) sdk.Error
- func (k Keeper) Fee(ctx sdk.Context, sender sdk.AccAddress, fee sdk.Coin) sdk.Error
- func (k Keeper) Freeze(ctx sdk.Context, issueID string, sender sdk.AccAddress, ...) sdk.Error
- func (k Keeper) GetAddressIssues(ctx sdk.Context, accAddress string) (issueIDs []string)
- func (keeper Keeper) GetBankKeeper() types.BankKeeper
- func (k Keeper) GetFreeze(ctx sdk.Context, accAddress sdk.AccAddress, issueID string) types.IssueFreeze
- func (k Keeper) GetFreezes(ctx sdk.Context, issueID string) []types.IssueAddressFreeze
- func (k Keeper) GetIssue(ctx sdk.Context, issueID string) *types.CoinIssueInfo
- func (k Keeper) GetIssues(ctx sdk.Context, accAddress string) []*types.CoinIssueInfo
- func (k Keeper) GetLastIssueID(ctx sdk.Context) (issueID uint64)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (keeper Keeper) GetSupplyKeeper() types.SupplyKeeper
- func (k Keeper) GetSymbolIssues(ctx sdk.Context, symbol string) (issueIDs []string)
- func (k Keeper) IncreaseApproval(ctx sdk.Context, sender sdk.AccAddress, spender sdk.AccAddress, issueID string, ...) sdk.Error
- func (k Keeper) Iterator(ctx sdk.Context, startIssueId string) sdk.Iterator
- func (k Keeper) List(ctx sdk.Context, params types.IssueQueryParams) []*types.CoinIssueInfo
- func (k Keeper) ListAll(ctx sdk.Context) []types.CoinIssueInfo
- func (k Keeper) Mint(ctx sdk.Context, issueID string, amount sdk.Int, sender sdk.AccAddress, ...) (sdk.Coins, sdk.Error)
- func (k Keeper) PeekCurrentIssueID(ctx sdk.Context) (issueID uint64, err sdk.Error)
- func (k Keeper) SearchIssues(ctx sdk.Context, symbol string) []*types.CoinIssueInfo
- func (k Keeper) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) sdk.Error
- func (k Keeper) SendCoinsFromAccountToFeeCollector(ctx sdk.Context, senderAddr sdk.AccAddress, amt sdk.Coins) sdk.Error
- func (k Keeper) SendFrom(ctx sdk.Context, sender sdk.AccAddress, from sdk.AccAddress, to sdk.AccAddress, ...) sdk.Error
- func (k Keeper) SetInitialIssueStartingIssueId(ctx sdk.Context, issueID uint64) sdk.Error
- func (k Keeper) SetIssueDescription(ctx sdk.Context, issueID string, sender sdk.AccAddress, description []byte) sdk.Error
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params) sdk.Error
- func (k Keeper) TransferOwnership(ctx sdk.Context, issueID string, sender sdk.AccAddress, to sdk.AccAddress) sdk.Error
- func (k Keeper) UnFreeze(ctx sdk.Context, issueID string, sender sdk.AccAddress, ...) sdk.Error
Constants ¶
This section is empty.
Variables ¶
var ( KeyDelimiter = ":" KeyNextIssueID = []byte("newIssueID") )
Key for getting a the next available proposalID from the store
Functions ¶
func KeyAddressIssues ¶
Key for getting a specific address from the store
func KeyAllowed ¶
func KeyAllowed(issueID string, sender sdk.AccAddress, spender sdk.AccAddress) []byte
Key for getting a specific allowed from the store
func KeyIssueIdStr ¶
func KeyIssuer ¶
func BytesString(b []byte) string { return *(*string)(unsafe.Pointer(&b)) }
Key for getting a specific issuer from the store
func KeySymbolIssues ¶
func NonnegativeBalanceInvariant ¶
func NonnegativeBalanceInvariant(ak types.AccountKeeper) sdk.Invariant
NonnegativeBalanceInvariant checks that all accounts in the application have non-negative balances
func PrefixFreeze ¶
func RegisterInvariants ¶
func RegisterInvariants(ir sdk.InvariantRegistry, ak types.AccountKeeper)
RegisterInvariants registers the bank module invariants
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Issue Keeper
func NewKeeper ¶
func NewKeeper( key sdk.StoreKey, paramSpace params.Subspace, ck types.BankKeeper, sk types.SupplyKeeper, codespace sdk.CodespaceType, feeCollectorName string, ) Keeper
New issue keeper Instance
func (Keeper) AddIssue ¶
func (k Keeper) AddIssue(ctx sdk.Context, coinIssueInfo *types.CoinIssueInfo)
Keys add Add a issue
func (Keeper) Allowance ¶
func (k Keeper) Allowance(ctx sdk.Context, owner sdk.AccAddress, spender sdk.AccAddress, issueID string) (amount sdk.Int)
Get the amount of tokens that an owner allowed to a spender
func (Keeper) Approve ¶
func (k Keeper) Approve(ctx sdk.Context, sender sdk.AccAddress, spender sdk.AccAddress, issueID string, amount sdk.Int) sdk.Error
Approve the passed address to spend the specified amount of tokens on behalf of sender
func (Keeper) BurnHolder ¶
func (k Keeper) BurnHolder(ctx sdk.Context, issueID string, amount sdk.Int, sender sdk.AccAddress) (sdk.Coins, sdk.Error)
Burn a coin
func (Keeper) CheckFreeze ¶
func (k Keeper) CheckFreeze(ctx sdk.Context, from sdk.AccAddress, to sdk.AccAddress, issueID string) sdk.Error
func (Keeper) CreateIssue ¶
func (k Keeper) CreateIssue(ctx sdk.Context, coinIssueInfo *types.CoinIssueInfo) (sdk.Coins, sdk.Error)
Create a issue
func (Keeper) DecreaseApproval ¶
func (k Keeper) DecreaseApproval(ctx sdk.Context, sender sdk.AccAddress, spender sdk.AccAddress, issueID string, subtractedValue sdk.Int) sdk.Error
Decrease the amount of tokens that an owner allowed to a spender
func (Keeper) DisableFeature ¶
func (Keeper) GetAddressIssues ¶
Get address from a issue
func (Keeper) GetBankKeeper ¶
func (keeper Keeper) GetBankKeeper() types.BankKeeper
Get box bankKeeper
func (Keeper) GetFreeze ¶
func (k Keeper) GetFreeze(ctx sdk.Context, accAddress sdk.AccAddress, issueID string) types.IssueFreeze
func (Keeper) GetFreezes ¶
func (Keeper) GetLastIssueID ¶
Get the last used issueID
func (Keeper) GetSupplyKeeper ¶
func (keeper Keeper) GetSupplyKeeper() types.SupplyKeeper
Get supplyKeeper for testing
func (Keeper) GetSymbolIssues ¶
Get issueIDs from a issue
func (Keeper) IncreaseApproval ¶
func (k Keeper) IncreaseApproval(ctx sdk.Context, sender sdk.AccAddress, spender sdk.AccAddress, issueID string, addedValue sdk.Int) sdk.Error
Increase the amount of tokens that an owner allowed to a spender
func (Keeper) List ¶
func (k Keeper) List(ctx sdk.Context, params types.IssueQueryParams) []*types.CoinIssueInfo
func (Keeper) Mint ¶
func (k Keeper) Mint(ctx sdk.Context, issueID string, amount sdk.Int, sender sdk.AccAddress, to sdk.AccAddress) (sdk.Coins, sdk.Error)
Mint a coin
func (Keeper) PeekCurrentIssueID ¶
Peeks the next available IssueID without incrementing it
func (Keeper) SearchIssues ¶
func (Keeper) SendCoins ¶
func (k Keeper) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) sdk.Error
Send coins
func (Keeper) SendCoinsFromAccountToFeeCollector ¶
func (k Keeper) SendCoinsFromAccountToFeeCollector(ctx sdk.Context, senderAddr sdk.AccAddress, amt sdk.Coins) sdk.Error
SendCoinsFromAccountToFeeCollector transfers amt to the fee collector account.
func (Keeper) SendFrom ¶
func (k Keeper) SendFrom(ctx sdk.Context, sender sdk.AccAddress, from sdk.AccAddress, to sdk.AccAddress, issueID string, amount sdk.Int) sdk.Error
Transfer tokens from one address to another
func (Keeper) SetInitialIssueStartingIssueId ¶
Set the initial issueCount
func (Keeper) SetIssueDescription ¶
func (Keeper) TransferOwnership ¶
func (k Keeper) TransferOwnership(ctx sdk.Context, issueID string, sender sdk.AccAddress, to sdk.AccAddress) sdk.Error
TransferOwnership