Documentation
¶
Index ¶
- Variables
- func KeyAddressIssues(addr string) []byte
- func KeyIssueIdStr(seq uint64) string
- func KeyIssuer(issueIdStr string) []byte
- func KeySymbolIssues(symbol string) []byte
- func ParamKeyTable() params.KeyTable
- type BankKeeper
- type Keeper
- func (keeper Keeper) AddIssue(ctx sdk.Context, coinIssueInfo *types.CoinIssueInfo) (sdk.Coins, sdk.Tags, sdk.Error)
- func (keeper Keeper) Burn(ctx sdk.Context, issueID string, amount sdk.Int, operator sdk.AccAddress) (sdk.Coins, sdk.Tags, sdk.Error)
- func (keeper Keeper) BurnAnyOff(ctx sdk.Context, operator sdk.AccAddress, issueID string) sdk.Error
- func (keeper Keeper) BurnFrom(ctx sdk.Context, issueID string, amount sdk.Int, operator sdk.AccAddress, ...) (sdk.Coins, sdk.Tags, sdk.Error)
- func (keeper Keeper) BurnFromOff(ctx sdk.Context, operator sdk.AccAddress, issueID string) sdk.Error
- func (keeper Keeper) BurnOff(ctx sdk.Context, operator sdk.AccAddress, issueID string) sdk.Error
- func (keeper Keeper) CanMint(ctx sdk.Context, issueID string) bool
- func (keeper Keeper) FinishMinting(ctx sdk.Context, operator sdk.AccAddress, issueID string) sdk.Error
- func (keeper Keeper) GetAddressIssues(ctx sdk.Context, accAddress string) (issueIDs []string)
- func (keeper Keeper) GetIssue(ctx sdk.Context, issueID string) *types.CoinIssueInfo
- func (keeper Keeper) GetIssueConfigParams(ctx sdk.Context) issueparams.IssueConfigParams
- func (keeper Keeper) GetIssues(ctx sdk.Context, accAddress string) []*types.CoinIssueInfo
- func (keeper Keeper) GetLastIssueID(ctx sdk.Context) (issueID uint64)
- func (keeper Keeper) GetSymbolIssues(ctx sdk.Context, symbol string) (issueIDs []string)
- func (keeper Keeper) Getcdc() *codec.Codec
- func (keeper Keeper) List(ctx sdk.Context, params issueparams.IssueQueryParams) []*types.CoinIssueInfo
- func (keeper Keeper) Mint(ctx sdk.Context, issueID string, amount sdk.Int, operator sdk.AccAddress, ...) (sdk.Coins, sdk.Tags, 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.Tags, sdk.Error)
- func (keeper Keeper) SetInitialIssueStartingIssueId(ctx sdk.Context, issueID uint64) sdk.Error
- func (keeper Keeper) SetIssueConfigParams(ctx sdk.Context, issueConfigParams issueparams.IssueConfigParams)
- func (keeper Keeper) SetIssueDescription(ctx sdk.Context, issueID string, operator sdk.AccAddress, description []byte) sdk.Error
- func (keeper Keeper) TransferOwnership(ctx sdk.Context, issueID string, operator sdk.AccAddress, to sdk.AccAddress) sdk.Error
Constants ¶
This section is empty.
Variables ¶
var ( KeyDelimiter = []byte(":") KeyNextIssueID = []byte("newIssueID") )
Key for getting a the next available proposalID from the store
var (
ParamStoreKeyIssueParams = []byte("issueparams")
)
Parameter store key
Functions ¶
func KeyAddressIssues ¶
Key for getting a specific address 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 ¶
Key for getting a specific symbol from the store
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.Tags, sdk.Error)
SubtractCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) (sdk.Coins, sdk.Tags, sdk.Error)
SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) (sdk.Tags, sdk.Error)
}
expected bank keeper
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, codespace sdk.CodespaceType) Keeper
New issue keeper Instance
func (Keeper) AddIssue ¶
func (keeper Keeper) AddIssue(ctx sdk.Context, coinIssueInfo *types.CoinIssueInfo) (sdk.Coins, sdk.Tags, sdk.Error)
Add a issue
func (Keeper) Burn ¶
func (keeper Keeper) Burn(ctx sdk.Context, issueID string, amount sdk.Int, operator sdk.AccAddress) (sdk.Coins, sdk.Tags, sdk.Error)
Burn a coin
func (Keeper) BurnAnyOff ¶
BurnAnyOff a coin
func (Keeper) BurnFrom ¶
func (keeper Keeper) BurnFrom(ctx sdk.Context, issueID string, amount sdk.Int, operator sdk.AccAddress, burnfrom sdk.AccAddress) (sdk.Coins, sdk.Tags, sdk.Error)
Burn a coin from address
func (Keeper) BurnFromOff ¶
func (keeper Keeper) BurnFromOff(ctx sdk.Context, operator sdk.AccAddress, issueID string) sdk.Error
BurnFromOff a coin
func (Keeper) FinishMinting ¶
func (keeper Keeper) FinishMinting(ctx sdk.Context, operator sdk.AccAddress, issueID string) sdk.Error
Finished Minting a coin
func (Keeper) GetAddressIssues ¶
Get address from a issue
func (Keeper) GetIssueConfigParams ¶
func (keeper Keeper) GetIssueConfigParams(ctx sdk.Context) issueparams.IssueConfigParams
Params Returns the current issueConfigParams from the global param store
func (Keeper) GetLastIssueID ¶
Get the last used issueID
func (Keeper) GetSymbolIssues ¶
Get issueIDs from a issue
func (Keeper) List ¶
func (keeper Keeper) List(ctx sdk.Context, params issueparams.IssueQueryParams) []*types.CoinIssueInfo
func (Keeper) Mint ¶
func (keeper Keeper) Mint(ctx sdk.Context, issueID string, amount sdk.Int, operator sdk.AccAddress, to sdk.AccAddress) (sdk.Coins, sdk.Tags, 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.Tags, sdk.Error)
Send coins
func (Keeper) SetInitialIssueStartingIssueId ¶
Set the initial issueCount
func (Keeper) SetIssueConfigParams ¶
func (keeper Keeper) SetIssueConfigParams(ctx sdk.Context, issueConfigParams issueparams.IssueConfigParams)
Set issueConfigParams
func (Keeper) SetIssueDescription ¶
func (Keeper) TransferOwnership ¶
func (keeper Keeper) TransferOwnership(ctx sdk.Context, issueID string, operator sdk.AccAddress, to sdk.AccAddress) sdk.Error
TransferOwnership