erc20zone

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: 5 Imported by: 0

README

ERC20 Zone

ERC20 Zone is a zone of the Cosmos for ERC20 token.

This zone has a service which manages erc20 tokens.

Interface

ERC20 Zone has following interfaces.

Mint

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

Mint erc20 tokens to the address.

Burn

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

Burn erc20 tokens of the address.

Lock

Lock erc20 tokens of the address. When you transfer erc20 tokens to ehter, this will be used.

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

Unlock

Unlock erc20 tokens of the address. When you transfer ether to erc20 tokens, this will be used.

Unlock(ctx sdk.Context, addr sdk.AccAddress, balance sdk.Coins)

Struct

ERC20 Account State
type Account struct {
	Owner   sdk.AccAddress `json:"owner"`
	Balance sdk.Coins      `json:"balance"`
}
Keeper
type Keeper struct {
	accStoreKey  sdk.StoreKey
	lockStoreKey sdk.StoreKey
	cdc          *codec.Codec
}
Message
type MsgLock struct {
	Owner   sdk.AccAddress
	Balance sdk.Coins
}
type MsgUnlock struct {
	Owner   sdk.AccAddress
	Balance sdk.Coins
}
type MsgMint struct {
	Owner   sdk.AccAddress
	Balance sdk.Coins
}
type MsgBurn struct {
	Owner   sdk.AccAddress
	Balance sdk.Coins
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewErc20ServiceApp

func NewErc20ServiceApp(logger log.Logger, db dbm.DB) *erc20ServiceApp

Types

This section is empty.

Directories

Path Synopsis
x

Jump to

Keyboard shortcuts

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