erc20service

package
v0.0.0-...-1113a1e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InitBalance = sdk.Coins{sdk.NewInt64Coin("erc20", 0)}

Functions

func NewHandler

func NewHandler(keeper Keeper) sdk.Handler

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 Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(storeKey sdk.StoreKey, lockStoreKey sdk.StoreKey, cdc *codec.Codec) Keeper

func (Keeper) Balance

func (k Keeper) Balance(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins

func (Keeper) Burn

func (k Keeper) Burn(ctx sdk.Context, addr sdk.AccAddress, balance sdk.Coins)

func (Keeper) Lock

func (k Keeper) Lock(ctx sdk.Context, addr sdk.AccAddress, balance sdk.Coins)

func (Keeper) Mint

func (k Keeper) Mint(ctx sdk.Context, addr sdk.AccAddress, balance sdk.Coins)

func (Keeper) UnLock

func (k Keeper) UnLock(ctx sdk.Context, addr sdk.AccAddress, balance sdk.Coins)

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 (m MsgBurn) GetSignBytes() []byte

func (MsgBurn) GetSigners

func (m MsgBurn) GetSigners() []sdk.AccAddress

func (MsgBurn) Route

func (m MsgBurn) Route() string

func (MsgBurn) Type

func (m MsgBurn) Type() string

func (MsgBurn) ValidateBasic

func (m MsgBurn) ValidateBasic() sdk.Error

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

func (m MsgLock) GetSignBytes() []byte

GetSignBytes() encodes the message for signing.

func (MsgLock) GetSigners

func (m MsgLock) GetSigners() []sdk.AccAddress

GetSigners() defines whose signature is required.

func (MsgLock) Route

func (m MsgLock) Route() string

Route() should return the name of the module.

func (MsgLock) Type

func (m MsgLock) Type() string

Type() should return the action

func (MsgLock) ValidateBasic

func (m MsgLock) ValidateBasic() sdk.Error

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 (m MsgMint) GetSignBytes() []byte

func (MsgMint) GetSigners

func (m MsgMint) GetSigners() []sdk.AccAddress

func (MsgMint) Route

func (m MsgMint) Route() string

func (MsgMint) Type

func (m MsgMint) Type() string

func (MsgMint) ValidateBasic

func (m MsgMint) ValidateBasic() sdk.Error

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 (m MsgUnlock) GetSignBytes() []byte

func (MsgUnlock) GetSigners

func (m MsgUnlock) GetSigners() []sdk.AccAddress

func (MsgUnlock) Route

func (m MsgUnlock) Route() string

func (MsgUnlock) Type

func (m MsgUnlock) Type() string

func (MsgUnlock) ValidateBasic

func (m MsgUnlock) ValidateBasic() sdk.Error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL