watcher

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagFastQuery    = "fast-query"
	FlagFastQueryLru = "fast-lru"
	FlagCheckWd      = "check_watchdb"

	WatchDbDir  = "data"
	WatchDBName = "watch"
)
View Source
const (
	TypeOthers    = uint32(1)
	TypeState     = uint32(2)
	TypeDelete    = uint32(3)
	TypeEvmParams = uint32(4)

	EthReceipt  = uint64(0)
	StdResponse = uint64(1)
)
View Source
const MsgFunctionDisable = "fast query function has been disabled"

Variables

View Source
var (
	PrefixState = []byte{0x08}

	KeyLatestHeight = "LatestHeight"

	TransactionSuccess = uint32(1)
	TransactionFailed  = uint32(0)
)
View Source
var WatchCdc *codec.Codec

Functions

func DecodeAccount

func DecodeAccount(bz []byte) (*app.EthAccount, error)

func EncodeAccount

func EncodeAccount(acc *app.EthAccount) ([]byte, error)

func GetMsgAccountKey

func GetMsgAccountKey(addr []byte) []byte

func GetMsgStateKey

func GetMsgStateKey(addr common.Address, key []byte) []byte

func GetWatchLruSize

func GetWatchLruSize() int

func IsRpcNode

func IsRpcNode() bool

func IsWatcherEnabled

func IsWatcherEnabled() bool

func NewBlock

func NewBlock(height uint64, blockBloom ethtypes.Bloom, header abci.Header, gasLimit uint64,
	gasUsed *big.Int, txs interface{}) (types.Block, common.Hash)

func NewEvmTx

func NewEvmTx(msgEvmTx *types.MsgEthereumTx, txHash ethcmn.Hash, blockHash ethcmn.Hash, height, index uint64) *evmTx

Types

type Batch

type Batch struct {
	Key       []byte `json:"key"`
	Value     []byte `json:"value"`
	TypeValue uint32 `json:"type_value"`
}

func (*Batch) MarshalToAmino

func (b *Batch) MarshalToAmino(cdc *amino.Codec) ([]byte, error)

MarshalToAmino marshal batch data to amino bytes

func (*Batch) UnmarshalFromAmino

func (b *Batch) UnmarshalFromAmino(cdc *amino.Codec, data []byte) error

UnmarshalFromAmino unmarshal amino bytes to this object

type CodeInfo

type CodeInfo struct {
	Height uint64 `json:"height"`
	Code   string `json:"code"`
}

type DelAccMsg

type DelAccMsg struct {
	// contains filtered or unexported fields
}

func NewDelAccMsg

func NewDelAccMsg(acc auth.Account) *DelAccMsg

func (*DelAccMsg) GetKey

func (delAcc *DelAccMsg) GetKey() []byte

func (*DelAccMsg) GetType

func (delAcc *DelAccMsg) GetType() uint32

func (*DelAccMsg) GetValue

func (delAcc *DelAccMsg) GetValue() string

type InfuraKeeper

type InfuraKeeper interface {
	OnSaveTransactionReceipt(TransactionReceipt)
	OnSaveBlock(types.Block)
	OnSaveTransaction(Transaction)
	OnSaveContractCode(address string, code []byte)
}

type LazyValueMarshaler

type LazyValueMarshaler interface {
	GetValue() string
}

type MsgAccount

type MsgAccount struct {
	// contains filtered or unexported fields
}

func NewMsgAccount

func NewMsgAccount(acc auth.Account) *MsgAccount

func (*MsgAccount) GetKey

func (msgAccount *MsgAccount) GetKey() []byte

func (*MsgAccount) GetType

func (msgAccount *MsgAccount) GetType() uint32

func (*MsgAccount) GetValue

func (msgAccount *MsgAccount) GetValue() string

type MsgBlock

type MsgBlock struct {
	// contains filtered or unexported fields
}

func NewMsgBlock

func NewMsgBlock(b types.Block, blockHash common.Hash) *MsgBlock

func (MsgBlock) GetKey

func (m MsgBlock) GetKey() []byte

func (MsgBlock) GetType

func (m MsgBlock) GetType() uint32

func (MsgBlock) GetValue

func (m MsgBlock) GetValue() string

type MsgBlockInfo

type MsgBlockInfo struct {
	// contains filtered or unexported fields
}

func NewMsgBlockInfo

func NewMsgBlockInfo(height uint64, blockHash common.Hash) *MsgBlockInfo

func (MsgBlockInfo) GetKey

func (b MsgBlockInfo) GetKey() []byte

func (MsgBlockInfo) GetType

func (b MsgBlockInfo) GetType() uint32

func (MsgBlockInfo) GetValue

func (b MsgBlockInfo) GetValue() string

type MsgBlockStdTxHash

type MsgBlockStdTxHash struct {
	// contains filtered or unexported fields
}

func NewMsgBlockStdTxHash

func NewMsgBlockStdTxHash(stdTxHash []common.Hash, blockHash common.Hash) *MsgBlockStdTxHash

func (*MsgBlockStdTxHash) GetKey

func (m *MsgBlockStdTxHash) GetKey() []byte

func (*MsgBlockStdTxHash) GetType

func (m *MsgBlockStdTxHash) GetType() uint32

func (*MsgBlockStdTxHash) GetValue

func (m *MsgBlockStdTxHash) GetValue() string

type MsgCode

type MsgCode struct {
	Key  []byte
	Code string
}

func NewMsgCode

func NewMsgCode(contractAddr common.Address, code []byte, height uint64) *MsgCode

func (MsgCode) GetKey

func (m MsgCode) GetKey() []byte

func (MsgCode) GetType

func (m MsgCode) GetType() uint32

func (MsgCode) GetValue

func (m MsgCode) GetValue() string

type MsgCodeByHash

type MsgCodeByHash struct {
	Key  []byte
	Code string
}

func NewMsgCodeByHash

func NewMsgCodeByHash(hash []byte, code []byte) *MsgCodeByHash

func (MsgCodeByHash) GetKey

func (m MsgCodeByHash) GetKey() []byte

func (MsgCodeByHash) GetType

func (m MsgCodeByHash) GetType() uint32

func (MsgCodeByHash) GetValue

func (m MsgCodeByHash) GetValue() string

type MsgContractBlockedListItem

type MsgContractBlockedListItem struct {
	// contains filtered or unexported fields
}

func NewMsgContractBlockedListItem

func NewMsgContractBlockedListItem(addr sdk.AccAddress) *MsgContractBlockedListItem

func (*MsgContractBlockedListItem) GetKey

func (msgItem *MsgContractBlockedListItem) GetKey() []byte

func (*MsgContractBlockedListItem) GetType

func (msgItem *MsgContractBlockedListItem) GetType() uint32

func (*MsgContractBlockedListItem) GetValue

func (msgItem *MsgContractBlockedListItem) GetValue() string

type MsgContractDeploymentWhitelistItem

type MsgContractDeploymentWhitelistItem struct {
	// contains filtered or unexported fields
}

func NewMsgContractDeploymentWhitelistItem

func NewMsgContractDeploymentWhitelistItem(addr sdk.AccAddress) *MsgContractDeploymentWhitelistItem

func (*MsgContractDeploymentWhitelistItem) GetKey

func (msgItem *MsgContractDeploymentWhitelistItem) GetKey() []byte

func (*MsgContractDeploymentWhitelistItem) GetType

func (msgItem *MsgContractDeploymentWhitelistItem) GetType() uint32

func (*MsgContractDeploymentWhitelistItem) GetValue

func (msgItem *MsgContractDeploymentWhitelistItem) GetValue() string

type MsgContractMethodBlockedListItem

type MsgContractMethodBlockedListItem struct {
	// contains filtered or unexported fields
}

func NewMsgContractMethodBlockedListItem

func NewMsgContractMethodBlockedListItem(addr sdk.AccAddress, methods []byte) *MsgContractMethodBlockedListItem

func (*MsgContractMethodBlockedListItem) GetKey

func (msgItem *MsgContractMethodBlockedListItem) GetKey() []byte

func (*MsgContractMethodBlockedListItem) GetType

func (msgItem *MsgContractMethodBlockedListItem) GetType() uint32

func (*MsgContractMethodBlockedListItem) GetValue

func (msgItem *MsgContractMethodBlockedListItem) GetValue() string

type MsgDelContractBlockedListItem

type MsgDelContractBlockedListItem struct {
	// contains filtered or unexported fields
}

func NewMsgDelContractBlockedListItem

func NewMsgDelContractBlockedListItem(addr sdk.AccAddress) *MsgDelContractBlockedListItem

func (*MsgDelContractBlockedListItem) GetKey

func (msgItem *MsgDelContractBlockedListItem) GetKey() []byte

func (*MsgDelContractBlockedListItem) GetType

func (msgItem *MsgDelContractBlockedListItem) GetType() uint32

func (*MsgDelContractBlockedListItem) GetValue

func (msgItem *MsgDelContractBlockedListItem) GetValue() string

type MsgDelContractDeploymentWhitelistItem

type MsgDelContractDeploymentWhitelistItem struct {
	// contains filtered or unexported fields
}

func NewMsgDelContractDeploymentWhitelistItem

func NewMsgDelContractDeploymentWhitelistItem(addr sdk.AccAddress) *MsgDelContractDeploymentWhitelistItem

func (*MsgDelContractDeploymentWhitelistItem) GetKey

func (msgItem *MsgDelContractDeploymentWhitelistItem) GetKey() []byte

func (*MsgDelContractDeploymentWhitelistItem) GetType

func (msgItem *MsgDelContractDeploymentWhitelistItem) GetType() uint32

func (*MsgDelContractDeploymentWhitelistItem) GetValue

func (msgItem *MsgDelContractDeploymentWhitelistItem) GetValue() string

type MsgEthTx

type MsgEthTx struct {
	*Transaction
	Key []byte
}

func (MsgEthTx) GetKey

func (m MsgEthTx) GetKey() []byte

func (MsgEthTx) GetType

func (m MsgEthTx) GetType() uint32

type MsgLatestHeight

type MsgLatestHeight struct {
	// contains filtered or unexported fields
}

func NewMsgLatestHeight

func NewMsgLatestHeight(height uint64) *MsgLatestHeight

func (MsgLatestHeight) GetKey

func (b MsgLatestHeight) GetKey() []byte

func (MsgLatestHeight) GetType

func (b MsgLatestHeight) GetType() uint32

func (MsgLatestHeight) GetValue

func (b MsgLatestHeight) GetValue() string

type MsgParams

type MsgParams struct {
	types.Params
}

func NewMsgParams

func NewMsgParams(params types.Params) *MsgParams

func (*MsgParams) GetKey

func (msgParams *MsgParams) GetKey() []byte

func (*MsgParams) GetType

func (msgParams *MsgParams) GetType() uint32

func (*MsgParams) GetValue

func (msgParams *MsgParams) GetValue() string

type MsgState

type MsgState struct {
	// contains filtered or unexported fields
}

func NewMsgState

func NewMsgState(addr common.Address, key, value []byte) *MsgState

func (*MsgState) GetKey

func (msgState *MsgState) GetKey() []byte

func (*MsgState) GetType

func (msgState *MsgState) GetType() uint32

func (*MsgState) GetValue

func (msgState *MsgState) GetValue() string

type MsgStdTransactionResponse

type MsgStdTransactionResponse struct {
	// contains filtered or unexported fields
}

func NewStdTransactionResponse

func NewStdTransactionResponse(tr *ctypes.ResultTx, timestamp time.Time, txHash common.Hash) *MsgStdTransactionResponse

func (*MsgStdTransactionResponse) GetKey

func (tr *MsgStdTransactionResponse) GetKey() []byte

func (*MsgStdTransactionResponse) GetType

func (tr *MsgStdTransactionResponse) GetType() uint32

func (*MsgStdTransactionResponse) GetValue

func (tr *MsgStdTransactionResponse) GetValue() string

type MsgTransactionReceipt

type MsgTransactionReceipt struct {
	*TransactionReceipt
	// contains filtered or unexported fields
}

func NewMsgTransactionReceipt

func NewMsgTransactionReceipt(tr TransactionReceipt, txHash common.Hash) *MsgTransactionReceipt

func (MsgTransactionReceipt) GetKey

func (m MsgTransactionReceipt) GetKey() []byte

func (MsgTransactionReceipt) GetType

func (m MsgTransactionReceipt) GetType() uint32

type Querier

type Querier struct {
	// contains filtered or unexported fields
}

func NewQuerier

func NewQuerier() *Querier

func (Querier) DeleteAccountFromRdb

func (q Querier) DeleteAccountFromRdb(addr sdk.AccAddress)

func (Querier) DeleteStateFromRdb

func (q Querier) DeleteStateFromRdb(addr common.Address, key []byte)

func (*Querier) Enable

func (q *Querier) Enable(sw bool)

func (Querier) GetAccount

func (q Querier) GetAccount(addr sdk.AccAddress) (*types.EthAccount, error)

func (Querier) GetAccountFromRdb

func (q Querier) GetAccountFromRdb(addr sdk.AccAddress) (*types.EthAccount, error)

func (Querier) GetBlockByHash

func (q Querier) GetBlockByHash(hash common.Hash, fullTx bool) (*evmtypes.Block, error)

func (Querier) GetBlockByNumber

func (q Querier) GetBlockByNumber(number uint64, fullTx bool) (*evmtypes.Block, error)

func (Querier) GetBlockHashByNumber

func (q Querier) GetBlockHashByNumber(number uint64) (common.Hash, error)

func (Querier) GetCode

func (q Querier) GetCode(contractAddr common.Address, height uint64) ([]byte, error)

func (Querier) GetCodeByHash

func (q Querier) GetCodeByHash(codeHash []byte) ([]byte, error)

func (Querier) GetContractMethodBlockedList

func (q Querier) GetContractMethodBlockedList(key []byte) ([]byte, error)

func (Querier) GetLatestBlockNumber

func (q Querier) GetLatestBlockNumber() (uint64, error)

func (Querier) GetParams

func (q Querier) GetParams() (*evmtypes.Params, error)

func (Querier) GetState

func (q Querier) GetState(key []byte) ([]byte, error)

func (Querier) GetStateFromRdb

func (q Querier) GetStateFromRdb(key []byte) ([]byte, error)

func (Querier) GetStdTxHashByBlockHash

func (q Querier) GetStdTxHashByBlockHash(hash common.Hash) ([]common.Hash, error)

func (Querier) GetTransactionByBlockHashAndIndex

func (q Querier) GetTransactionByBlockHashAndIndex(hash common.Hash, idx uint) (*Transaction, error)

func (Querier) GetTransactionByBlockNumberAndIndex

func (q Querier) GetTransactionByBlockNumberAndIndex(number uint64, idx uint) (*Transaction, error)

func (Querier) GetTransactionByHash

func (q Querier) GetTransactionByHash(hash common.Hash) (*Transaction, error)

func (Querier) GetTransactionReceipt

func (q Querier) GetTransactionReceipt(hash common.Hash) (*TransactionReceipt, error)

func (Querier) GetTransactionResponse

func (q Querier) GetTransactionResponse(hash common.Hash) (*TransactionResponse, error)

func (Querier) GetTransactionsByBlockNumber

func (q Querier) GetTransactionsByBlockNumber(number, offset, limit uint64) ([]*Transaction, error)

func (Querier) GetTxResultByBlock

func (q Querier) GetTxResultByBlock(clientCtx clientcontext.CLIContext,
	height, offset, limit uint64) ([]*TransactionResult, error)

func (Querier) HasContractBlockedList

func (q Querier) HasContractBlockedList(key []byte) bool

func (Querier) HasContractDeploymentWhitelist

func (q Querier) HasContractDeploymentWhitelist(key []byte) bool

func (Querier) MustGetAccount

func (q Querier) MustGetAccount(addr sdk.AccAddress) (*types.EthAccount, error)

func (Querier) MustGetState

func (q Querier) MustGetState(addr common.Address, key []byte) ([]byte, error)

type Transaction

type Transaction struct {
	BlockHash        *common.Hash    `json:"blockHash"`
	BlockNumber      *hexutil.Big    `json:"blockNumber"`
	From             common.Address  `json:"from"`
	Gas              hexutil.Uint64  `json:"gas"`
	GasPrice         *hexutil.Big    `json:"gasPrice"`
	Hash             common.Hash     `json:"hash"`
	Input            hexutil.Bytes   `json:"input"`
	Nonce            hexutil.Uint64  `json:"nonce"`
	To               *common.Address `json:"to"`
	TransactionIndex *hexutil.Uint64 `json:"transactionIndex"`
	Value            *hexutil.Big    `json:"value"`
	V                *hexutil.Big    `json:"v"`
	R                *hexutil.Big    `json:"r"`
	S                *hexutil.Big    `json:"s"`
	// contains filtered or unexported fields
}

Transaction represents a transaction returned to RPC clients.

func NewTransaction

func NewTransaction(tx *evmtypes.MsgEthereumTx, txHash, blockHash common.Hash, blockNumber, index uint64) (*Transaction, error)

NewTransaction returns a transaction that will serialize to the RPC representation, with the given location metadata set (if available).

func (*Transaction) GetValue

func (tr *Transaction) GetValue() string

type TransactionReceipt

type TransactionReceipt struct {
	Status            hexutil.Uint64  `json:"status"`
	CumulativeGasUsed hexutil.Uint64  `json:"cumulativeGasUsed"`
	LogsBloom         ethtypes.Bloom  `json:"logsBloom"`
	Logs              []*ethtypes.Log `json:"logs"`

	TransactionHash string          `json:"transactionHash"`
	ContractAddress *common.Address `json:"contractAddress"`
	GasUsed         hexutil.Uint64  `json:"gasUsed"`

	BlockHash        string         `json:"blockHash"`
	BlockNumber      hexutil.Uint64 `json:"blockNumber"`
	TransactionIndex hexutil.Uint64 `json:"transactionIndex"`

	From string          `json:"from"`
	To   *common.Address `json:"to"`
	// contains filtered or unexported fields
}

func (*TransactionReceipt) GetBlockHash

func (tr *TransactionReceipt) GetBlockHash() string

func (*TransactionReceipt) GetFrom

func (tr *TransactionReceipt) GetFrom() string

func (*TransactionReceipt) GetHash

func (tr *TransactionReceipt) GetHash() string

func (*TransactionReceipt) GetTo

func (tr *TransactionReceipt) GetTo() *common.Address

func (*TransactionReceipt) GetValue

func (tr *TransactionReceipt) GetValue() string

type TransactionResponse

type TransactionResponse struct {
	*ctypes.ResultTx
	Timestamp time.Time
}

type TransactionResult

type TransactionResult struct {
	TxType   hexutil.Uint64            `json:"type"`
	EthTx    *Transaction              `json:"ethTx"`
	EthTxLog string                    `json:"ethTxLog"`
	Receipt  *TransactionReceipt       `json:"receipt"`
	Response *WrappedResponseWithCodec `json:"response"`
}

func RawTxResultToStdResponse

func RawTxResultToStdResponse(clientCtx clientcontext.CLIContext,
	tr *ctypes.ResultTx, tx sdk.Tx, timestamp time.Time) (*TransactionResult, error)

type TxWatcher

type TxWatcher struct {
	// contains filtered or unexported fields
}

TxWatcher cache watch data when run tx Use Enabled() to check if watcher is enable when call methods of TxWatcher

func NewTxWatcher

func NewTxWatcher() *TxWatcher

func (*TxWatcher) DeleteAccount

func (w *TxWatcher) DeleteAccount(account interface{})

func (*TxWatcher) DeleteContractBlockedList

func (w *TxWatcher) DeleteContractBlockedList(addr interface{})

func (*TxWatcher) DeleteContractDeploymentWhitelist

func (w *TxWatcher) DeleteContractDeploymentWhitelist(addr interface{})

func (*TxWatcher) Destruct

func (w *TxWatcher) Destruct() []WatchMessage

func (*TxWatcher) Enabled

func (w *TxWatcher) Enabled() bool

func (*TxWatcher) Finalize

func (w *TxWatcher) Finalize()

func (*TxWatcher) SaveAccount

func (w *TxWatcher) SaveAccount(account interface{})

func (*TxWatcher) SaveContractBlockedListItem

func (w *TxWatcher) SaveContractBlockedListItem(addr interface{})

func (*TxWatcher) SaveContractCode

func (w *TxWatcher) SaveContractCode(addr common.Address, code []byte, height uint64)

func (*TxWatcher) SaveContractCodeByHash

func (w *TxWatcher) SaveContractCodeByHash(hash []byte, code []byte)

func (*TxWatcher) SaveContractDeploymentWhitelistItem

func (w *TxWatcher) SaveContractDeploymentWhitelistItem(addr interface{})

func (*TxWatcher) SaveContractMethodBlockedListItem

func (w *TxWatcher) SaveContractMethodBlockedListItem(addr interface{}, methods []byte)

func (*TxWatcher) SaveState

func (w *TxWatcher) SaveState(addr common.Address, key, value []byte)

type WatchData

type WatchData struct {
	DirtyAccount  []*sdk.AccAddress `json:"dirty_account"`
	Batches       []*Batch          `json:"batches"`
	DelayEraseKey [][]byte          `json:"delay_erase_key"`
	BloomData     []*types.KV       `json:"bloom_data"`
	DirtyList     [][]byte          `json:"dirty_list"`
}

func (*WatchData) MarshalToAmino

func (w *WatchData) MarshalToAmino(cdc *amino.Codec) ([]byte, error)

MarshalToAmino marshal to amino bytes

func (*WatchData) Size

func (w *WatchData) Size() int

func (*WatchData) UnmarshalFromAmino

func (w *WatchData) UnmarshalFromAmino(cdc *amino.Codec, data []byte) error

UnmarshalFromAmino unmarshal from amino bytes

type WatchMessage

type WatchMessage = sdk.WatchMessage

type WatchStore

type WatchStore struct {
	// contains filtered or unexported fields
}

func InstanceOfWatchStore

func InstanceOfWatchStore() *WatchStore

func (WatchStore) Delete

func (w WatchStore) Delete(key []byte)

func (WatchStore) Get

func (w WatchStore) Get(key []byte) ([]byte, error)

func (WatchStore) GetEvmParams

func (w WatchStore) GetEvmParams() evmtypes.Params

func (WatchStore) GetUnsafe

func (w WatchStore) GetUnsafe(key []byte, processor dbm.UnsafeValueProcessor) (interface{}, error)

func (WatchStore) Has

func (w WatchStore) Has(key []byte) bool

func (WatchStore) Iterator

func (w WatchStore) Iterator(start, end []byte) dbm.Iterator

func (WatchStore) Set

func (w WatchStore) Set(key []byte, value []byte)

func (*WatchStore) SetEvmParams

func (w *WatchStore) SetEvmParams(params evmtypes.Params)

type WatchTx

type WatchTx interface {
	GetTxWatchMessage() WatchMessage
	GetTransaction() *Transaction
	GetTxHash() common.Hash
	GetFailedReceipts(cumulativeGas, gasUsed uint64) *TransactionReceipt
	GetIndex() uint64
}

type Watcher

type Watcher struct {
	InfuraKeeper InfuraKeeper
	// contains filtered or unexported fields
}

func NewWatcher

func NewWatcher(logger log.Logger) *Watcher

func (*Watcher) ApplyWatchData

func (w *Watcher) ApplyWatchData(watchData interface{})

func (*Watcher) CheckWatchDB

func (w *Watcher) CheckWatchDB(keys [][]byte, mode string)

func (*Watcher) Collect

func (w *Watcher) Collect(watchers ...sdk.IWatcher)

func (*Watcher) Commit

func (w *Watcher) Commit()

func (*Watcher) CommitAccountToRpcDb

func (w *Watcher) CommitAccountToRpcDb(account auth.Account)

func (*Watcher) CommitCodeHashToDb

func (w *Watcher) CommitCodeHashToDb(hash []byte, code []byte)

func (*Watcher) CommitStateToRpcDb

func (w *Watcher) CommitStateToRpcDb(addr common.Address, key, value []byte)

func (*Watcher) CommitWatchData

func (w *Watcher) CommitWatchData(data WatchData)

func (*Watcher) CreateWatchDataGenerator

func (w *Watcher) CreateWatchDataGenerator() func() ([]byte, error)

func (*Watcher) DelayEraseKey

func (w *Watcher) DelayEraseKey()

func (*Watcher) DeleteAccount

func (w *Watcher) DeleteAccount(addr sdk.AccAddress)

func (*Watcher) Enable

func (w *Watcher) Enable(enable bool)

func (*Watcher) Enabled

func (w *Watcher) Enabled() bool

func (*Watcher) ExecuteDelayEraseKey

func (w *Watcher) ExecuteDelayEraseKey(delayEraseKey [][]byte)

func (*Watcher) GetBloomDataPoint

func (w *Watcher) GetBloomDataPoint() *[]*evmtypes.KV

func (*Watcher) GetEvmTxIndex

func (w *Watcher) GetEvmTxIndex() uint64

func (*Watcher) Height

func (w *Watcher) Height() uint64

func (*Watcher) IsFirstUse

func (w *Watcher) IsFirstUse() bool

func (*Watcher) IsRealEvmTx

func (w *Watcher) IsRealEvmTx(resp *tm.ResponseDeliverTx) bool

func (*Watcher) NewHeight

func (w *Watcher) NewHeight(height uint64, blockHash common.Hash, header types.Header)

func (*Watcher) RecordTxAndFailedReceipt

func (w *Watcher) RecordTxAndFailedReceipt(tx tm.TxEssentials, resp *tm.ResponseDeliverTx, txDecoder sdk.TxDecoder)

func (*Watcher) SaveAccount

func (w *Watcher) SaveAccount(account auth.Account)

func (*Watcher) SaveBlock

func (w *Watcher) SaveBlock(block evmtypes.Block, ethBlockHash common.Hash)

func (*Watcher) SaveBlockStdTxHash

func (w *Watcher) SaveBlockStdTxHash(blockHash common.Hash)

func (*Watcher) SaveContractBlockedListItem

func (w *Watcher) SaveContractBlockedListItem(addr sdk.AccAddress)

func (*Watcher) SaveContractDeploymentWhitelistItem

func (w *Watcher) SaveContractDeploymentWhitelistItem(addr sdk.AccAddress)

func (*Watcher) SaveContractMethodBlockedListItem

func (w *Watcher) SaveContractMethodBlockedListItem(addr sdk.AccAddress, methods []byte)

func (*Watcher) SaveLatestHeight

func (w *Watcher) SaveLatestHeight(height uint64)

func (*Watcher) SaveParallelTx

func (w *Watcher) SaveParallelTx(realTx sdk.Tx, resultData *types.ResultData, resp tm.ResponseDeliverTx)

SaveParallelTx saves parallel transactions and transactionReceipts to watcher

func (*Watcher) SaveParams

func (w *Watcher) SaveParams(params evmtypes.Params)

func (*Watcher) SaveTransactionReceipt

func (w *Watcher) SaveTransactionReceipt(status uint32, msg *evmtypes.MsgEthereumTx, txHash common.Hash, txIndex uint64, data *evmtypes.ResultData, gasUsed uint64)

func (*Watcher) SetFirstUse

func (w *Watcher) SetFirstUse(v bool)

SetFirstUse sets fistUse of Watcher only could use for ut

func (*Watcher) SetWatchDataManager

func (w *Watcher) SetWatchDataManager()

func (*Watcher) Stop

func (w *Watcher) Stop()

func (*Watcher) UnmarshalWatchData

func (w *Watcher) UnmarshalWatchData(wdByte []byte) (interface{}, error)

func (*Watcher) UpdateCumulativeGas

func (w *Watcher) UpdateCumulativeGas(txIndex, gasUsed uint64)

func (*Watcher) Used

func (w *Watcher) Used()

type WrappedResponseWithCodec

type WrappedResponseWithCodec struct {
	Response sdk.TxResponse
	Codec    *codec.Codec `json:"-"`
}

type WrappedResponseWithCodec

func (*WrappedResponseWithCodec) MarshalJSON

func (wr *WrappedResponseWithCodec) MarshalJSON() ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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