Documentation
¶
Index ¶
- Variables
- type EVMTxIndexer
- type TxResult
- func (*TxResult) Descriptor() ([]byte, []int)
- func (m *TxResult) Marshal() (dAtA []byte, err error)
- func (m *TxResult) MarshalTo(dAtA []byte) (int, error)
- func (m *TxResult) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxResult) ProtoMessage()
- func (m *TxResult) Reset()
- func (m *TxResult) Size() (n int)
- func (m *TxResult) String() string
- func (m *TxResult) Unmarshal(dAtA []byte) error
- func (m *TxResult) XXX_DiscardUnknown()
- func (m *TxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxResult) XXX_Merge(src proto.Message)
- func (m *TxResult) XXX_Size() int
- func (m *TxResult) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type EVMTxIndexer ¶
type EVMTxIndexer interface {
// LastIndexedBlock returns -1 if indexer db is empty
LastIndexedBlock() (int64, error)
IndexBlock(*cmttypes.Block, []*abci.ExecTxResult) error
// GetByTxHash returns nil if tx not found.
GetByTxHash(common.Hash) (*TxResult, error)
// GetByBlockAndIndex returns nil if tx not found.
GetByBlockAndIndex(int64, int32) (*TxResult, error)
}
EVMTxIndexer defines the interface of custom eth tx indexer.
type TxResult ¶
type TxResult struct {
// height of the blockchain
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
// tx_index of the cosmos transaction
TxIndex uint32 `protobuf:"varint,2,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"`
// msg_index in a batch transaction
MsgIndex uint32 `protobuf:"varint,3,opt,name=msg_index,json=msgIndex,proto3" json:"msg_index,omitempty"`
// eth_tx_index is the index in the list of valid eth tx in the block,
// aka. the transaction list returned by eth_getBlock api.
EthTxIndex int32 `protobuf:"varint,4,opt,name=eth_tx_index,json=ethTxIndex,proto3" json:"eth_tx_index,omitempty"`
// failed is true if the eth transaction did not go succeed
Failed bool `protobuf:"varint,5,opt,name=failed,proto3" json:"failed,omitempty"`
// gas_used by the transaction. If it exceeds the block gas limit,
// it's set to gas limit, which is what's actually deducted by ante handler.
GasUsed uint64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"`
// cumulative_gas_used specifies the cumulated amount of gas used for all
// processed messages within the current batch transaction.
CumulativeGasUsed uint64 `protobuf:"varint,7,opt,name=cumulative_gas_used,json=cumulativeGasUsed,proto3" json:"cumulative_gas_used,omitempty"`
}
TxResult is the value stored in eth tx indexer
func (*TxResult) Descriptor ¶
func (*TxResult) MarshalToSizedBuffer ¶
func (*TxResult) ProtoMessage ¶
func (*TxResult) ProtoMessage()
func (*TxResult) XXX_DiscardUnknown ¶
func (m *TxResult) XXX_DiscardUnknown()
func (*TxResult) XXX_Marshal ¶
func (*TxResult) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.