types

package
v0.0.0-...-c073115 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultCodespace reserves a Codespace for Ethermint.
	DefaultCodespace sdk.CodespaceType = "ethermint"

	CodeInvalidValue   sdk.CodeType = 1
	CodeInvalidChainID sdk.CodeType = 2
)

Ethermint error codes

View Source
const (
	// DenomDefault defines the single coin type/denomination supported in
	// Ethermint.
	DenomDefault = "Photon"
)

Variables

This section is empty.

Functions

func ErrInvalidChainID

func ErrInvalidChainID(msg string) sdk.Error

ErrInvalidChainID returns a standardized SDK error resulting from an invalid chain ID.

func ErrInvalidValue

func ErrInvalidValue(msg string) sdk.Error

ErrInvalidValue returns a standardized SDK error resulting from an invalid value.

func ProtoBaseAccount

func ProtoBaseAccount() auth.Account

ProtoBaseAccount defines the prototype function for BaseAccount used for an account mapper.

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers all the necessary types with amino for the given codec.

Types

type Account

type Account struct {
	*auth.BaseAccount

	// merkle root of the storage trie
	//
	// TODO: good chance we may not need this
	Root ethcmn.Hash

	CodeHash []byte
}

BaseAccount implements the auth.Account interface and embeds an auth.BaseAccount type. It is compatible with the auth.AccountMapper.

func (Account) Balance

func (acc Account) Balance() sdk.Int

Balance returns the balance of an account.

func (Account) SetBalance

func (acc Account) SetBalance(amt sdk.Int)

SetBalance sets an account's balance.

type AppContext

type AppContext struct {
}

AppContext provides the ability for the application to pass around and obtain immutable objects easily. More importantly, it allows for the utilization of the object-capability model in which components gain access to other components for which they truly need.

type Code

type Code []byte

Account code and storage type aliases.

func (Code) String

func (c Code) String() string

type Storage

type Storage map[ethcmn.Hash]ethcmn.Hash

Account code and storage type aliases.

func (Storage) Copy

func (c Storage) Copy() Storage

Copy returns a copy of storage.

func (Storage) String

func (c Storage) String() (str string)

Jump to

Keyboard shortcuts

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