Versions in this module Expand all Collapse all v0 v0.19.9 Oct 25, 2021 Changes in this version + const FlagFastQuery + const FlagFastQueryLru + const MsgFunctionDisable + const TypeOthers + const TypeState + const WatchDbDir + var KeyLatestHeight = "LatestHeight" + var PrefixState = []byte + var TransactionFailed = uint32(0) + var TransactionSuccess = uint32(1) + func GetMsgAccountKey(addr []byte) []byte + func GetMsgStateKey(addr common.Address, key []byte) []byte + func GetWatchLruSize() int + func IsWatcherEnabled() bool + type BlockNonce [8]byte + func EncodeNonce(i uint64) BlockNonce + func (n *BlockNonce) UnmarshalText(input []byte) error + func (n BlockNonce) MarshalText() ([]byte, error) + func (n BlockNonce) Uint64() uint64 + type CodeInfo struct + Code string + Height uint64 + type EthBlock struct + Difficulty hexutil.Uint64 + ExtraData hexutil.Bytes + GasLimit hexutil.Uint64 + GasUsed *hexutil.Big + Hash common.Hash + LogsBloom ethtypes.Bloom + Miner common.Address + MixHash common.Hash + Nonce BlockNonce + Number hexutil.Uint64 + ParentHash common.Hash + ReceiptsRoot common.Hash + Size hexutil.Uint64 + StateRoot common.Hash + Timestamp hexutil.Uint64 + TotalDifficulty hexutil.Uint64 + Transactions interface{} + TransactionsRoot common.Hash + UncleHash common.Hash + Uncles []common.Hash + type MsgAccount struct + func NewMsgAccount(acc auth.Account) *MsgAccount + func (msgAccount *MsgAccount) GetKey() []byte + func (msgAccount *MsgAccount) GetType() uint32 + func (msgAccount *MsgAccount) GetValue() string + type MsgBlock struct + func NewMsgBlock(height uint64, blockBloom ethtypes.Bloom, blockHash common.Hash, ...) *MsgBlock + func (m MsgBlock) GetKey() []byte + func (m MsgBlock) GetType() uint32 + func (m MsgBlock) GetValue() string + type MsgBlockInfo struct + func NewMsgBlockInfo(height uint64, blockHash common.Hash) *MsgBlockInfo + func (b MsgBlockInfo) GetKey() []byte + func (b MsgBlockInfo) GetType() uint32 + func (b MsgBlockInfo) GetValue() string + type MsgCode struct + Code string + Key []byte + func NewMsgCode(contractAddr common.Address, code []byte, height uint64) *MsgCode + func (m MsgCode) GetKey() []byte + func (m MsgCode) GetType() uint32 + func (m MsgCode) GetValue() string + type MsgCodeByHash struct + Code string + Key []byte + func NewMsgCodeByHash(hash []byte, code []byte) *MsgCodeByHash + func (m MsgCodeByHash) GetKey() []byte + func (m MsgCodeByHash) GetType() uint32 + func (m MsgCodeByHash) GetValue() string + type MsgContractBlockedListItem struct + func NewMsgContractBlockedListItem(addr sdk.AccAddress) *MsgContractBlockedListItem + func (msgItem *MsgContractBlockedListItem) GetKey() []byte + func (msgItem *MsgContractBlockedListItem) GetType() uint32 + func (msgItem *MsgContractBlockedListItem) GetValue() string + type MsgContractDeploymentWhitelistItem struct + func NewMsgContractDeploymentWhitelistItem(addr sdk.AccAddress) *MsgContractDeploymentWhitelistItem + func (msgItem *MsgContractDeploymentWhitelistItem) GetKey() []byte + func (msgItem *MsgContractDeploymentWhitelistItem) GetType() uint32 + func (msgItem *MsgContractDeploymentWhitelistItem) GetValue() string + type MsgEthTx struct + JsonEthTx string + Key []byte + func NewMsgEthTx(tx *types.MsgEthereumTx, txHash, blockHash common.Hash, height, index uint64) *MsgEthTx + func (m MsgEthTx) GetKey() []byte + func (m MsgEthTx) GetType() uint32 + func (m MsgEthTx) GetValue() string + type MsgLatestHeight struct + func NewMsgLatestHeight(height uint64) *MsgLatestHeight + func (b MsgLatestHeight) GetKey() []byte + func (b MsgLatestHeight) GetType() uint32 + func (b MsgLatestHeight) GetValue() string + type MsgParams struct + func NewMsgParams(params types.Params) *MsgParams + func (msgParams *MsgParams) GetKey() []byte + func (msgParams *MsgParams) GetType() uint32 + func (msgParams *MsgParams) GetValue() string + type MsgState struct + func NewMsgState(addr common.Address, key, value []byte) *MsgState + func (msgState *MsgState) GetKey() []byte + func (msgState *MsgState) GetType() uint32 + func (msgState *MsgState) GetValue() string + type MsgTransactionReceipt struct + func NewMsgTransactionReceipt(status uint32, tx *types.MsgEthereumTx, txHash, blockHash common.Hash, ...) *MsgTransactionReceipt + func (m MsgTransactionReceipt) GetKey() []byte + func (m MsgTransactionReceipt) GetType() uint32 + func (m MsgTransactionReceipt) GetValue() string + type Querier struct + func NewQuerier() *Querier + func (q *Querier) Enable(sw bool) + func (q Querier) DeleteAccountFromRdb(addr sdk.AccAddress) + func (q Querier) DeleteStateFromRdb(addr common.Address, key []byte) + func (q Querier) GetAccount(addr sdk.AccAddress) (*types.EthAccount, error) + func (q Querier) GetAccountFromRdb(addr sdk.AccAddress) (*types.EthAccount, error) + func (q Querier) GetBlockByHash(hash common.Hash, fullTx bool) (*EthBlock, error) + func (q Querier) GetBlockByNumber(number uint64, fullTx bool) (*EthBlock, error) + func (q Querier) GetBlockHashByNumber(number uint64) (common.Hash, error) + func (q Querier) GetCode(contractAddr common.Address, height uint64) ([]byte, error) + func (q Querier) GetCodeByHash(codeHash []byte) ([]byte, error) + func (q Querier) GetLatestBlockNumber() (uint64, error) + func (q Querier) GetParams() (*evmtypes.Params, error) + func (q Querier) GetState(key []byte) ([]byte, error) + func (q Querier) GetStateFromRdb(key []byte) ([]byte, error) + func (q Querier) GetTransactionByBlockHashAndIndex(hash common.Hash, idx uint) (*rpctypes.Transaction, error) + func (q Querier) GetTransactionByBlockNumberAndIndex(number uint64, idx uint) (*rpctypes.Transaction, error) + func (q Querier) GetTransactionByHash(hash common.Hash) (*rpctypes.Transaction, error) + func (q Querier) GetTransactionReceipt(hash common.Hash) (*TransactionReceipt, error) + func (q Querier) HasContractBlockedList(key []byte) bool + func (q Querier) HasContractDeploymentWhitelist(key []byte) bool + func (q Querier) MustGetAccount(addr sdk.AccAddress) (*types.EthAccount, error) + func (q Querier) MustGetState(addr common.Address, key []byte) ([]byte, error) + type TransactionReceipt struct + BlockHash string + BlockNumber hexutil.Uint64 + ContractAddress *common.Address + CumulativeGasUsed hexutil.Uint64 + From string + GasUsed hexutil.Uint64 + Logs []*ethtypes.Log + LogsBloom ethtypes.Bloom + Status hexutil.Uint64 + To *common.Address + TransactionHash string + TransactionIndex hexutil.Uint64 + type WatchMessage interface + GetKey func() []byte + GetType func() uint32 + GetValue func() string + type WatchStore struct + func InstanceOfWatchStore() *WatchStore + func (w WatchStore) Delete(key []byte) + func (w WatchStore) Get(key []byte) ([]byte, error) + func (w WatchStore) Has(key []byte) bool + func (w WatchStore) Set(key []byte, value []byte) + type Watcher struct + func NewWatcher() *Watcher + func (w *Watcher) Commit() + func (w *Watcher) CommitAccountToRpcDb(account auth.Account) + func (w *Watcher) CommitCodeHashToDb(hash []byte, code []byte) + func (w *Watcher) CommitStateToRpcDb(addr common.Address, key, value []byte) + func (w *Watcher) DeleteAccount(addr sdk.AccAddress) + func (w *Watcher) DeleteContractBlockedList(addr sdk.AccAddress) + func (w *Watcher) DeleteContractDeploymentWhitelist(addr sdk.AccAddress) + func (w *Watcher) Enable(sw bool) + func (w *Watcher) Enabled() bool + func (w *Watcher) ExecuteDelayEraseKey() + func (w *Watcher) Finalize() + func (w *Watcher) IsFirstUse() bool + func (w *Watcher) NewHeight(height uint64, blockHash common.Hash, header types.Header) + func (w *Watcher) Reset() + func (w *Watcher) SaveAccount(account auth.Account, isDirectly bool) + func (w *Watcher) SaveBlock(bloom ethtypes.Bloom) + func (w *Watcher) SaveContractBlockedListItem(addr sdk.AccAddress) + func (w *Watcher) SaveContractCode(addr common.Address, code []byte) + func (w *Watcher) SaveContractCodeByHash(hash []byte, code []byte) + func (w *Watcher) SaveContractDeploymentWhitelistItem(addr sdk.AccAddress) + func (w *Watcher) SaveEthereumTx(msg evmtypes.MsgEthereumTx, txHash common.Hash, index uint64) + func (w *Watcher) SaveLatestHeight(height uint64) + func (w *Watcher) SaveParams(params evmtypes.Params) + func (w *Watcher) SaveState(addr common.Address, key, value []byte) + func (w *Watcher) SaveTransactionReceipt(status uint32, msg evmtypes.MsgEthereumTx, txHash common.Hash, txIndex uint64, ...) + func (w *Watcher) UpdateBlockTxs(txHash common.Hash) + func (w *Watcher) UpdateCumulativeGas(txIndex, gasUsed uint64) + func (w *Watcher) Used()