types

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: LGPL-3.0 Imports: 59 Imported by: 713

Documentation

Overview

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Copyright 2021 Evmos Foundation This file is part of Evmos' Ethermint library.

The Ethermint library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Ethermint library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE

Index

Constants

View Source
const (
	EventTypeEthereumTx = TypeMsgEthereumTx
	EventTypeBlockBloom = "block_bloom"
	EventTypeTxLog      = "tx_log"

	AttributeKeyContractAddress = "contract"
	AttributeKeyRecipient       = "recipient"
	AttributeKeyTxHash          = "txHash"
	AttributeKeyEthereumTxHash  = "ethereumTxHash"
	AttributeKeyTxIndex         = "txIndex"
	AttributeKeyTxGasUsed       = "txGasUsed"
	AttributeKeyTxType          = "txType"
	AttributeKeyTxLog           = "txLog"
	// tx failed in eth vm execution
	AttributeKeyEthereumTxFailed = "ethereumTxFailed"
	AttributeValueCategory       = ModuleName
	AttributeKeyEthereumBloom    = "bloom"

	MetricKeyTransitionDB = "transition_db"
	MetricKeyStaticCall   = "static_call"
)

Evm module events

View Source
const (
	// ModuleName string name of module
	ModuleName = "evm"

	// StoreKey key for ethereum storage data, account code (StateDB) or block
	// related data for Web3.
	// The EVM module should use a prefix store.
	StoreKey = ModuleName

	// TransientKey is the key to access the EVM transient store, that is reset
	// during the Commit phase.
	TransientKey = "transient_" + ModuleName

	// RouterKey uses module name for routing
	RouterKey = ModuleName
)
View Source
const (
	TracerAccessList = "access_list"
	TracerJSON       = "json"
	TracerStruct     = "struct"
	TracerMarkdown   = "markdown"
)
View Source
const (
	// TypeMsgEthereumTx defines the type string of an Ethereum transaction
	TypeMsgEthereumTx = "ethereum_tx"
)

message type and route constants

Variables

View Source
var (

	// ModuleCdc references the global evm module codec. Note, the codec should
	// ONLY be used in certain instances of tests and for JSON encoding.
	ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry())

	// AminoCdc is a amino codec created to support amino JSON compatible msgs.
	AminoCdc = codec.NewAminoCodec(amino)
)
View Source
var (
	// ErrInvalidState returns an error resulting from an invalid Storage State.
	ErrInvalidState = errorsmod.Register(ModuleName, codeErrInvalidState, "invalid storage state")

	// ErrExecutionReverted returns an error resulting from an error in EVM execution.
	ErrExecutionReverted = errorsmod.Register(ModuleName, codeErrExecutionReverted, vm.ErrExecutionReverted.Error())

	// ErrChainConfigNotFound returns an error if the chain config cannot be found on the store.
	ErrChainConfigNotFound = errorsmod.Register(ModuleName, codeErrChainConfigNotFound, "chain configuration not found")

	// ErrInvalidChainConfig returns an error resulting from an invalid ChainConfig.
	ErrInvalidChainConfig = errorsmod.Register(ModuleName, codeErrInvalidChainConfig, "invalid chain configuration")

	// ErrZeroAddress returns an error resulting from an zero (empty) ethereum Address.
	ErrZeroAddress = errorsmod.Register(ModuleName, codeErrZeroAddress, "invalid zero address")

	// ErrEmptyHash returns an error resulting from an empty ethereum Hash.
	ErrEmptyHash = errorsmod.Register(ModuleName, codeErrEmptyHash, "empty hash")

	// ErrBloomNotFound returns an error if the block bloom cannot be found on the store.
	ErrBloomNotFound = errorsmod.Register(ModuleName, codeErrBloomNotFound, "block bloom not found")

	// ErrTxReceiptNotFound returns an error if the transaction receipt could not be found
	ErrTxReceiptNotFound = errorsmod.Register(ModuleName, codeErrTxReceiptNotFound, "transaction receipt not found")

	// ErrCreateDisabled returns an error if the EnableCreate parameter is false.
	ErrCreateDisabled = errorsmod.Register(ModuleName, codeErrCreateDisabled, "EVM Create operation is disabled")

	// ErrCallDisabled returns an error if the EnableCall parameter is false.
	ErrCallDisabled = errorsmod.Register(ModuleName, codeErrCallDisabled, "EVM Call operation is disabled")

	// ErrInvalidAmount returns an error if a tx contains an invalid amount.
	ErrInvalidAmount = errorsmod.Register(ModuleName, codeErrInvalidAmount, "invalid transaction amount")

	// ErrInvalidGasPrice returns an error if an invalid gas price is provided to the tx.
	ErrInvalidGasPrice = errorsmod.Register(ModuleName, codeErrInvalidGasPrice, "invalid gas price")

	// ErrInvalidGasFee returns an error if the tx gas fee is out of bound.
	ErrInvalidGasFee = errorsmod.Register(ModuleName, codeErrInvalidGasFee, "invalid gas fee")

	// ErrVMExecution returns an error resulting from an error in EVM execution.
	ErrVMExecution = errorsmod.Register(ModuleName, codeErrVMExecution, "evm transaction execution failed")

	// ErrInvalidRefund returns an error if a the gas refund value is invalid.
	ErrInvalidRefund = errorsmod.Register(ModuleName, codeErrInvalidRefund, "invalid gas refund amount")

	// ErrInconsistentGas returns an error if a the gas differs from the expected one.
	ErrInconsistentGas = errorsmod.Register(ModuleName, codeErrInconsistentGas, "inconsistent gas")

	// ErrInvalidGasCap returns an error if a the gas cap value is negative or invalid
	ErrInvalidGasCap = errorsmod.Register(ModuleName, codeErrInvalidGasCap, "invalid gas cap")

	// ErrInvalidBaseFee returns an error if a the base fee cap value is invalid
	ErrInvalidBaseFee = errorsmod.Register(ModuleName, codeErrInvalidBaseFee, "invalid base fee")

	// ErrGasOverflow returns an error if gas computation overlow/underflow
	ErrGasOverflow = errorsmod.Register(ModuleName, codeErrGasOverflow, "gas computation overflow/underflow")

	// ErrInvalidAccount returns an error if the account is not an EVM compatible account
	ErrInvalidAccount = errorsmod.Register(ModuleName, codeErrInvalidAccount, "account type is not a valid ethereum account")

	// ErrInvalidGasLimit returns an error if gas limit value is invalid
	ErrInvalidGasLimit = errorsmod.Register(ModuleName, codeErrInvalidGasLimit, "invalid gas limit")
)
View Source
var (
	ErrInvalidLengthEvents        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvents          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthEvm        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvm          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvm = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	KeyPrefixCode    = []byte{prefixCode}
	KeyPrefixStorage = []byte{prefixStorage}
	KeyPrefixParams  = []byte{prefixParams}
)

KVStore key prefixes

View Source
var (
	KeyPrefixTransientBloom   = []byte{prefixTransientBloom}
	KeyPrefixTransientTxIndex = []byte{prefixTransientTxIndex}
	KeyPrefixTransientLogSize = []byte{prefixTransientLogSize}
	KeyPrefixTransientGasUsed = []byte{prefixTransientGasUsed}
)

Transient Store key prefixes

View Source
var (
	// DefaultEVMDenom defines the default EVM denomination on Ethermint
	DefaultEVMDenom = types.AttoPhoton
	// DefaultAllowUnprotectedTxs rejects all unprotected txs (i.e false)
	DefaultAllowUnprotectedTxs = false
	// DefaultEnableCreate enables contract creation (i.e true)
	DefaultEnableCreate = true
	// DefaultEnableCall enables contract calls (i.e true)
	DefaultEnableCall = true
)
View Source
var (
	ParamStoreKeyEVMDenom            = []byte("EVMDenom")
	ParamStoreKeyEnableCreate        = []byte("EnableCreate")
	ParamStoreKeyEnableCall          = []byte("EnableCall")
	ParamStoreKeyExtraEIPs           = []byte("EnableExtraEIPs")
	ParamStoreKeyChainConfig         = []byte("ChainConfig")
	ParamStoreKeyAllowUnprotectedTxs = []byte("AllowUnprotectedTxs")
)

Parameter keys

View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var AvailableExtraEIPs = []int64{1344, 1884, 2200, 2929, 3198, 3529}

AvailableExtraEIPs define the list of all EIPs that can be enabled by the EVM interpreter. These EIPs are applied in order and can override the instruction sets from the latest hard fork enabled by the ChainConfig. For more info check: https://github.com/ethereum/go-ethereum/blob/master/core/vm/interpreter.go#L97

View Source
var DefaultPriorityReduction = sdk.DefaultPowerReduction

DefaultPriorityReduction is the default amount of price values required for 1 unit of priority. Because priority is `int64` while price is `big.Int`, it's necessary to scale down the range to keep it more pratical. The default value is the same as the `sdk.DefaultPowerReduction`.

View Source
var EmptyCodeHash = crypto.Keccak256(nil)
View Source
var ErrPostTxProcessing = errors.New("failed to execute post processing")

Functions

func AddressStoragePrefix

func AddressStoragePrefix(address common.Address) []byte

AddressStoragePrefix returns a prefix to iterate over a given account storage.

func BinSearch

func BinSearch(lo, hi uint64, executable func(uint64) (bool, *MsgEthereumTxResponse, error)) (uint64, error)

BinSearch execute the binary search and hone in on an executable gas limit

func DeriveChainID

func DeriveChainID(v *big.Int) *big.Int

DeriveChainID derives the chain id from the given v parameter.

CONTRACT: v value is either:

  • {0,1} + CHAIN_ID * 2 + 35, if EIP155 is used
  • {0,1} + 27, otherwise

Ref: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md

func EffectiveGasPrice added in v0.20.0

func EffectiveGasPrice(baseFee *big.Int, feeCap *big.Int, tipCap *big.Int) *big.Int

EffectiveGasPrice compute the effective gas price based on eip-1159 rules `effectiveGasPrice = min(baseFee + tipCap, feeCap)`

func EncodeTransactionLogs

func EncodeTransactionLogs(res *TransactionLogs) ([]byte, error)

EncodeTransactionLogs encodes TransactionLogs slice into a protobuf-encoded byte slice.

func GetTxPriority added in v0.20.0

func GetTxPriority(txData TxData, baseFee *big.Int) (priority int64)

GetTxPriority returns the priority of a given Ethereum tx. It relies of the priority reduction global variable to calculate the tx priority given the tx tip price:

tx_priority = tip_price / priority_reduction

func IsLondon

func IsLondon(ethConfig *params.ChainConfig, height int64) bool

IsLondon returns if london hardfork is enabled.

func LogsToEthereum

func LogsToEthereum(logs []*Log) []*ethtypes.Log

LogsToEthereum casts the Ethermint Logs to a slice of Ethereum Logs.

func NewTracer

func NewTracer(tracer string, msg core.Message, cfg *params.ChainConfig, height int64) vm.EVMLogger

NewTracer creates a new Logger tracer to collect execution traces from an EVM transaction.

func PackTxData

func PackTxData(txData TxData) (*codectypes.Any, error)

PackTxData constructs a new Any packed with the given tx data value. It returns an error if the client state can't be casted to a protobuf message or if the concrete implementation is not registered to the protobuf codec.

func ParamKeyTable deprecated

func ParamKeyTable() paramtypes.KeyTable

Deprecated: ParamKeyTable returns the parameter key table. Usage of x/params to manage parameters is deprecated in favor of x/gov controlled execution of MsgUpdateParams messages. These types remain solely for migration purposes and will be removed in a future release.

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces registers the client interfaces to protobuf Any.

func RegisterLegacyAminoCodec added in v0.21.0

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec required for EIP-712

func RegisterMsgHandler

func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterMsgHandler registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterMsgHandlerClient

func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error

RegisterMsgHandlerClient registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MsgClient" to call the correct interceptors.

func RegisterMsgHandlerFromEndpoint

func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterMsgHandlerServer

func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error

RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". UnaryRPC :call MsgServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMsgHandlerFromEndpoint instead.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func StateKey

func StateKey(address common.Address, key []byte) []byte

StateKey defines the full key under which an account state is stored.

Types

type AccessList

type AccessList []AccessTuple

AccessList is an EIP-2930 access list that represents the slice of the protobuf AccessTuples.

func NewAccessList

func NewAccessList(ethAccessList *ethtypes.AccessList) AccessList

NewAccessList creates a new protobuf-compatible AccessList from an ethereum core AccessList type

func (AccessList) ToEthAccessList

func (al AccessList) ToEthAccessList() *ethtypes.AccessList

ToEthAccessList is an utility function to convert the protobuf compatible AccessList to eth core AccessList from go-ethereum

type AccessListTx

type AccessListTx struct {
	// chain_id of the destination EVM chain
	ChainID *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"chainID"`
	// nonce corresponds to the account nonce (transaction sequence).
	Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// gas_price defines the value for each gas unit
	GasPrice *github_com_cosmos_cosmos_sdk_types.Int `` /* 135-byte string literal not displayed */
	// gas defines the gas limit defined for the transaction.
	GasLimit uint64 `protobuf:"varint,4,opt,name=gas,proto3" json:"gas,omitempty"`
	// to is the recipient address in hex format
	To string `protobuf:"bytes,5,opt,name=to,proto3" json:"to,omitempty"`
	// value defines the unsigned integer value of the transaction amount.
	Amount *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"value,omitempty"`
	// data is the data payload bytes of the transaction.
	Data []byte `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"`
	// accesses is an array of access tuples
	Accesses AccessList `protobuf:"bytes,8,rep,name=accesses,proto3,castrepeated=AccessList" json:"accessList"`
	// v defines the signature value
	V []byte `protobuf:"bytes,9,opt,name=v,proto3" json:"v,omitempty"`
	// r defines the signature value
	R []byte `protobuf:"bytes,10,opt,name=r,proto3" json:"r,omitempty"`
	// s define the signature value
	S []byte `protobuf:"bytes,11,opt,name=s,proto3" json:"s,omitempty"`
}

AccessListTx is the data of EIP-2930 access list transactions.

func (*AccessListTx) AsEthereumData

func (tx *AccessListTx) AsEthereumData() ethtypes.TxData

AsEthereumData returns an AccessListTx transaction tx from the proto-formatted TxData defined on the Cosmos EVM.

func (*AccessListTx) Copy

func (tx *AccessListTx) Copy() TxData

Copy returns an instance with the same field values

func (AccessListTx) Cost

func (tx AccessListTx) Cost() *big.Int

Cost returns amount + gasprice * gaslimit.

func (*AccessListTx) Descriptor

func (*AccessListTx) Descriptor() ([]byte, []int)

func (AccessListTx) EffectiveCost

func (tx AccessListTx) EffectiveCost(_ *big.Int) *big.Int

EffectiveCost is the same as Cost for AccessListTx

func (AccessListTx) EffectiveFee

func (tx AccessListTx) EffectiveFee(_ *big.Int) *big.Int

EffectiveFee is the same as Fee for AccessListTx

func (AccessListTx) EffectiveGasPrice added in v0.20.0

func (tx AccessListTx) EffectiveGasPrice(_ *big.Int) *big.Int

EffectiveGasPrice is the same as GasPrice for AccessListTx

func (AccessListTx) Fee

func (tx AccessListTx) Fee() *big.Int

Fee returns gasprice * gaslimit.

func (*AccessListTx) GetAccessList

func (tx *AccessListTx) GetAccessList() ethtypes.AccessList

GetAccessList returns the AccessList field.

func (*AccessListTx) GetChainID

func (tx *AccessListTx) GetChainID() *big.Int

GetChainID returns the chain id field from the AccessListTx

func (*AccessListTx) GetData

func (tx *AccessListTx) GetData() []byte

GetData returns the a copy of the input data bytes.

func (*AccessListTx) GetGas

func (tx *AccessListTx) GetGas() uint64

GetGas returns the gas limit.

func (*AccessListTx) GetGasFeeCap

func (tx *AccessListTx) GetGasFeeCap() *big.Int

GetGasFeeCap returns the gas price field.

func (*AccessListTx) GetGasPrice

func (tx *AccessListTx) GetGasPrice() *big.Int

GetGasPrice returns the gas price field.

func (*AccessListTx) GetGasTipCap

func (tx *AccessListTx) GetGasTipCap() *big.Int

GetGasTipCap returns the gas price field.

func (*AccessListTx) GetNonce

func (tx *AccessListTx) GetNonce() uint64

GetNonce returns the account sequence for the transaction.

func (*AccessListTx) GetRawSignatureValues

func (tx *AccessListTx) GetRawSignatureValues() (v, r, s *big.Int)

GetRawSignatureValues returns the V, R, S signature values of the transaction. The return values should not be modified by the caller.

func (*AccessListTx) GetTo

func (tx *AccessListTx) GetTo() *common.Address

GetTo returns the pointer to the recipient address.

func (*AccessListTx) GetValue

func (tx *AccessListTx) GetValue() *big.Int

GetValue returns the tx amount.

func (*AccessListTx) Marshal

func (m *AccessListTx) Marshal() (dAtA []byte, err error)

func (*AccessListTx) MarshalTo

func (m *AccessListTx) MarshalTo(dAtA []byte) (int, error)

func (*AccessListTx) MarshalToSizedBuffer

func (m *AccessListTx) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AccessListTx) ProtoMessage

func (*AccessListTx) ProtoMessage()

func (*AccessListTx) Reset

func (m *AccessListTx) Reset()

func (*AccessListTx) SetSignatureValues

func (tx *AccessListTx) SetSignatureValues(chainID, v, r, s *big.Int)

SetSignatureValues sets the signature values to the transaction.

func (*AccessListTx) Size

func (m *AccessListTx) Size() (n int)

func (*AccessListTx) String

func (m *AccessListTx) String() string

func (*AccessListTx) TxType

func (tx *AccessListTx) TxType() uint8

TxType returns the tx type

func (*AccessListTx) Unmarshal

func (m *AccessListTx) Unmarshal(dAtA []byte) error

func (AccessListTx) Validate

func (tx AccessListTx) Validate() error

Validate performs a stateless validation of the tx fields.

func (*AccessListTx) XXX_DiscardUnknown

func (m *AccessListTx) XXX_DiscardUnknown()

func (*AccessListTx) XXX_Marshal

func (m *AccessListTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccessListTx) XXX_Merge

func (m *AccessListTx) XXX_Merge(src proto.Message)

func (*AccessListTx) XXX_Size

func (m *AccessListTx) XXX_Size() int

func (*AccessListTx) XXX_Unmarshal

func (m *AccessListTx) XXX_Unmarshal(b []byte) error

type AccessTuple

type AccessTuple struct {
	// address is a hex formatted ethereum address
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// storage_keys are hex formatted hashes of the storage keys
	StorageKeys []string `protobuf:"bytes,2,rep,name=storage_keys,json=storageKeys,proto3" json:"storageKeys"`
}

AccessTuple is the element type of an access list.

func (*AccessTuple) Descriptor

func (*AccessTuple) Descriptor() ([]byte, []int)

func (*AccessTuple) Marshal

func (m *AccessTuple) Marshal() (dAtA []byte, err error)

func (*AccessTuple) MarshalTo

func (m *AccessTuple) MarshalTo(dAtA []byte) (int, error)

func (*AccessTuple) MarshalToSizedBuffer

func (m *AccessTuple) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AccessTuple) ProtoMessage

func (*AccessTuple) ProtoMessage()

func (*AccessTuple) Reset

func (m *AccessTuple) Reset()

func (*AccessTuple) Size

func (m *AccessTuple) Size() (n int)

func (*AccessTuple) String

func (m *AccessTuple) String() string

func (*AccessTuple) Unmarshal

func (m *AccessTuple) Unmarshal(dAtA []byte) error

func (*AccessTuple) XXX_DiscardUnknown

func (m *AccessTuple) XXX_DiscardUnknown()

func (*AccessTuple) XXX_Marshal

func (m *AccessTuple) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccessTuple) XXX_Merge

func (m *AccessTuple) XXX_Merge(src proto.Message)

func (*AccessTuple) XXX_Size

func (m *AccessTuple) XXX_Size() int

func (*AccessTuple) XXX_Unmarshal

func (m *AccessTuple) XXX_Unmarshal(b []byte) error

type AccountKeeper

type AccountKeeper interface {
	NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
	GetModuleAddress(moduleName string) sdk.AccAddress
	GetAllAccounts(ctx sdk.Context) (accounts []authtypes.AccountI)
	IterateAccounts(ctx sdk.Context, cb func(account authtypes.AccountI) bool)
	GetSequence(sdk.Context, sdk.AccAddress) (uint64, error)
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
	SetAccount(ctx sdk.Context, account authtypes.AccountI)
	RemoveAccount(ctx sdk.Context, account authtypes.AccountI)
	GetParams(ctx sdk.Context) (params authtypes.Params)
}

AccountKeeper defines the expected account keeper interface

type BankKeeper

type BankKeeper interface {
	authtypes.BankKeeper
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
	BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
}

BankKeeper defines the expected interface needed to retrieve account balances.

type ChainConfig

type ChainConfig struct {
	// homestead_block switch (nil no fork, 0 = already homestead)
	HomesteadBlock *github_com_cosmos_cosmos_sdk_types.Int `` /* 176-byte string literal not displayed */
	// dao_fork_block corresponds to TheDAO hard-fork switch block (nil no fork)
	DAOForkBlock *github_com_cosmos_cosmos_sdk_types.Int `` /* 171-byte string literal not displayed */
	// dao_fork_support defines whether the nodes supports or opposes the DAO hard-fork
	DAOForkSupport bool `` /* 130-byte string literal not displayed */
	// eip150_block: EIP150 implements the Gas price changes
	// (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork)
	EIP150Block *github_com_cosmos_cosmos_sdk_types.Int `` /* 164-byte string literal not displayed */
	// eip150_hash: EIP150 HF hash (needed for header only clients as only gas pricing changed)
	EIP150Hash string `protobuf:"bytes,5,opt,name=eip150_hash,json=eip150Hash,proto3" json:"eip150_hash,omitempty" yaml:"byzantium_block"`
	// eip155_block: EIP155Block HF block
	EIP155Block *github_com_cosmos_cosmos_sdk_types.Int `` /* 164-byte string literal not displayed */
	// eip158_block: EIP158 HF block
	EIP158Block *github_com_cosmos_cosmos_sdk_types.Int `` /* 164-byte string literal not displayed */
	// byzantium_block: Byzantium switch block (nil no fork, 0 = already on byzantium)
	ByzantiumBlock *github_com_cosmos_cosmos_sdk_types.Int `` /* 176-byte string literal not displayed */
	// constantinople_block: Constantinople switch block (nil no fork, 0 = already activated)
	ConstantinopleBlock *github_com_cosmos_cosmos_sdk_types.Int `` /* 196-byte string literal not displayed */
	// petersburg_block: Petersburg switch block (nil same as Constantinople)
	PetersburgBlock *github_com_cosmos_cosmos_sdk_types.Int `` /* 181-byte string literal not displayed */
	// istanbul_block: Istanbul switch block (nil no fork, 0 = already on istanbul)
	IstanbulBlock *github_com_cosmos_cosmos_sdk_types.Int `` /* 173-byte string literal not displayed */
	// muir_glacier_block: Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated)
	MuirGlacierBlock *github_com_cosmos_cosmos_sdk_types.Int `` /* 188-byte string literal not displayed */
	// berlin_block: Berlin switch block (nil = no fork, 0 = already on berlin)
	BerlinBlock *github_com_cosmos_cosmos_sdk_types.Int `` /* 165-byte string literal not displayed */
	// london_block: London switch block (nil = no fork, 0 = already on london)
	LondonBlock *github_com_cosmos_cosmos_sdk_types.Int `` /* 165-byte string literal not displayed */
	// arrow_glacier_block: Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated)
	ArrowGlacierBlock *github_com_cosmos_cosmos_sdk_types.Int `` /* 192-byte string literal not displayed */
	// gray_glacier_block: EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already activated)
	GrayGlacierBlock *github_com_cosmos_cosmos_sdk_types.Int `` /* 188-byte string literal not displayed */
	// merge_netsplit_block: Virtual fork after The Merge to use as a network splitter
	MergeNetsplitBlock *github_com_cosmos_cosmos_sdk_types.Int `` /* 196-byte string literal not displayed */
	// shanghai_block switch block (nil = no fork, 0 = already on shanghai)
	ShanghaiBlock *github_com_cosmos_cosmos_sdk_types.Int `` /* 173-byte string literal not displayed */
	// cancun_block switch block (nil = no fork, 0 = already on cancun)
	CancunBlock *github_com_cosmos_cosmos_sdk_types.Int `` /* 165-byte string literal not displayed */
}

ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values instead of *big.Int.

func DefaultChainConfig

func DefaultChainConfig() ChainConfig

DefaultChainConfig returns default evm parameters.

func (*ChainConfig) Descriptor

func (*ChainConfig) Descriptor() ([]byte, []int)

func (ChainConfig) EthereumConfig

func (cc ChainConfig) EthereumConfig(chainID *big.Int) *params.ChainConfig

EthereumConfig returns an Ethereum ChainConfig for EVM state transitions. All the negative or nil values are converted to nil

func (*ChainConfig) GetDAOForkSupport

func (m *ChainConfig) GetDAOForkSupport() bool

func (*ChainConfig) GetEIP150Hash

func (m *ChainConfig) GetEIP150Hash() string

func (*ChainConfig) Marshal

func (m *ChainConfig) Marshal() (dAtA []byte, err error)

func (*ChainConfig) MarshalTo

func (m *ChainConfig) MarshalTo(dAtA []byte) (int, error)

func (*ChainConfig) MarshalToSizedBuffer

func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ChainConfig) ProtoMessage

func (*ChainConfig) ProtoMessage()

func (*ChainConfig) Reset

func (m *ChainConfig) Reset()

func (*ChainConfig) Size

func (m *ChainConfig) Size() (n int)

func (*ChainConfig) String

func (m *ChainConfig) String() string

func (*ChainConfig) Unmarshal

func (m *ChainConfig) Unmarshal(dAtA []byte) error

func (ChainConfig) Validate

func (cc ChainConfig) Validate() error

Validate performs a basic validation of the ChainConfig params. The function will return an error if any of the block values is uninitialized (i.e nil) or if the EIP150Hash is an invalid hash.

func (*ChainConfig) XXX_DiscardUnknown

func (m *ChainConfig) XXX_DiscardUnknown()

func (*ChainConfig) XXX_Marshal

func (m *ChainConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChainConfig) XXX_Merge

func (m *ChainConfig) XXX_Merge(src proto.Message)

func (*ChainConfig) XXX_Size

func (m *ChainConfig) XXX_Size() int

func (*ChainConfig) XXX_Unmarshal

func (m *ChainConfig) XXX_Unmarshal(b []byte) error

type CompiledContract

type CompiledContract struct {
	ABI abi.ABI
	Bin HexString
}

CompiledContract contains compiled bytecode and abi

var (

	// ERC20Contract is the compiled test erc20 contract
	ERC20Contract CompiledContract

	// SimpleStorageContract is the compiled test simple storage contract
	SimpleStorageContract CompiledContract

	// TestMessageCall is the compiled message call benchmark contract
	TestMessageCall CompiledContract
)

func (CompiledContract) MarshalJSON

func (s CompiledContract) MarshalJSON() ([]byte, error)

MarshalJSON serializes ByteArray to hex

func (*CompiledContract) UnmarshalJSON

func (s *CompiledContract) UnmarshalJSON(data []byte) error

UnmarshalJSON deserializes ByteArray to hex

type DynamicFeeTx

type DynamicFeeTx struct {
	// chain_id of the destination EVM chain
	ChainID *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"chainID"`
	// nonce corresponds to the account nonce (transaction sequence).
	Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// gas_tip_cap defines the max value for the gas tip
	GasTipCap *github_com_cosmos_cosmos_sdk_types.Int `` /* 140-byte string literal not displayed */
	// gas_fee_cap defines the max value for the gas fee
	GasFeeCap *github_com_cosmos_cosmos_sdk_types.Int `` /* 140-byte string literal not displayed */
	// gas defines the gas limit defined for the transaction.
	GasLimit uint64 `protobuf:"varint,5,opt,name=gas,proto3" json:"gas,omitempty"`
	// to is the hex formatted address of the recipient
	To string `protobuf:"bytes,6,opt,name=to,proto3" json:"to,omitempty"`
	// value defines the the transaction amount.
	Amount *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"value,omitempty"`
	// data is the data payload bytes of the transaction.
	Data []byte `protobuf:"bytes,8,opt,name=data,proto3" json:"data,omitempty"`
	// accesses is an array of access tuples
	Accesses AccessList `protobuf:"bytes,9,rep,name=accesses,proto3,castrepeated=AccessList" json:"accessList"`
	// v defines the signature value
	V []byte `protobuf:"bytes,10,opt,name=v,proto3" json:"v,omitempty"`
	// r defines the signature value
	R []byte `protobuf:"bytes,11,opt,name=r,proto3" json:"r,omitempty"`
	// s define the signature value
	S []byte `protobuf:"bytes,12,opt,name=s,proto3" json:"s,omitempty"`
}

DynamicFeeTx is the data of EIP-1559 dinamic fee transactions.

func (*DynamicFeeTx) AsEthereumData

func (tx *DynamicFeeTx) AsEthereumData() ethtypes.TxData

AsEthereumData returns an DynamicFeeTx transaction tx from the proto-formatted TxData defined on the Cosmos EVM.

func (*DynamicFeeTx) Copy

func (tx *DynamicFeeTx) Copy() TxData

Copy returns an instance with the same field values

func (DynamicFeeTx) Cost

func (tx DynamicFeeTx) Cost() *big.Int

Cost returns amount + gasprice * gaslimit.

func (*DynamicFeeTx) Descriptor

func (*DynamicFeeTx) Descriptor() ([]byte, []int)

func (DynamicFeeTx) EffectiveCost

func (tx DynamicFeeTx) EffectiveCost(baseFee *big.Int) *big.Int

EffectiveCost returns amount + effective_gasprice * gaslimit.

func (DynamicFeeTx) EffectiveFee

func (tx DynamicFeeTx) EffectiveFee(baseFee *big.Int) *big.Int

EffectiveFee returns effective_gasprice * gaslimit.

func (*DynamicFeeTx) EffectiveGasPrice added in v0.20.0

func (tx *DynamicFeeTx) EffectiveGasPrice(baseFee *big.Int) *big.Int

EffectiveGasPrice returns the effective gas price

func (DynamicFeeTx) Fee

func (tx DynamicFeeTx) Fee() *big.Int

Fee returns gasprice * gaslimit.

func (*DynamicFeeTx) GetAccessList

func (tx *DynamicFeeTx) GetAccessList() ethtypes.AccessList

GetAccessList returns the AccessList field.

func (*DynamicFeeTx) GetChainID

func (tx *DynamicFeeTx) GetChainID() *big.Int

GetChainID returns the chain id field from the DynamicFeeTx

func (*DynamicFeeTx) GetData

func (tx *DynamicFeeTx) GetData() []byte

GetData returns the a copy of the input data bytes.

func (*DynamicFeeTx) GetGas

func (tx *DynamicFeeTx) GetGas() uint64

GetGas returns the gas limit.

func (*DynamicFeeTx) GetGasFeeCap

func (tx *DynamicFeeTx) GetGasFeeCap() *big.Int

GetGasFeeCap returns the gas fee cap field.

func (*DynamicFeeTx) GetGasPrice

func (tx *DynamicFeeTx) GetGasPrice() *big.Int

GetGasPrice returns the gas fee cap field.

func (*DynamicFeeTx) GetGasTipCap

func (tx *DynamicFeeTx) GetGasTipCap() *big.Int

GetGasTipCap returns the gas tip cap field.

func (*DynamicFeeTx) GetNonce

func (tx *DynamicFeeTx) GetNonce() uint64

GetNonce returns the account sequence for the transaction.

func (*DynamicFeeTx) GetRawSignatureValues

func (tx *DynamicFeeTx) GetRawSignatureValues() (v, r, s *big.Int)

GetRawSignatureValues returns the V, R, S signature values of the transaction. The return values should not be modified by the caller.

func (*DynamicFeeTx) GetTo

func (tx *DynamicFeeTx) GetTo() *common.Address

GetTo returns the pointer to the recipient address.

func (*DynamicFeeTx) GetValue

func (tx *DynamicFeeTx) GetValue() *big.Int

GetValue returns the tx amount.

func (*DynamicFeeTx) Marshal

func (m *DynamicFeeTx) Marshal() (dAtA []byte, err error)

func (*DynamicFeeTx) MarshalTo

func (m *DynamicFeeTx) MarshalTo(dAtA []byte) (int, error)

func (*DynamicFeeTx) MarshalToSizedBuffer

func (m *DynamicFeeTx) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DynamicFeeTx) ProtoMessage

func (*DynamicFeeTx) ProtoMessage()

func (*DynamicFeeTx) Reset

func (m *DynamicFeeTx) Reset()

func (*DynamicFeeTx) SetSignatureValues

func (tx *DynamicFeeTx) SetSignatureValues(chainID, v, r, s *big.Int)

SetSignatureValues sets the signature values to the transaction.

func (*DynamicFeeTx) Size

func (m *DynamicFeeTx) Size() (n int)

func (*DynamicFeeTx) String

func (m *DynamicFeeTx) String() string

func (*DynamicFeeTx) TxType

func (tx *DynamicFeeTx) TxType() uint8

TxType returns the tx type

func (*DynamicFeeTx) Unmarshal

func (m *DynamicFeeTx) Unmarshal(dAtA []byte) error

func (DynamicFeeTx) Validate

func (tx DynamicFeeTx) Validate() error

Validate performs a stateless validation of the tx fields.

func (*DynamicFeeTx) XXX_DiscardUnknown

func (m *DynamicFeeTx) XXX_DiscardUnknown()

func (*DynamicFeeTx) XXX_Marshal

func (m *DynamicFeeTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DynamicFeeTx) XXX_Merge

func (m *DynamicFeeTx) XXX_Merge(src proto.Message)

func (*DynamicFeeTx) XXX_Size

func (m *DynamicFeeTx) XXX_Size() int

func (*DynamicFeeTx) XXX_Unmarshal

func (m *DynamicFeeTx) XXX_Unmarshal(b []byte) error

type EstimateGasResponse

type EstimateGasResponse struct {
	// gas returns the estimated gas
	Gas uint64 `protobuf:"varint,1,opt,name=gas,proto3" json:"gas,omitempty"`
}

EstimateGasResponse defines EstimateGas response

func (*EstimateGasResponse) Descriptor

func (*EstimateGasResponse) Descriptor() ([]byte, []int)

func (*EstimateGasResponse) GetGas

func (m *EstimateGasResponse) GetGas() uint64

func (*EstimateGasResponse) Marshal

func (m *EstimateGasResponse) Marshal() (dAtA []byte, err error)

func (*EstimateGasResponse) MarshalTo

func (m *EstimateGasResponse) MarshalTo(dAtA []byte) (int, error)

func (*EstimateGasResponse) MarshalToSizedBuffer

func (m *EstimateGasResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EstimateGasResponse) ProtoMessage

func (*EstimateGasResponse) ProtoMessage()

func (*EstimateGasResponse) Reset

func (m *EstimateGasResponse) Reset()

func (*EstimateGasResponse) Size

func (m *EstimateGasResponse) Size() (n int)

func (*EstimateGasResponse) String

func (m *EstimateGasResponse) String() string

func (*EstimateGasResponse) Unmarshal

func (m *EstimateGasResponse) Unmarshal(dAtA []byte) error

func (*EstimateGasResponse) XXX_DiscardUnknown

func (m *EstimateGasResponse) XXX_DiscardUnknown()

func (*EstimateGasResponse) XXX_Marshal

func (m *EstimateGasResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EstimateGasResponse) XXX_Merge

func (m *EstimateGasResponse) XXX_Merge(src proto.Message)

func (*EstimateGasResponse) XXX_Size

func (m *EstimateGasResponse) XXX_Size() int

func (*EstimateGasResponse) XXX_Unmarshal

func (m *EstimateGasResponse) XXX_Unmarshal(b []byte) error

type EthCallRequest

type EthCallRequest struct {
	// args uses the same json format as the json rpc api.
	Args []byte `protobuf:"bytes,1,opt,name=args,proto3" json:"args,omitempty"`
	// gas_cap defines the default gas cap to be used
	GasCap uint64 `protobuf:"varint,2,opt,name=gas_cap,json=gasCap,proto3" json:"gas_cap,omitempty"`
	// proposer_address of the requested block in hex format
	ProposerAddress github_com_cosmos_cosmos_sdk_types.ConsAddress `` /* 162-byte string literal not displayed */
	// chain_id is the eip155 chain id parsed from the requested block header
	ChainId int64 `protobuf:"varint,4,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
}

EthCallRequest defines EthCall request

func (*EthCallRequest) Descriptor

func (*EthCallRequest) Descriptor() ([]byte, []int)

func (*EthCallRequest) GetArgs

func (m *EthCallRequest) GetArgs() []byte

func (*EthCallRequest) GetChainId added in v0.20.0

func (m *EthCallRequest) GetChainId() int64

func (*EthCallRequest) GetGasCap

func (m *EthCallRequest) GetGasCap() uint64

func (*EthCallRequest) GetProposerAddress added in v0.20.0

func (*EthCallRequest) Marshal

func (m *EthCallRequest) Marshal() (dAtA []byte, err error)

func (*EthCallRequest) MarshalTo

func (m *EthCallRequest) MarshalTo(dAtA []byte) (int, error)

func (*EthCallRequest) MarshalToSizedBuffer

func (m *EthCallRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EthCallRequest) ProtoMessage

func (*EthCallRequest) ProtoMessage()

func (*EthCallRequest) Reset

func (m *EthCallRequest) Reset()

func (*EthCallRequest) Size

func (m *EthCallRequest) Size() (n int)

func (*EthCallRequest) String

func (m *EthCallRequest) String() string

func (*EthCallRequest) Unmarshal

func (m *EthCallRequest) Unmarshal(dAtA []byte) error

func (*EthCallRequest) XXX_DiscardUnknown

func (m *EthCallRequest) XXX_DiscardUnknown()

func (*EthCallRequest) XXX_Marshal

func (m *EthCallRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EthCallRequest) XXX_Merge

func (m *EthCallRequest) XXX_Merge(src proto.Message)

func (*EthCallRequest) XXX_Size

func (m *EthCallRequest) XXX_Size() int

func (*EthCallRequest) XXX_Unmarshal

func (m *EthCallRequest) XXX_Unmarshal(b []byte) error

type EventBlockBloom added in v0.21.0

type EventBlockBloom struct {
	// bloom is the bloom filter of the block
	Bloom string `protobuf:"bytes,1,opt,name=bloom,proto3" json:"bloom,omitempty"`
}

EventBlockBloom defines an Ethereum block bloom filter event

func (*EventBlockBloom) Descriptor added in v0.21.0

func (*EventBlockBloom) Descriptor() ([]byte, []int)

func (*EventBlockBloom) GetBloom added in v0.21.0

func (m *EventBlockBloom) GetBloom() string

func (*EventBlockBloom) Marshal added in v0.21.0

func (m *EventBlockBloom) Marshal() (dAtA []byte, err error)

func (*EventBlockBloom) MarshalTo added in v0.21.0

func (m *EventBlockBloom) MarshalTo(dAtA []byte) (int, error)

func (*EventBlockBloom) MarshalToSizedBuffer added in v0.21.0

func (m *EventBlockBloom) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EventBlockBloom) ProtoMessage added in v0.21.0

func (*EventBlockBloom) ProtoMessage()

func (*EventBlockBloom) Reset added in v0.21.0

func (m *EventBlockBloom) Reset()

func (*EventBlockBloom) Size added in v0.21.0

func (m *EventBlockBloom) Size() (n int)

func (*EventBlockBloom) String added in v0.21.0

func (m *EventBlockBloom) String() string

func (*EventBlockBloom) Unmarshal added in v0.21.0

func (m *EventBlockBloom) Unmarshal(dAtA []byte) error

func (*EventBlockBloom) XXX_DiscardUnknown added in v0.21.0

func (m *EventBlockBloom) XXX_DiscardUnknown()

func (*EventBlockBloom) XXX_Marshal added in v0.21.0

func (m *EventBlockBloom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventBlockBloom) XXX_Merge added in v0.21.0

func (m *EventBlockBloom) XXX_Merge(src proto.Message)

func (*EventBlockBloom) XXX_Size added in v0.21.0

func (m *EventBlockBloom) XXX_Size() int

func (*EventBlockBloom) XXX_Unmarshal added in v0.21.0

func (m *EventBlockBloom) XXX_Unmarshal(b []byte) error

type EventEthereumTx added in v0.21.0

type EventEthereumTx struct {
	// amount
	Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"`
	// eth_hash is the Ethereum hash of the transaction
	EthHash string `protobuf:"bytes,2,opt,name=eth_hash,json=ethHash,proto3" json:"eth_hash,omitempty"`
	// index of the transaction in the block
	Index string `protobuf:"bytes,3,opt,name=index,proto3" json:"index,omitempty"`
	// gas_used is the amount of gas used by the transaction
	GasUsed string `protobuf:"bytes,4,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"`
	// hash is the Tendermint hash of the transaction
	Hash string `protobuf:"bytes,5,opt,name=hash,proto3" json:"hash,omitempty"`
	// recipient of the transaction
	Recipient string `protobuf:"bytes,6,opt,name=recipient,proto3" json:"recipient,omitempty"`
	// eth_tx_failed contains a VM error should it occur
	EthTxFailed string `protobuf:"bytes,7,opt,name=eth_tx_failed,json=ethTxFailed,proto3" json:"eth_tx_failed,omitempty"`
}

EventEthereumTx defines the event for an Ethereum transaction

func (*EventEthereumTx) Descriptor added in v0.21.0

func (*EventEthereumTx) Descriptor() ([]byte, []int)

func (*EventEthereumTx) GetAmount added in v0.21.0

func (m *EventEthereumTx) GetAmount() string

func (*EventEthereumTx) GetEthHash added in v0.21.0

func (m *EventEthereumTx) GetEthHash() string

func (*EventEthereumTx) GetEthTxFailed added in v0.21.0

func (m *