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 PrefixFreeze(issueID string) []byte
- type BankKeeper
- type FeeCollectionKeeper
- type Hooks
- type Keeper
- func (keeper Keeper) AddIssue(ctx sdk.Context, coinIssueInfo *types.CoinIssueInfo)
- func (keeper Keeper) Allowance(ctx sdk.Context, owner sdk.AccAddress, spender sdk.AccAddress, issueID string) (amount sdk.Int)
- func (keeper Keeper) Approve(ctx sdk.Context, sender sdk.AccAddress, spender sdk.AccAddress, issueID string, ...) sdk.Error
- func (keeper Keeper) BurnFrom(ctx sdk.Context, issueID string, amount sdk.Int, sender sdk.AccAddress, ...) (sdk.Coins, sdk.Error)
- func (keeper Keeper) BurnHolder(ctx sdk.Context, issueID string, amount sdk.Int, sender sdk.AccAddress) (sdk.Coins, sdk.Error)
- func (keeper Keeper) BurnOwner(ctx sdk.Context, issueID string, amount sdk.Int, sender sdk.AccAddress) (sdk.Coins, sdk.Error)
- func (keeper Keeper) CanMint(ctx sdk.Context, issueID string) bool
- func (keeper Keeper) CheckFreeze(ctx sdk.Context, from sdk.AccAddress, to sdk.AccAddress, issueID string) sdk.Error
- func (keeper Keeper) CreateIssue(ctx sdk.Context, coinIssueInfo *types.CoinIssueInfo) (sdk.Coins, sdk.Error)
- func (keeper Keeper) DecreaseApproval(ctx sdk.Context, sender sdk.AccAddress, spender sdk.AccAddress, issueID string, ...) sdk.Error
- func (keeper Keeper) DisableFeature(ctx sdk.Context, sender sdk.AccAddress, issueID string, feature string) sdk.Error
- func (keeper Keeper) Fee(ctx sdk.Context, sender sdk.AccAddress, fee sdk.Coin) sdk.Error
- func (keeper Keeper) Freeze(ctx sdk.Context, issueID string, sender sdk.AccAddress, ...) sdk.Error
- func (keeper Keeper) GetAddressIssues(ctx sdk.Context, accAddress string) (issueIDs []string)
- func (keeper Keeper) GetBankKeeper() BankKeeper
- func (keeper Keeper) GetFeeCollectionKeeper() FeeCollectionKeeper
- func (keeper Keeper) GetFreeze(ctx sdk.Context, accAddress sdk.AccAddress, issueID string) types.IssueFreeze
- func (keeper Keeper) GetFreezes(ctx sdk.Context, issueID string) []types.IssueAddressFreeze
- func (keeper Keeper) GetIssue(ctx sdk.Context, issueID string) *types.CoinIssueInfo
- func (keeper Keeper) GetIssues(ctx sdk.Context, accAddress string) []*types.CoinIssueInfo
- func (keeper Keeper) GetLastIssueID(ctx sdk.Context) (issueID uint64)
- func (ak Keeper) GetParams(ctx sdk.Context) (params config.Params)
- func (keeper Keeper) GetSymbolIssues(ctx sdk.Context, symbol string) (issueIDs []string)
- func (keeper Keeper) Getcdc() *codec.Codec
- func (keeper Keeper) Hooks() Hooks
- func (keeper Keeper) IncreaseApproval(ctx sdk.Context, sender sdk.AccAddress, spender sdk.AccAddress, issueID string, ...) sdk.Error
- func (keeper Keeper) Iterator(ctx sdk.Context, startIssueId string) sdk.Iterator
- func (keeper Keeper) List(ctx sdk.Context, params issueparams.IssueQueryParams) []*types.CoinIssueInfo
- func (keeper Keeper) ListAll(ctx sdk.Context) []types.CoinIssueInfo
- func (keeper Keeper) Mint(ctx sdk.Context, issueID string, amount sdk.Int, sender sdk.AccAddress, ...) (sdk.Coins, sdk.Error)
- func (keeper Keeper) PeekCurrentIssueID(ctx sdk.Context) (issueID uint64, err sdk.Error)
- func (keeper Keeper) SearchIssues(ctx sdk.Context, symbol string) []*types.CoinIssueInfo
- func (keeper Keeper) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) sdk.Error
- func (keeper Keeper) SendFrom(ctx sdk.Context, sender sdk.AccAddress, from sdk.AccAddress, to sdk.AccAddress, ...) sdk.Error
- func (keeper Keeper) SetInitialIssueStartingIssueId(ctx sdk.Context, issueID uint64) sdk.Error
- func (keeper Keeper) SetIssueDescription(ctx sdk.Context, issueID string, sender sdk.AccAddress, description []byte) sdk.Error
- func (ak Keeper) SetParams(ctx sdk.Context, params config.Params)
- func (keeper Keeper) TransferOwnership(ctx sdk.Context, issueID string, sender sdk.AccAddress, to sdk.AccAddress) sdk.Error
- func (keeper 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 ¶ added in v0.5.0
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 PrefixFreeze ¶ added in v0.6.0
Types ¶
type BankKeeper ¶
type BankKeeper interface { GetCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins AddCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) (sdk.Coins, sdk.Error) SubtractCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) (sdk.Coins, sdk.Error) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) sdk.Error }
expected bank keeper
type FeeCollectionKeeper ¶ added in v0.6.0
expected fee collection keeper
type Hooks ¶ added in v0.6.0
type Hooks struct {
// contains filtered or unexported fields
}
Wrapper struct
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Issue Keeper
func NewKeeper ¶
func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, paramsKeeper params.Keeper, paramSpace params.Subspace, ck BankKeeper, feeCollectionKeeper FeeCollectionKeeper, codespace sdk.CodespaceType) Keeper
New issue keeper Instance
func (Keeper) AddIssue ¶
func (keeper Keeper) AddIssue(ctx sdk.Context, coinIssueInfo *types.CoinIssueInfo)
Keys add Add a issue
func (Keeper) Allowance ¶ added in v0.5.0
func (keeper 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 ¶ added in v0.5.0
func (keeper 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 ¶ added in v0.5.0
func (keeper Keeper) BurnHolder(ctx sdk.Context, issueID string, amount sdk.Int, sender sdk.AccAddress) (sdk.Coins, sdk.Error)
Burn a coin
func (Keeper) CheckFreeze ¶ added in v0.6.0
func (keeper Keeper) CheckFreeze(ctx sdk.Context, from sdk.AccAddress, to sdk.AccAddress, issueID string) sdk.Error
func (Keeper) CreateIssue ¶ added in v0.6.0
func (keeper Keeper) CreateIssue(ctx sdk.Context, coinIssueInfo *types.CoinIssueInfo) (sdk.Coins, sdk.Error)
Create a issue
func (Keeper) DecreaseApproval ¶ added in v0.5.0
func (keeper 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 ¶ added in v0.5.0
func (Keeper) GetAddressIssues ¶
Get address from a issue
func (Keeper) GetBankKeeper ¶ added in v0.6.0
func (keeper Keeper) GetBankKeeper() BankKeeper
Get box bankKeeper
func (Keeper) GetFeeCollectionKeeper ¶ added in v0.6.0
func (keeper Keeper) GetFeeCollectionKeeper() FeeCollectionKeeper
Get box feeCollectionKeeper
func (Keeper) GetFreeze ¶ added in v0.5.0
func (keeper Keeper) GetFreeze(ctx sdk.Context, accAddress sdk.AccAddress, issueID string) types.IssueFreeze
func (Keeper) GetFreezes ¶ added in v0.6.0
func (Keeper) GetLastIssueID ¶
Get the last used issueID
func (Keeper) GetSymbolIssues ¶
Get issueIDs from a issue
func (Keeper) IncreaseApproval ¶ added in v0.5.0
func (keeper 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 (keeper Keeper) List(ctx sdk.Context, params issueparams.IssueQueryParams) []*types.CoinIssueInfo
func (Keeper) ListAll ¶ added in v0.6.0
func (keeper Keeper) ListAll(ctx sdk.Context) []types.CoinIssueInfo
func (Keeper) Mint ¶
func (keeper 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 (keeper Keeper) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) sdk.Error
Send coins
func (Keeper) SendFrom ¶ added in v0.5.0
func (keeper 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 (keeper Keeper) TransferOwnership(ctx sdk.Context, issueID string, sender sdk.AccAddress, to sdk.AccAddress) sdk.Error
TransferOwnership