Documentation
¶
Index ¶
- Constants
- Variables
- func ProtoBaseAccount() exported.Account
- func RegisterCodec(cdc *codec.Codec)
- func WrapErrInternalError(msg string) error
- func WrapErrInvalidChainID(msg string) error
- func WrapErrInvalidNonce(msg string) error
- func WrapErrInvalidSender(msg string) error
- func WrapErrInvalidValue(msg string) error
- func WrapErrVMExecution(msg string) error
- type Account
- type AppContext
- type Code
- type Storage
Constants ¶
const ( // DefaultCodespace reserves a Codespace for Ethermint. DefaultCodespace = "ethermint" CodeInvalidValue uint32 = 1 CodeInvalidChainID uint32 = 2 CodeInvalidSender uint32 = 3 CodeVMExecution uint32 = 4 CodeInvalidNonce uint32 = 5 CodeInternalError uint32 = 6 )
Ethermint error codes
const ( // DefaultGasPrice is default gas price for evm transactions DefaultGasPrice = 20 // DefaultRPCGasLimit is default gas limit for RPC call operations DefaultRPCGasLimit = 10000000 )
const ( // DenomDefault defines the single coin type/denomination supported in // Ethermint. DenomDefault = "photon" )
const (
// Amino encoding name
EthermintAccountName = "emint/Account"
)
Variables ¶
var ( ErrInvalidValue = sdk.Register(DefaultCodespace, CodeInvalidValue, "invalid value") ErrInvalidChainID = sdk.Register(DefaultCodespace, CodeInvalidChainID, "invalid chainid") ErrInvalidSender = sdk.Register(DefaultCodespace, CodeInvalidSender, "invalid sender") ErrVMExecution = sdk.Register(DefaultCodespace, CodeVMExecution, "vme execution failed") ErrInvalidNonce = sdk.Register(DefaultCodespace, CodeInvalidNonce, "invalid nonce") ErrInternalError = sdk.Register(DefaultCodespace, CodeInternalError, "internal errot") )
Functions ¶
func ProtoBaseAccount ¶
ProtoBaseAccount defines the prototype function for BaseAccount used for an account mapper.
func RegisterCodec ¶
RegisterCodec registers all the necessary types with amino for the given codec.
func WrapErrInternalError ¶
func WrapErrInvalidChainID ¶
ErrInvalidChainID returns a standardized SDK error resulting from an invalid chain ID.
func WrapErrInvalidNonce ¶
ErrVMExecution returns a standardized SDK error resulting from an error in EVM execution.
func WrapErrInvalidSender ¶
ErrInvalidSender returns a standardized SDK error resulting from an invalid transaction sender.
func WrapErrInvalidValue ¶
ErrInvalidValue returns a standardized SDK error resulting from an invalid value.
func WrapErrVMExecution ¶
ErrVMExecution returns a standardized SDK error resulting from an error in EVM execution.
Types ¶
type Account ¶
type Account struct { *auth.BaseAccount CodeHash []byte }
Account implements the auth.Account interface and embeds an auth.BaseAccount type. It is compatible with the auth.AccountMapper.
func (Account) MarshalJSON ¶
MarshalJSON returns the JSON representation of an Account.
func (Account) MarshalYAML ¶
MarshalYAML returns the YAML representation of an account.
func (Account) SetBalance ¶
SetBalance sets an account's balance of photons
func (*Account) UnmarshalJSON ¶
UnmarshalJSON unmarshals raw JSON bytes into an Account.
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.