Documentation ¶
Index ¶
- Variables
- func NewHandler(keeper Keeper) sdk.Handler
- type Account
- type Keeper
- func (k Keeper) Balance(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
- func (k Keeper) Burn(ctx sdk.Context, addr sdk.AccAddress, balance sdk.Coins)
- func (k Keeper) Lock(ctx sdk.Context, addr sdk.AccAddress, balance sdk.Coins)
- func (k Keeper) Mint(ctx sdk.Context, addr sdk.AccAddress, balance sdk.Coins)
- func (k Keeper) UnLock(ctx sdk.Context, addr sdk.AccAddress, balance sdk.Coins)
- type MsgBurn
- type MsgLock
- type MsgMint
- type MsgUnlock
Constants ¶
This section is empty.
Variables ¶
View Source
var InitBalance = sdk.Coins{sdk.NewInt64Coin("erc20", 0)}
Functions ¶
func NewHandler ¶
NewHandler() returns a handler for "erc20service" type messages.
Types ¶
type Account ¶
type Account struct { Owner sdk.AccAddress `json:"owner"` Balance sdk.Coins `json:"balance"` }
Erc20 account state
func NewAccount ¶
func NewAccount(owner sdk.AccAddress) Account
Create a new account. Initial balance of account is 0.
type MsgBurn ¶
type MsgBurn struct { Owner sdk.AccAddress Balance sdk.Coins }
func NewMsgBurn ¶
func NewMsgBurn(addr sdk.AccAddress, balance sdk.Coins) MsgBurn
func (MsgBurn) GetSignBytes ¶
func (MsgBurn) GetSigners ¶
func (m MsgBurn) GetSigners() []sdk.AccAddress
func (MsgBurn) ValidateBasic ¶
type MsgLock ¶
type MsgLock struct { Owner sdk.AccAddress Balance sdk.Coins }
MsgLock defines a Lock message.
func NewMsgLock ¶
func NewMsgLock(addr sdk.AccAddress, balance sdk.Coins) MsgLock
NewMsgLock() is a constructor for MsgLock.
func (MsgLock) GetSignBytes ¶
GetSignBytes() encodes the message for signing.
func (MsgLock) GetSigners ¶
func (m MsgLock) GetSigners() []sdk.AccAddress
GetSigners() defines whose signature is required.
func (MsgLock) ValidateBasic ¶
ValidateBasic() runs stateless checks on the message.
type MsgMint ¶
type MsgMint struct { Owner sdk.AccAddress Balance sdk.Coins }
func NewMsgMint ¶
func NewMsgMint(addr sdk.AccAddress, balance sdk.Coins) MsgMint
func (MsgMint) GetSignBytes ¶
func (MsgMint) GetSigners ¶
func (m MsgMint) GetSigners() []sdk.AccAddress
func (MsgMint) ValidateBasic ¶
type MsgUnlock ¶
type MsgUnlock struct { Owner sdk.AccAddress Balance sdk.Coins }
func NewMsgUnlock ¶
func NewMsgUnlock(addr sdk.AccAddress, balance sdk.Coins) MsgUnlock
func (MsgUnlock) GetSignBytes ¶
func (MsgUnlock) GetSigners ¶
func (m MsgUnlock) GetSigners() []sdk.AccAddress
func (MsgUnlock) ValidateBasic ¶
Click to show internal directories.
Click to hide internal directories.