Documentation ¶
Index ¶
- Variables
- type AccountKeeper
- type BankKeeper
- type Hooks
- type Keeper
- func (k Keeper) AddBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Int) (sdk.Int, error)
- func (k Keeper) AddPermission(ctx sdk.Context, addr sdk.AccAddress, perm types.Permission)
- func (k Keeper) BurnSupply(ctx sdk.Context, from sdk.AccAddress, amount sdk.Int) (err error)
- func (k Keeper) BurnToken(ctx sdk.Context, amount sdk.Int, from sdk.AccAddress) error
- func (k Keeper) BurnTokenFrom(ctx sdk.Context, proxy sdk.AccAddress, from sdk.AccAddress, amount sdk.Int) error
- func (k Keeper) GetAccount(ctx sdk.Context, addr sdk.AccAddress) (acc types.Account, err error)
- func (k Keeper) GetAllTokens(ctx sdk.Context) (tokens types.Tokens)
- func (k Keeper) GetApprovers(ctx sdk.Context, proxy sdk.AccAddress) (accAds []sdk.AccAddress, err error)
- func (k Keeper) GetBalance(ctx sdk.Context, addr sdk.AccAddress) sdk.Int
- func (k Keeper) GetOrNewAccount(ctx sdk.Context, addr sdk.AccAddress) (acc types.Account, err error)
- func (k Keeper) GetPermissions(ctx sdk.Context, addr sdk.AccAddress) types.Permissions
- func (k Keeper) GetToken(ctx sdk.Context) (types.Token, error)
- func (k Keeper) GetTotalInt(ctx sdk.Context, target string) (sdk.Int, error)
- func (k Keeper) GrantPermission(ctx sdk.Context, from, to sdk.AccAddress, perm types.Permission) error
- func (k Keeper) HasBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Int) bool
- func (k Keeper) HasContractID(ctx sdk.Context) bool
- func (k Keeper) HasPermission(ctx sdk.Context, addr sdk.AccAddress, p types.Permission) bool
- func (k Keeper) Hooks() *Hooks
- func (k Keeper) IsApproved(ctx sdk.Context, proxy sdk.AccAddress, approver sdk.AccAddress) bool
- func (k Keeper) IsBlacklisted(ctx sdk.Context, addr sdk.AccAddress, action string) bool
- func (k Keeper) IssueToken(ctx sdk.Context, token types.Token, amount sdk.Int, owner, to sdk.AccAddress) error
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MarshalJSON(o interface{}) ([]byte, error)
- func (k Keeper) MarshalJSONIndent(o interface{}) ([]byte, error)
- func (k Keeper) MintSupply(ctx sdk.Context, to sdk.AccAddress, amount sdk.Int) (err error)
- func (k Keeper) MintToken(ctx sdk.Context, amount sdk.Int, from, to sdk.AccAddress) error
- func (k Keeper) ModifyToken(ctx sdk.Context, owner sdk.AccAddress, changes types.Changes) error
- func (k Keeper) NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) (acc types.Account, err error)
- func (k Keeper) NewContractID(ctx sdk.Context) string
- func (k Keeper) RevokePermission(ctx sdk.Context, addr sdk.AccAddress, perm types.Permission) error
- func (k Keeper) Send(ctx sdk.Context, from, to sdk.AccAddress, amt sdk.Int) error
- func (k Keeper) SetAccount(ctx sdk.Context, acc types.Account) error
- func (k Keeper) SetApproved(ctx sdk.Context, proxy sdk.AccAddress, approver sdk.AccAddress) error
- func (k Keeper) SetBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Int) error
- func (k Keeper) SetBlackList(ctx sdk.Context, addr sdk.AccAddress, action string)
- func (k Keeper) SetToken(ctx sdk.Context, token types.Token) error
- func (k Keeper) SubtractBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Int) (sdk.Int, error)
- func (k Keeper) Transfer(ctx sdk.Context, from sdk.AccAddress, to sdk.AccAddress, amount sdk.Int) error
- func (k Keeper) TransferFrom(ctx sdk.Context, proxy sdk.AccAddress, from sdk.AccAddress, to sdk.AccAddress, ...) error
- func (k Keeper) UnmarshalJSON(bz []byte, ptr interface{}) error
- func (k Keeper) UpdateAccount(ctx sdk.Context, acc types.Account) error
- func (k Keeper) UpdateToken(ctx sdk.Context, token types.Token) error
- type ProxyKeeper
- type SupplyKeeper
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ApprovedValue = []byte{0x01}
)
Functions ¶
This section is empty.
Types ¶
type AccountKeeper ¶
type AccountKeeper interface { NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) (acc types.Account, err error) GetOrNewAccount(ctx sdk.Context, addr sdk.AccAddress) (acc types.Account, err error) GetAccount(ctx sdk.Context, addr sdk.AccAddress) (acc types.Account, err error) SetAccount(ctx sdk.Context, acc types.Account) error UpdateAccount(ctx sdk.Context, acc types.Account) error }
type BankKeeper ¶
type BankKeeper interface { GetBalance(ctx sdk.Context, addr sdk.AccAddress) sdk.Int SetBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Int) error HasBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Int) bool SubtractBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Int) (sdk.Int, error) AddBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Int) (sdk.Int, error) Send(ctx sdk.Context, from, to sdk.AccAddress, amt sdk.Int) error }
For the Token module
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
Hooks wrapper struct for safety box keeper
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func TestKeeper ¶
func TestKeeper() (sdk.Context, store.CommitMultiStore, Keeper)
func (Keeper) AddBalance ¶
func (Keeper) AddPermission ¶
func (k Keeper) AddPermission(ctx sdk.Context, addr sdk.AccAddress, perm types.Permission)
func (Keeper) BurnSupply ¶
func (Keeper) BurnTokenFrom ¶
func (k Keeper) BurnTokenFrom(ctx sdk.Context, proxy sdk.AccAddress, from sdk.AccAddress, amount sdk.Int) error
func (Keeper) GetAccount ¶
func (Keeper) GetApprovers ¶
func (k Keeper) GetApprovers(ctx sdk.Context, proxy sdk.AccAddress) (accAds []sdk.AccAddress, err error)
func (Keeper) GetBalance ¶
func (Keeper) GetOrNewAccount ¶
func (Keeper) GetPermissions ¶
func (k Keeper) GetPermissions(ctx sdk.Context, addr sdk.AccAddress) types.Permissions
func (Keeper) GetTotalInt ¶
func (Keeper) GrantPermission ¶
func (k Keeper) GrantPermission(ctx sdk.Context, from, to sdk.AccAddress, perm types.Permission) error
func (Keeper) HasBalance ¶
func (Keeper) HasPermission ¶
func (k Keeper) HasPermission(ctx sdk.Context, addr sdk.AccAddress, p types.Permission) bool
func (Keeper) IsApproved ¶
func (k Keeper) IsApproved(ctx sdk.Context, proxy sdk.AccAddress, approver sdk.AccAddress) bool
func (Keeper) IsBlacklisted ¶
func (Keeper) IssueToken ¶
func (Keeper) MarshalJSON ¶
func (Keeper) MarshalJSONIndent ¶
func (Keeper) MintSupply ¶
func (Keeper) ModifyToken ¶
func (Keeper) NewAccountWithAddress ¶
func (Keeper) RevokePermission ¶
func (k Keeper) RevokePermission(ctx sdk.Context, addr sdk.AccAddress, perm types.Permission) error
func (Keeper) SetApproved ¶
func (k Keeper) SetApproved(ctx sdk.Context, proxy sdk.AccAddress, approver sdk.AccAddress) error
func (Keeper) SetBalance ¶
func (Keeper) SetBlackList ¶
func (Keeper) SubtractBalance ¶
func (Keeper) Transfer ¶
func (k Keeper) Transfer(ctx sdk.Context, from sdk.AccAddress, to sdk.AccAddress, amount sdk.Int) error
func (Keeper) TransferFrom ¶
func (k Keeper) TransferFrom(ctx sdk.Context, proxy sdk.AccAddress, from sdk.AccAddress, to sdk.AccAddress, amount sdk.Int) error
func (Keeper) UnmarshalJSON ¶
func (Keeper) UpdateAccount ¶
type ProxyKeeper ¶
type ProxyKeeper interface { IsApproved(ctx sdk.Context, proxy sdk.AccAddress, approver sdk.AccAddress) bool SetApproved(ctx sdk.Context, proxy sdk.AccAddress, approver sdk.AccAddress) error DeleteApproved(ctx sdk.Context, proxy sdk.AccAddress, approver sdk.AccAddress) error }
Click to show internal directories.
Click to hide internal directories.