Documentation ¶
Index ¶
- Constants
- Variables
- func APIList(db kv.RoDB, eth rpchelper.ApiBackend, txPool txpool.TxpoolClient, ...) (list []rpc.API)
- type APIImpl
- func (api *APIImpl) Accounts(ctx context.Context) ([]common.Address, error)
- func (api *APIImpl) BaseFee(ctx context.Context) (*hexutil.Big, error)
- func (api *APIImpl) BlobBaseFee(ctx context.Context) (*hexutil.Big, error)
- func (api *APIImpl) BlockNumber(ctx context.Context) (hexutil.Uint64, error)
- func (api *APIImpl) Call(ctx context.Context, args ethapi2.CallArgs, ...) (hexutility.Bytes, error)
- func (api *APIImpl) CallBundle(ctx context.Context, txHashes []common.Hash, ...) (map[string]interface{}, error)
- func (api *APIImpl) CallMany(ctx context.Context, bundles []Bundle, simulateContext StateContext, ...) ([][]map[string]interface{}, error)
- func (api *APIImpl) ChainID(ctx context.Context) (hexutil.Uint64, error)
- func (api *APIImpl) ChainId(ctx context.Context) (hexutil.Uint64, error)
- func (api *APIImpl) Coinbase(ctx context.Context) (libcommon.Address, error)
- func (api *APIImpl) CreateAccessList(ctx context.Context, args ethapi2.CallArgs, ...) (*accessListResult, error)
- func (api *APIImpl) EstimateGas(ctx context.Context, argsOrNil *ethapi2.CallArgs, ...) (hexutil.Uint64, error)
- func (api *APIImpl) Exist(ctx context.Context, address libcommon.Address, ...) (bool, error)
- func (api *APIImpl) FeeHistory(ctx context.Context, blockCount rpc.DecimalOrHex, lastBlock rpc.BlockNumber, ...) (*feeHistoryResult, error)
- func (api *APIImpl) GasPrice(ctx context.Context) (*hexutil.Big, error)
- func (api *APIImpl) GetBalance(ctx context.Context, address libcommon.Address, ...) (*hexutil.Big, error)
- func (api *APIImpl) GetBlockByHash(ctx context.Context, numberOrHash rpc.BlockNumberOrHash, fullTx bool) (map[string]interface{}, error)
- func (api *APIImpl) GetBlockByNumber(ctx context.Context, number rpc.BlockNumber, fullTx bool) (map[string]interface{}, error)
- func (api *APIImpl) GetBlockReceipts(ctx context.Context, numberOrHash rpc.BlockNumberOrHash) ([]map[string]interface{}, error)
- func (api *APIImpl) GetBlockTransactionCountByHash(ctx context.Context, blockHash common.Hash) (*hexutil.Uint, error)
- func (api *APIImpl) GetBlockTransactionCountByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*hexutil.Uint, error)
- func (api *APIImpl) GetCode(ctx context.Context, address libcommon.Address, ...) (hexutility.Bytes, error)
- func (api *APIImpl) GetFilterChanges(_ context.Context, index string) ([]any, error)
- func (api *APIImpl) GetFilterLogs(_ context.Context, index string) ([]*types.Log, error)
- func (api *APIImpl) GetLogs(ctx context.Context, crit filters.FilterCriteria) (types.Logs, error)
- func (api *APIImpl) GetProof(ctx context.Context, address libcommon.Address, storageKeys []libcommon.Hash, ...) (*accounts.AccProofResult, error)
- func (api *APIImpl) GetRawTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, index hexutil.Uint) (hexutility.Bytes, error)
- func (api *APIImpl) GetRawTransactionByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, index hexutil.Uint) (hexutility.Bytes, error)
- func (api *APIImpl) GetRawTransactionByHash(ctx context.Context, hash common.Hash) (hexutility.Bytes, error)
- func (api *APIImpl) GetStorageAt(ctx context.Context, address libcommon.Address, index string, ...) (string, error)
- func (api *APIImpl) GetTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, txIndex hexutil.Uint64) (*RPCTransaction, error)
- func (api *APIImpl) GetTransactionByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, txIndex hexutil.Uint) (*RPCTransaction, error)
- func (api *APIImpl) GetTransactionByHash(ctx context.Context, txnHash common.Hash) (*RPCTransaction, error)
- func (api *APIImpl) GetTransactionCount(ctx context.Context, address libcommon.Address, ...) (*hexutil.Uint64, error)
- func (api *APIImpl) GetTransactionReceipt(ctx context.Context, txnHash common.Hash) (map[string]interface{}, error)
- func (api *APIImpl) GetUncleByBlockHashAndIndex(ctx context.Context, hash common.Hash, index hexutil.Uint) (map[string]interface{}, error)
- func (api *APIImpl) GetUncleByBlockNumberAndIndex(ctx context.Context, number rpc.BlockNumber, index hexutil.Uint) (map[string]interface{}, error)
- func (api *APIImpl) GetUncleCountByBlockHash(ctx context.Context, hash common.Hash) (*hexutil.Uint, error)
- func (api *APIImpl) GetUncleCountByBlockNumber(ctx context.Context, number rpc.BlockNumber) (*hexutil.Uint, error)
- func (api *APIImpl) GetWork(ctx context.Context) ([4]string, error)
- func (api *APIImpl) Hashrate(ctx context.Context) (uint64, error)
- func (api *APIImpl) Logs(ctx context.Context, crit filters.FilterCriteria) (*rpc.Subscription, error)
- func (api *APIImpl) MaxPriorityFeePerGas(ctx context.Context) (*hexutil.Big, error)
- func (api *APIImpl) Mining(ctx context.Context) (bool, error)
- func (api *APIImpl) NewBlockFilter(_ context.Context) (string, error)
- func (api *APIImpl) NewFilter(_ context.Context, crit filters.FilterCriteria) (string, error)
- func (api *APIImpl) NewHeads(ctx context.Context) (*rpc.Subscription, error)
- func (api *APIImpl) NewPendingTransactionFilter(_ context.Context) (string, error)
- func (api *APIImpl) NewPendingTransactions(ctx context.Context, fullTx *bool) (*rpc.Subscription, error)
- func (api *APIImpl) NewPendingTransactionsWithBody(ctx context.Context) (*rpc.Subscription, error)
- func (api *APIImpl) ProtocolVersion(ctx context.Context) (hexutil.Uint, error)
- func (api *APIImpl) SendRawTransaction(ctx context.Context, encodedTx hexutility.Bytes) (common.Hash, error)
- func (api *APIImpl) SendTransaction(_ context.Context, txObject interface{}) (common.Hash, error)
- func (api *APIImpl) Sign(ctx context.Context, _ common.Address, _ hexutility.Bytes) (hexutility.Bytes, error)
- func (api *APIImpl) SignTransaction(_ context.Context, txObject interface{}) (common.Hash, error)
- func (api *APIImpl) SubmitHashrate(ctx context.Context, hashRate hexutil.Uint64, id libcommon.Hash) (bool, error)
- func (api *APIImpl) SubmitWork(ctx context.Context, nonce types.BlockNonce, powHash, digest libcommon.Hash) (bool, error)
- func (api *APIImpl) Syncing(ctx context.Context) (interface{}, error)
- func (api *APIImpl) UninstallFilter(_ context.Context, index string) (isDeleted bool, err error)
- type AccountResult
- type AdminAPI
- type AdminAPIImpl
- type BaseAPI
- type BlockOverrides
- type BlockProvider
- func NewBackwardBlockProvider(chunkLocator ChunkLocator, maxBlock uint64) BlockProvider
- func NewCallCursorBackwardBlockProvider(cursor kv.Cursor, addr common.Address, maxBlock uint64) BlockProvider
- func NewCallCursorForwardBlockProvider(cursor kv.Cursor, addr common.Address, minBlock uint64) BlockProvider
- func NewForwardBlockProvider(chunkLocator ChunkLocator, minBlock uint64) BlockProvider
- type BlockSigners
- type BorAPI
- type BorImpl
- func (api *BorImpl) GetAuthor(blockNrOrHash *rpc.BlockNumberOrHash) (*common.Address, error)
- func (api *BorImpl) GetCurrentProposer() (common.Address, error)
- func (api *BorImpl) GetCurrentValidators() ([]*valset.Validator, error)
- func (api *BorImpl) GetRootHash(start, end uint64) (string, error)
- func (api *BorImpl) GetSigners(number *rpc.BlockNumber) ([]common.Address, error)
- func (api *BorImpl) GetSignersAtHash(hash common.Hash) ([]common.Address, error)
- func (api *BorImpl) GetSnapshot(number *rpc.BlockNumber) (*Snapshot, error)
- func (api *BorImpl) GetSnapshotAtHash(hash common.Hash) (*Snapshot, error)
- func (api *BorImpl) GetSnapshotProposer(blockNrOrHash *rpc.BlockNumberOrHash) (common.Address, error)
- func (api *BorImpl) GetSnapshotProposerSequence(blockNrOrHash *rpc.BlockNumberOrHash) (BlockSigners, error)
- func (api *BorImpl) GetVoteOnHash(ctx context.Context, starBlockNr uint64, endBlockNr uint64, hash string, ...) (bool, error)
- type Bundle
- type CallTraceAction
- type ChunkLocator
- type ChunkProvider
- type ContractCreatorData
- type CreateTraceAction
- type CreateTraceResult
- type CreateTracer
- func (t *CreateTracer) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, precompile bool, ...)
- func (t *CreateTracer) CaptureStart(env *vm.EVM, from common.Address, to common.Address, precompile bool, ...)
- func (t *CreateTracer) Found() bool
- func (t *CreateTracer) SetTransaction(tx types.Transaction)
- type CreationCode
- type DBAPI
- type DBAPIImpl
- func (api *DBAPIImpl) GetHex(_ context.Context, _ string, _ string) (hexutility.Bytes, error)
- func (api *DBAPIImpl) GetString(_ context.Context, _ string, _ string) (string, error)
- func (api *DBAPIImpl) PutHex(_ context.Context, _ string, _ string, _ hexutility.Bytes) (bool, error)
- func (api *DBAPIImpl) PutString(_ context.Context, _ string, _ string, _ string) (bool, error)
- type DefaultTracer
- func (t *DefaultTracer) CaptureEnd(output []byte, usedGas uint64, err error)
- func (t *DefaultTracer) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, precompile bool, ...)
- func (t *DefaultTracer) CaptureExit(output []byte, usedGas uint64, err error)
- func (t *DefaultTracer) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, ...)
- func (t *DefaultTracer) CaptureStart(env *vm.EVM, from common.Address, to common.Address, precompile bool, ...)
- func (t *DefaultTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, ...)
- func (t *DefaultTracer) CaptureTxEnd(restGas uint64)
- func (t *DefaultTracer) CaptureTxStart(gasLimit uint64)
- type ErigonAPI
- type ErigonImpl
- func (api *ErigonImpl) BlockNumber(ctx context.Context, rpcBlockNumPtr *rpc.BlockNumber) (hexutil.Uint64, error)
- func (api *ErigonImpl) CacheCheck() (*kvcache.CacheValidationResult, error)
- func (api *ErigonImpl) Forks(ctx context.Context) (Forks, error)
- func (api *ErigonImpl) GetBalanceChangesInBlock(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (map[common.Address]*hexutil.Big, error)
- func (api *ErigonImpl) GetBlockByTimestamp(ctx context.Context, timeStamp rpc.Timestamp, fullTx bool) (map[string]interface{}, error)
- func (api *ErigonImpl) GetBlockReceiptsByBlockHash(ctx context.Context, cannonicalBlockHash common.Hash) ([]map[string]interface{}, error)
- func (api *ErigonImpl) GetHeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error)
- func (api *ErigonImpl) GetHeaderByNumber(ctx context.Context, blockNumber rpc.BlockNumber) (*types.Header, error)
- func (api *ErigonImpl) GetLatestLogs(ctx context.Context, crit filters.FilterCriteria, ...) (types.ErigonLogs, error)
- func (api *ErigonImpl) GetLogs(ctx context.Context, crit filters.FilterCriteria) (types.ErigonLogs, error)
- func (api *ErigonImpl) GetLogsByHash(ctx context.Context, hash common.Hash) ([][]*types.Log, error)
- func (api *ErigonImpl) NodeInfo(ctx context.Context) ([]p2p.NodeInfo, error)
- type EthAPI
- type Forks
- type GasPriceCache
- type GasPriceOracleBackend
- func (b *GasPriceOracleBackend) BlockByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Block, error)
- func (b *GasPriceOracleBackend) ChainConfig() *chain.Config
- func (b *GasPriceOracleBackend) GetReceipts(ctx context.Context, block *types.Block) (types.Receipts, error)
- func (b *GasPriceOracleBackend) HeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error)
- func (b *GasPriceOracleBackend) PendingBlockAndReceipts() (*types.Block, types.Receipts)
- type GenericTracer
- type GethTrace
- type GethTraces
- type GraphQLAPI
- type GraphQLAPIImpl
- type InternalOperation
- type MapTxNum2BlockNumIter
- type NetAPI
- type NetAPIImpl
- type OeTracer
- func (ot *OeTracer) CaptureEnd(output []byte, usedGas uint64, err error)
- func (ot *OeTracer) CaptureEnter(typ vm.OpCode, from libcommon.Address, to libcommon.Address, precompile bool, ...)
- func (ot *OeTracer) CaptureExit(output []byte, usedGas uint64, err error)
- func (ot *OeTracer) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, opDepth int, ...)
- func (ot *OeTracer) CaptureStart(env *vm.EVM, from libcommon.Address, to libcommon.Address, precompile bool, ...)
- func (ot *OeTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, ...)
- func (ot *OeTracer) CaptureTxEnd(restGas uint64)
- func (ot *OeTracer) CaptureTxStart(gasLimit uint64)
- type OeTracerConfig
- type OperationType
- type OperationsTracer
- type OtterscanAPI
- type OtterscanAPIImpl
- func (api *OtterscanAPIImpl) GetApiLevel() uint8
- func (api *OtterscanAPIImpl) GetBlockDetails(ctx context.Context, number rpc.BlockNumber) (map[string]interface{}, error)
- func (api *OtterscanAPIImpl) GetBlockDetailsByHash(ctx context.Context, hash common.Hash) (map[string]interface{}, error)
- func (api *OtterscanAPIImpl) GetBlockTransactions(ctx context.Context, number rpc.BlockNumber, pageNumber uint8, pageSize uint8) (map[string]interface{}, error)
- func (api *OtterscanAPIImpl) GetContractCreator(ctx context.Context, addr common.Address) (*ContractCreatorData, error)
- func (api *OtterscanAPIImpl) GetInternalOperations(ctx context.Context, hash common.Hash) ([]*InternalOperation, error)
- func (api *OtterscanAPIImpl) GetTransactionBySenderAndNonce(ctx context.Context, addr common.Address, nonce uint64) (*common.Hash, error)
- func (api *OtterscanAPIImpl) GetTransactionError(ctx context.Context, hash common.Hash) (hexutility.Bytes, error)
- func (api *OtterscanAPIImpl) HasCode(ctx context.Context, address common.Address, ...) (bool, error)
- func (api *OtterscanAPIImpl) SearchTransactionsAfter(ctx context.Context, addr common.Address, blockNum uint64, pageSize uint16) (*TransactionsWithReceipts, error)
- func (api *OtterscanAPIImpl) SearchTransactionsBefore(ctx context.Context, addr common.Address, blockNum uint64, pageSize uint16) (*TransactionsWithReceipts, error)
- func (api *OtterscanAPIImpl) TraceTransaction(ctx context.Context, hash common.Hash) ([]*TraceEntry, error)
- type OverlayAPI
- type OverlayAPIImpl
- type OverlayCreateTracer
- func (ct *OverlayCreateTracer) CaptureEnd(output []byte, usedGas uint64, err error)
- func (ct *OverlayCreateTracer) CaptureEnter(typ vm.OpCode, from libcommon.Address, to libcommon.Address, precompile bool, ...)
- func (ct *OverlayCreateTracer) CaptureExit(output []byte, usedGas uint64, err error)
- func (ct *OverlayCreateTracer) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, ...)
- func (ct *OverlayCreateTracer) CaptureStart(env *vm.EVM, from libcommon.Address, to libcommon.Address, precompile bool, ...)
- func (ct *OverlayCreateTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, ...)
- func (ct *OverlayCreateTracer) CaptureTxEnd(restGas uint64)
- func (ct *OverlayCreateTracer) CaptureTxStart(gasLimit uint64)
- type ParityAPI
- type ParityAPIImpl
- type ParityTrace
- type ParityTraces
- type PrivateDebugAPI
- type PrivateDebugAPIImpl
- func (api *PrivateDebugAPIImpl) AccountAt(ctx context.Context, blockHash common.Hash, txIndex uint64, ...) (*AccountResult, error)
- func (api *PrivateDebugAPIImpl) AccountRange(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash, startKey []byte, ...) (state.IteratorDump, error)
- func (api *PrivateDebugAPIImpl) GetModifiedAccountsByHash(ctx context.Context, startHash common.Hash, endHash *common.Hash) ([]common.Address, error)
- func (api *PrivateDebugAPIImpl) GetModifiedAccountsByNumber(ctx context.Context, startNumber rpc.BlockNumber, endNumber *rpc.BlockNumber) ([]common.Address, error)
- func (api *PrivateDebugAPIImpl) GetRawBlock(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (hexutility.Bytes, error)
- func (api *PrivateDebugAPIImpl) GetRawHeader(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (hexutility.Bytes, error)
- func (api *PrivateDebugAPIImpl) StorageRangeAt(ctx context.Context, blockHash common.Hash, txIndex uint64, ...) (StorageRangeResult, error)
- func (api *PrivateDebugAPIImpl) TraceBlockByHash(ctx context.Context, hash common.Hash, config *tracersConfig.TraceConfig, ...) error
- func (api *PrivateDebugAPIImpl) TraceBlockByNumber(ctx context.Context, blockNum rpc.BlockNumber, ...) error
- func (api *PrivateDebugAPIImpl) TraceCall(ctx context.Context, args ethapi.CallArgs, blockNrOrHash rpc.BlockNumberOrHash, ...) error
- func (api *PrivateDebugAPIImpl) TraceCallMany(ctx context.Context, bundles []Bundle, simulateContext StateContext, ...) error
- func (api *PrivateDebugAPIImpl) TraceTransaction(ctx context.Context, hash common.Hash, config *tracersConfig.TraceConfig, ...) error
- type RPCTransaction
- type RewardTraceAction
- type Snapshot
- type StateContext
- type StateDiff
- func (sd *StateDiff) CompareStates(initialIbs, ibs *state.IntraBlockState)
- func (sd *StateDiff) CreateContract(address libcommon.Address) error
- func (sd *StateDiff) DeleteAccount(address libcommon.Address, original *accounts.Account) error
- func (sd *StateDiff) UpdateAccountCode(address libcommon.Address, incarnation uint64, codeHash libcommon.Hash, ...) error
- func (sd *StateDiff) UpdateAccountData(address libcommon.Address, original, account *accounts.Account) error
- func (sd *StateDiff) WriteAccountStorage(address libcommon.Address, incarnation uint64, key *libcommon.Hash, ...) error
- type StateDiffAccount
- type StateDiffBalance
- type StateDiffCode
- type StateDiffNonce
- type StateDiffStorage
- type StorageEntry
- type StorageRangeResult
- type SuicideTraceAction
- type TouchTracer
- type TraceAPI
- type TraceAPIImpl
- func (api *TraceAPIImpl) Block(ctx context.Context, blockNr rpc.BlockNumber, gasBailOut *bool, ...) (ParityTraces, error)
- func (api *TraceAPIImpl) Call(ctx context.Context, args TraceCallParam, traceTypes []string, ...) (*TraceCallResult, error)
- func (api *TraceAPIImpl) CallMany(ctx context.Context, calls json.RawMessage, ...) ([]*TraceCallResult, error)
- func (api *TraceAPIImpl) Filter(ctx context.Context, req TraceFilterRequest, gasBailOut *bool, ...) error
- func (api *TraceAPIImpl) Get(ctx context.Context, txHash common.Hash, indicies []hexutil.Uint64, ...) (*ParityTrace, error)
- func (api *TraceAPIImpl) RawTransaction(ctx context.Context, txHash libcommon.Hash, traceTypes []string) ([]interface{}, error)
- func (api *TraceAPIImpl) ReplayBlockTransactions(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash, traceTypes []string, ...) ([]*TraceCallResult, error)
- func (api *TraceAPIImpl) ReplayTransaction(ctx context.Context, txHash libcommon.Hash, traceTypes []string, ...) (*TraceCallResult, error)
- func (api *TraceAPIImpl) Transaction(ctx context.Context, txHash common.Hash, gasBailOut *bool, ...) (ParityTraces, error)
- type TraceAction
- type TraceCallParam
- type TraceCallResult
- type TraceEntry
- type TraceFilterMode
- type TraceFilterRequest
- type TraceResult
- type TransactionTracer
- func (t *TransactionTracer) CaptureEnd(output []byte, usedGas uint64, err error)
- func (t *TransactionTracer) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, precompile bool, ...)
- func (t *TransactionTracer) CaptureExit(output []byte, usedGas uint64, err error)
- func (t *TransactionTracer) CaptureStart(env *vm.EVM, from common.Address, to common.Address, precompile bool, ...)
- type TransactionsWithReceipts
- type TxPoolAPI
- type TxPoolAPIImpl
- func (api *TxPoolAPIImpl) Content(ctx context.Context) (map[string]map[string]map[string]*RPCTransaction, error)
- func (api *TxPoolAPIImpl) ContentFrom(ctx context.Context, addr libcommon.Address) (map[string]map[string]*RPCTransaction, error)
- func (api *TxPoolAPIImpl) Status(ctx context.Context) (map[string]hexutil.Uint, error)
- type ValidatorSet
- type VmTrace
- type VmTraceEx
- type VmTraceMem
- type VmTraceOp
- type VmTraceStore
- type Web3API
- type Web3APIImpl
Constants ¶
const ( CALL = "call" CALLCODE = "callcode" DELEGATECALL = "delegatecall" STATICCALL = "staticcall" CREATE = "create" SUICIDE = "suicide" REWARD = "reward" TraceTypeTrace = "trace" TraceTypeStateDiff = "stateDiff" TraceTypeVmTrace = "vmTrace" )
const ( // TraceFilterModeUnion is default mode for TraceFilter. // Unions results referred to addresses from FromAddress or ToAddress TraceFilterModeUnion = "union" // TraceFilterModeIntersection retrieves results referred to addresses provided both in FromAddress and ToAddress TraceFilterModeIntersection = "intersection" )
const API_LEVEL = 8
API_LEVEL Must be incremented every time new additions are made
const AccountRangeMaxResults = 8192
AccountRangeMaxResults is the maximum number of results to be returned
const AccountRangeMaxResultsWithStorage = 256
AccountRangeMaxResultsWithStorage is the maximum number of results to be returned if storage is asked to be enclosed. Contract storage is usually huge and we should be careful not overwhelming our clients or being stuck in db.
const MaxBlockNum = ^uint64(0)
const NotAvailableChainData = "the function %s is not available, please use --private.api.addr option instead of --datadir option"
NotAvailableChainData x
const NotAvailableDeprecated = "the method has been deprecated: %s"
NotAvailableDeprecated x
const NotImplemented = "the method is currently not implemented: %s"
NotImplemented is the URI prefix for smartcard wallets.
Variables ¶
var ErrWrongTag = fmt.Errorf("listStorageKeys wrong block tag or number: must be '%s' ('latest')", latestTag)
Functions ¶
func APIList ¶
func APIList(db kv.RoDB, eth rpchelper.ApiBackend, txPool txpool.TxpoolClient, mining txpool.MiningClient, filters *rpchelper.Filters, stateCache kvcache.Cache, blockReader services.FullBlockReader, cfg *httpcfg.HttpCfg, engine consensus.EngineReader, logger log.Logger, bridgeReader bridgeReader, spanProducersReader spanProducersReader, ) (list []rpc.API)
APIList describes the list of available RPC apis
Types ¶
type APIImpl ¶
type APIImpl struct { *BaseAPI GasCap uint64 FeeCap float64 ReturnDataLimit int AllowUnprotectedTxs bool MaxGetProofRewindBlockCount int SubscribeLogsChannelSize int // contains filtered or unexported fields }
APIImpl is implementation of the EthAPI interface based on remote Db access
func NewEthAPI ¶
func NewEthAPI(base *BaseAPI, db kv.RoDB, eth rpchelper.ApiBackend, txPool txpool.TxpoolClient, mining txpool.MiningClient, gascap uint64, feecap float64, returnDataLimit int, allowUnprotectedTxs bool, maxGetProofRewindBlockCount int, subscribeLogsChannelSize int, logger log.Logger) *APIImpl
NewEthAPI returns APIImpl instance
func (*APIImpl) Accounts ¶
Accounts implements eth_accounts. Returns a list of addresses owned by the client. Deprecated: This function will be removed in the future.
func (*APIImpl) BlobBaseFee ¶
BlobBaseFee returns the base fee for blob gas at the current head.
func (*APIImpl) BlockNumber ¶
BlockNumber implements eth_blockNumber. Returns the block number of most recent block.
func (*APIImpl) Call ¶
func (api *APIImpl) Call(ctx context.Context, args ethapi2.CallArgs, blockNrOrHash rpc.BlockNumberOrHash, overrides *ethapi2.StateOverrides) (hexutility.Bytes, error)
Call implements eth_call. Executes a new message call immediately without creating a transaction on the block chain.
func (*APIImpl) CallBundle ¶
func (*APIImpl) CallMany ¶
func (api *APIImpl) CallMany(ctx context.Context, bundles []Bundle, simulateContext StateContext, stateOverride *ethapi.StateOverrides, timeoutMilliSecondsPtr *int64) ([][]map[string]interface{}, error)
func (*APIImpl) Coinbase ¶
Coinbase implements eth_coinbase. Returns the current client coinbase address.
func (*APIImpl) CreateAccessList ¶
func (api *APIImpl) CreateAccessList(ctx context.Context, args ethapi2.CallArgs, blockNrOrHash *rpc.BlockNumberOrHash, optimizeGas *bool) (*accessListResult, error)
CreateAccessList implements eth_createAccessList. It creates an access list for the given transaction. If the accesslist creation fails an error is returned. If the transaction itself fails, an vmErr is returned.
func (*APIImpl) EstimateGas ¶
func (api *APIImpl) EstimateGas(ctx context.Context, argsOrNil *ethapi2.CallArgs, blockNrOrHash *rpc.BlockNumberOrHash, overrides *ethapi2.StateOverrides) (hexutil.Uint64, error)
EstimateGas implements eth_estimateGas. Returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain.
func (*APIImpl) Exist ¶
func (api *APIImpl) Exist(ctx context.Context, address libcommon.Address, blockNrOrHash rpc.BlockNumberOrHash) (bool, error)
Exist returns whether an account for a given address exists in the database.
func (*APIImpl) FeeHistory ¶
func (api *APIImpl) FeeHistory(ctx context.Context, blockCount rpc.DecimalOrHex, lastBlock rpc.BlockNumber, rewardPercentiles []float64) (*feeHistoryResult, error)
func (*APIImpl) GasPrice ¶
GasPrice implements eth_gasPrice. Returns the current price per gas in wei.
func (*APIImpl) GetBalance ¶
func (api *APIImpl) GetBalance(ctx context.Context, address libcommon.Address, blockNrOrHash rpc.BlockNumberOrHash) (*hexutil.Big, error)
GetBalance implements eth_getBalance. Returns the balance of an account for a given address.
func (*APIImpl) GetBlockByHash ¶
func (api *APIImpl) GetBlockByHash(ctx context.Context, numberOrHash rpc.BlockNumberOrHash, fullTx bool) (map[string]interface{}, error)
GetBlockByHash implements eth_getBlockByHash. Returns information about a block given the block's hash.
func (*APIImpl) GetBlockByNumber ¶
func (api *APIImpl) GetBlockByNumber(ctx context.Context, number rpc.BlockNumber, fullTx bool) (map[string]interface{}, error)
GetBlockByNumber implements eth_getBlockByNumber. Returns information about a block given the block's number.
func (*APIImpl) GetBlockReceipts ¶
func (api *APIImpl) GetBlockReceipts(ctx context.Context, numberOrHash rpc.BlockNumberOrHash) ([]map[string]interface{}, error)
GetBlockReceipts - receipts for individual block
func (*APIImpl) GetBlockTransactionCountByHash ¶
func (api *APIImpl) GetBlockTransactionCountByHash(ctx context.Context, blockHash common.Hash) (*hexutil.Uint, error)
GetBlockTransactionCountByHash implements eth_getBlockTransactionCountByHash. Returns the number of transactions in a block given the block's block hash.
func (*APIImpl) GetBlockTransactionCountByNumber ¶
func (api *APIImpl) GetBlockTransactionCountByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*hexutil.Uint, error)
GetBlockTransactionCountByNumber implements eth_getBlockTransactionCountByNumber. Returns the number of transactions in a block given the block's block number.
func (*APIImpl) GetCode ¶
func (api *APIImpl) GetCode(ctx context.Context, address libcommon.Address, blockNrOrHash rpc.BlockNumberOrHash) (hexutility.Bytes, error)
GetCode implements eth_getCode. Returns the byte code at a given address (if it's a smart contract).
func (*APIImpl) GetFilterChanges ¶
GetFilterChanges implements eth_getFilterChanges. Polling method for a previously-created filter returns an array of logs, block headers, or pending transactions which occurred since last poll.
func (*APIImpl) GetFilterLogs ¶
GetFilterLogs implements eth_getFilterLogs. Polling method for a previously-created filter returns an array of logs which occurred since last poll.
func (*APIImpl) GetLogs ¶
GetLogs implements eth_getLogs. Returns an array of logs matching a given filter object.
func (*APIImpl) GetProof ¶
func (api *APIImpl) GetProof(ctx context.Context, address libcommon.Address, storageKeys []libcommon.Hash, blockNrOrHash rpc.BlockNumberOrHash) (*accounts.AccProofResult, error)
GetProof is partially implemented; no Storage proofs, and proofs must be for blocks within maxGetProofRewindBlockCount blocks of the head.
func (*APIImpl) GetRawTransactionByBlockHashAndIndex ¶
func (api *APIImpl) GetRawTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, index hexutil.Uint) (hexutility.Bytes, error)
GetRawTransactionByBlockHashAndIndex returns the bytes of the transaction for the given block hash and index.
func (*APIImpl) GetRawTransactionByBlockNumberAndIndex ¶
func (api *APIImpl) GetRawTransactionByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, index hexutil.Uint) (hexutility.Bytes, error)
GetRawTransactionByBlockNumberAndIndex returns the bytes of the transaction for the given block number and index.
func (*APIImpl) GetRawTransactionByHash ¶
func (api *APIImpl) GetRawTransactionByHash(ctx context.Context, hash common.Hash) (hexutility.Bytes, error)
GetRawTransactionByHash returns the bytes of the transaction for the given hash.
func (*APIImpl) GetStorageAt ¶
func (api *APIImpl) GetStorageAt(ctx context.Context, address libcommon.Address, index string, blockNrOrHash rpc.BlockNumberOrHash) (string, error)
GetStorageAt implements eth_getStorageAt. Returns the value from a storage position at a given address.
func (*APIImpl) GetTransactionByBlockHashAndIndex ¶
func (api *APIImpl) GetTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, txIndex hexutil.Uint64) (*RPCTransaction, error)
GetTransactionByBlockHashAndIndex implements eth_getTransactionByBlockHashAndIndex. Returns information about a transaction given the block's hash and a transaction index.
func (*APIImpl) GetTransactionByBlockNumberAndIndex ¶
func (api *APIImpl) GetTransactionByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, txIndex hexutil.Uint) (*RPCTransaction, error)
GetTransactionByBlockNumberAndIndex implements eth_getTransactionByBlockNumberAndIndex. Returns information about a transaction given a block number and transaction index.
func (*APIImpl) GetTransactionByHash ¶
func (api *APIImpl) GetTransactionByHash(ctx context.Context, txnHash common.Hash) (*RPCTransaction, error)
GetTransactionByHash implements eth_getTransactionByHash. Returns information about a transaction given the transaction's hash.
func (*APIImpl) GetTransactionCount ¶
func (api *APIImpl) GetTransactionCount(ctx context.Context, address libcommon.Address, blockNrOrHash rpc.BlockNumberOrHash) (*hexutil.Uint64, error)
GetTransactionCount implements eth_getTransactionCount. Returns the number of transactions sent from an address (the nonce).
func (*APIImpl) GetTransactionReceipt ¶
func (api *APIImpl) GetTransactionReceipt(ctx context.Context, txnHash common.Hash) (map[string]interface{}, error)
GetTransactionReceipt implements eth_getTransactionReceipt. Returns the receipt of a transaction given the transaction's hash.
func (*APIImpl) GetUncleByBlockHashAndIndex ¶
func (api *APIImpl) GetUncleByBlockHashAndIndex(ctx context.Context, hash common.Hash, index hexutil.Uint) (map[string]interface{}, error)
GetUncleByBlockHashAndIndex implements eth_getUncleByBlockHashAndIndex. Returns information about an uncle given a block's hash and the index of the uncle.
func (*APIImpl) GetUncleByBlockNumberAndIndex ¶
func (api *APIImpl) GetUncleByBlockNumberAndIndex(ctx context.Context, number rpc.BlockNumber, index hexutil.Uint) (map[string]interface{}, error)
GetUncleByBlockNumberAndIndex implements eth_getUncleByBlockNumberAndIndex. Returns information about an uncle given a block's number and the index of the uncle.
func (*APIImpl) GetUncleCountByBlockHash ¶
func (api *APIImpl) GetUncleCountByBlockHash(ctx context.Context, hash common.Hash) (*hexutil.Uint, error)
GetUncleCountByBlockHash implements eth_getUncleCountByBlockHash. Returns the number of uncles in the block, if any.
func (*APIImpl) GetUncleCountByBlockNumber ¶
func (api *APIImpl) GetUncleCountByBlockNumber(ctx context.Context, number rpc.BlockNumber) (*hexutil.Uint, error)
GetUncleCountByBlockNumber implements eth_getUncleCountByBlockNumber. Returns the number of uncles in the block, if any.
func (*APIImpl) GetWork ¶
GetWork returns a work package for external miner.
The work package consists of 3 strings:
result[0] - 32 bytes hex encoded current block header pow-hash result[1] - 32 bytes hex encoded seed hash used for DAG result[2] - 32 bytes hex encoded boundary condition ("target"), 2^256/difficulty result[3] - hex encoded block number
func (*APIImpl) Hashrate ¶
Hashrate implements eth_hashrate. Returns the number of hashes per second that the node is mining with.
func (*APIImpl) Logs ¶
func (api *APIImpl) Logs(ctx context.Context, crit filters.FilterCriteria) (*rpc.Subscription, error)
Logs send a notification each time a new log appears.
func (*APIImpl) MaxPriorityFeePerGas ¶
MaxPriorityFeePerGas returns a suggestion for a gas tip cap for dynamic fee transactions.
func (*APIImpl) NewBlockFilter ¶
NewBlockFilter implements eth_newBlockFilter. Creates a filter in the node, to notify when a new block arrives.
func (*APIImpl) NewFilter ¶
NewFilter implements eth_newFilter. Creates an arbitrary filter object, based on filter options, to notify when the state changes (logs).
func (*APIImpl) NewHeads ¶
NewHeads send a notification each time a new (header) block is appended to the chain.
func (*APIImpl) NewPendingTransactionFilter ¶
NewPendingTransactionFilter new transaction filter
func (*APIImpl) NewPendingTransactions ¶
func (api *APIImpl) NewPendingTransactions(ctx context.Context, fullTx *bool) (*rpc.Subscription, error)
NewPendingTransactions send a notification each time when a transaction had added into mempool.
func (*APIImpl) NewPendingTransactionsWithBody ¶
NewPendingTransactionsWithBody send a notification each time when a transaction had added into mempool.
func (*APIImpl) ProtocolVersion ¶
ProtocolVersion implements eth_protocolVersion. Returns the current ethereum protocol version.
func (*APIImpl) SendRawTransaction ¶
func (api *APIImpl) SendRawTransaction(ctx context.Context, encodedTx hexutility.Bytes) (common.Hash, error)
SendRawTransaction implements eth_sendRawTransaction. Creates new message call transaction or a contract creation for previously-signed transactions.
func (*APIImpl) SendTransaction ¶
SendTransaction implements eth_sendTransaction. Creates new message call transaction or a contract creation if the data field contains code.
func (*APIImpl) Sign ¶
func (api *APIImpl) Sign(ctx context.Context, _ common.Address, _ hexutility.Bytes) (hexutility.Bytes, error)
Sign implements eth_sign. Calculates an Ethereum specific signature with: sign(keccak256('\\x19Ethereum Signed Message:\\n' + len(message) + message))). Deprecated: This function will be removed in the future.
func (*APIImpl) SignTransaction ¶
SignTransaction deprecated
func (*APIImpl) SubmitHashrate ¶
func (api *APIImpl) SubmitHashrate(ctx context.Context, hashRate hexutil.Uint64, id libcommon.Hash) (bool, error)
SubmitHashrate can be used for remote miners to submit their hash rate. This enables the node to report the combined hash rate of all miners which submit work through this node.
It accepts the miner hash rate and an identifier which must be unique
func (*APIImpl) SubmitWork ¶
func (api *APIImpl) SubmitWork(ctx context.Context, nonce types.BlockNonce, powHash, digest libcommon.Hash) (bool, error)
SubmitWork can be used by external miner to submit their POW solution. It returns an indication if the work was accepted. Note either an invalid solution, a stale work a non-existent work will return false.
type AccountResult ¶
type AdminAPI ¶
type AdminAPI interface { // NodeInfo returns a collection of metadata known about the host. NodeInfo(ctx context.Context) (*p2p.NodeInfo, error) // Peers returns information about the connected remote nodes. // https://geth.ethereum.org/docs/rpc/ns-admin#admin_peers Peers(ctx context.Context) ([]*p2p.PeerInfo, error) // AddPeer requests connecting to a remote node. AddPeer(ctx context.Context, url string) (bool, error) }
AdminAPI the interface for the admin_* RPC commands.
type AdminAPIImpl ¶
type AdminAPIImpl struct {
// contains filtered or unexported fields
}
AdminAPIImpl data structure to store things needed for admin_* commands.
func NewAdminAPI ¶
func NewAdminAPI(eth rpchelper.ApiBackend) *AdminAPIImpl
NewAdminAPI returns AdminAPIImpl instance.
type BlockOverrides ¶
type BlockProvider ¶
func NewBackwardBlockProvider ¶
func NewBackwardBlockProvider(chunkLocator ChunkLocator, maxBlock uint64) BlockProvider
Given a ChunkLocator, moves back over the chunks and inside each chunk, moves backwards over the block numbers.
func NewForwardBlockProvider ¶
func NewForwardBlockProvider(chunkLocator ChunkLocator, minBlock uint64) BlockProvider
Given a ChunkLocator, moves forward over the chunks and inside each chunk, moves forward over the block numbers.
type BlockSigners ¶
type BorAPI ¶
type BorAPI interface { // Bor snapshot related (see ./bor_snapshot.go) GetSnapshot(number *rpc.BlockNumber) (*Snapshot, error) GetAuthor(blockNrOrHash *rpc.BlockNumberOrHash) (*common.Address, error) GetSnapshotAtHash(hash common.Hash) (*Snapshot, error) GetSigners(number *rpc.BlockNumber) ([]common.Address, error) GetSignersAtHash(hash common.Hash) ([]common.Address, error) GetCurrentProposer() (common.Address, error) GetCurrentValidators() ([]*valset.Validator, error) GetSnapshotProposer(blockNrOrHash *rpc.BlockNumberOrHash) (common.Address, error) GetSnapshotProposerSequence(blockNrOrHash *rpc.BlockNumberOrHash) (BlockSigners, error) GetRootHash(start uint64, end uint64) (string, error) }
BorAPI Bor specific routines
type BorImpl ¶
type BorImpl struct { *BaseAPI // contains filtered or unexported fields }
BorImpl is implementation of the BorAPI interface
func (*BorImpl) GetCurrentProposer ¶
GetCurrentProposer gets the current proposer
func (*BorImpl) GetCurrentValidators ¶
GetCurrentValidators gets the current validators
func (*BorImpl) GetRootHash ¶
GetRootHash returns the merkle root of the start to end block headers
func (*BorImpl) GetSigners ¶
GetSigners retrieves the list of authorized signers at the specified block.
func (*BorImpl) GetSignersAtHash ¶
GetSignersAtHash retrieves the list of authorized signers at the specified block.
func (*BorImpl) GetSnapshot ¶
func (api *BorImpl) GetSnapshot(number *rpc.BlockNumber) (*Snapshot, error)
GetSnapshot retrieves the state snapshot at a given block.
func (*BorImpl) GetSnapshotAtHash ¶
GetSnapshotAtHash retrieves the state snapshot at a given block.
func (*BorImpl) GetSnapshotProposer ¶
func (api *BorImpl) GetSnapshotProposer(blockNrOrHash *rpc.BlockNumberOrHash) (common.Address, error)
GetSnapshotProposer retrieves the in-turn signer at a given block.
func (*BorImpl) GetSnapshotProposerSequence ¶
func (api *BorImpl) GetSnapshotProposerSequence(blockNrOrHash *rpc.BlockNumberOrHash) (BlockSigners, error)
type Bundle ¶
type Bundle struct { Transactions []ethapi.CallArgs BlockOverride BlockOverrides }
type CallTraceAction ¶
type ChunkLocator ¶
type ChunkLocator func(block uint64) (chunkProvider ChunkProvider, ok bool, err error)
Bootstrap a function able to locate a series of byte chunks containing related block numbers, starting from a specific block number (greater or equal than).
type ChunkProvider ¶
Allows to iterate over a set of byte chunks.
If err is not nil, it indicates an error and the other returned values should be ignored.
If err is nil and ok is true, the returned chunk should contain the raw chunk data.
If err is nil and ok is false, it indicates that there is no more data. Subsequent calls to the same function should return (nil, false, nil).
type ContractCreatorData ¶
type CreateTraceAction ¶
type CreateTraceResult ¶
type CreateTracer ¶
type CreateTracer struct { DefaultTracer Creator common.Address Tx types.Transaction // contains filtered or unexported fields }
func NewCreateTracer ¶
func NewCreateTracer(ctx context.Context, target common.Address) *CreateTracer
func (*CreateTracer) CaptureEnter ¶
func (*CreateTracer) CaptureStart ¶
func (*CreateTracer) Found ¶
func (t *CreateTracer) Found() bool
func (*CreateTracer) SetTransaction ¶
func (t *CreateTracer) SetTransaction(tx types.Transaction)
type CreationCode ¶
type CreationCode struct {
Code *hexutility.Bytes `json:"code"`
}
type DBAPI ¶
type DBAPI interface { GetString(_ context.Context, _ string, _ string) (string, error) PutString(_ context.Context, _ string, _ string, _ string) (bool, error) GetHex(_ context.Context, _ string, _ string) (hexutility.Bytes, error) PutHex(_ context.Context, _ string, _ string, _ hexutility.Bytes) (bool, error) }
DBAPI the interface for the db_ RPC commands (deprecated)
type DBAPIImpl ¶
type DBAPIImpl struct {
// contains filtered or unexported fields
}
DBAPIImpl data structure to store things needed for db_ commands
func (*DBAPIImpl) GetHex ¶
GetHex implements db_getHex. Returns binary data from the local database. Deprecated: This function will be removed in the future.
func (*DBAPIImpl) GetString ¶
GetString implements db_getString. Returns string from the local database. Deprecated: This function will be removed in the future.
type DefaultTracer ¶
type DefaultTracer struct { }
Helper implementation of vm.Tracer; since the interface is big and most custom tracers implement just a few of the methods, this is a base struct to avoid lots of empty boilerplate code
func (*DefaultTracer) CaptureEnd ¶
func (t *DefaultTracer) CaptureEnd(output []byte, usedGas uint64, err error)
func (*DefaultTracer) CaptureEnter ¶
func (*DefaultTracer) CaptureExit ¶
func (t *DefaultTracer) CaptureExit(output []byte, usedGas uint64, err error)
func (*DefaultTracer) CaptureFault ¶
func (t *DefaultTracer) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error)
func (*DefaultTracer) CaptureStart ¶
func (*DefaultTracer) CaptureState ¶
func (t *DefaultTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error)
func (*DefaultTracer) CaptureTxEnd ¶
func (t *DefaultTracer) CaptureTxEnd(restGas uint64)
func (*DefaultTracer) CaptureTxStart ¶
func (t *DefaultTracer) CaptureTxStart(gasLimit uint64)
type ErigonAPI ¶
type ErigonAPI interface { // System related (see ./erigon_system.go) Forks(ctx context.Context) (Forks, error) BlockNumber(ctx context.Context, rpcBlockNumPtr *rpc.BlockNumber) (hexutil.Uint64, error) // Blocks related (see ./erigon_blocks.go) GetHeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error) GetHeaderByHash(_ context.Context, hash common.Hash) (*types.Header, error) GetBlockByTimestamp(ctx context.Context, timeStamp rpc.Timestamp, fullTx bool) (map[string]interface{}, error) GetBalanceChangesInBlock(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (map[common.Address]*hexutil.Big, error) // Receipt related (see ./erigon_receipts.go) GetLogsByHash(ctx context.Context, hash common.Hash) ([][]*types.Log, error) //GetLogsByNumber(ctx context.Context, number rpc.BlockNumber) ([][]*types.Log, error) GetLogs(ctx context.Context, crit filters.FilterCriteria) (types.ErigonLogs, error) GetLatestLogs(ctx context.Context, crit filters.FilterCriteria, logOptions filters.LogFilterOptions) (types.ErigonLogs, error) // Gets cannonical block receipt through hash. If the block is not cannonical returns error GetBlockReceiptsByBlockHash(ctx context.Context, cannonicalBlockHash common.Hash) ([]map[string]interface{}, error) // NodeInfo returns a collection of metadata known about the host. NodeInfo(ctx context.Context) ([]p2p.NodeInfo, error) }
ErigonAPI Erigon specific routines
type ErigonImpl ¶
type ErigonImpl struct { *BaseAPI // contains filtered or unexported fields }
ErigonImpl is implementation of the ErigonAPI interface
func NewErigonAPI ¶
func NewErigonAPI(base *BaseAPI, db kv.RoDB, eth rpchelper.ApiBackend) *ErigonImpl
NewErigonAPI returns ErigonImpl instance
func (*ErigonImpl) BlockNumber ¶
func (api *ErigonImpl) BlockNumber(ctx context.Context, rpcBlockNumPtr *rpc.BlockNumber) (hexutil.Uint64, error)
Post the merge eth_blockNumber will return latest forkChoiceHead block number erigon_blockNumber will return latest executed block number or any block number requested
func (*ErigonImpl) CacheCheck ¶
func (api *ErigonImpl) CacheCheck() (*kvcache.CacheValidationResult, error)
func (*ErigonImpl) Forks ¶
func (api *ErigonImpl) Forks(ctx context.Context) (Forks, error)
Forks implements erigon_forks. Returns the genesis block hash and a sorted list of all forks block numbers
func (*ErigonImpl) GetBalanceChangesInBlock ¶
func (api *ErigonImpl) GetBalanceChangesInBlock(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (map[common.Address]*hexutil.Big, error)
func (*ErigonImpl) GetBlockByTimestamp ¶
func (*ErigonImpl) GetBlockReceiptsByBlockHash ¶
func (*ErigonImpl) GetHeaderByHash ¶
func (api *ErigonImpl) GetHeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error)
GetHeaderByHash implements erigon_getHeaderByHash. Returns a block's header given a block's hash.
func (*ErigonImpl) GetHeaderByNumber ¶
func (api *ErigonImpl) GetHeaderByNumber(ctx context.Context, blockNumber rpc.BlockNumber) (*types.Header, error)
GetHeaderByNumber implements erigon_getHeaderByNumber. Returns a block's header given a block number ignoring the block's transaction and uncle list (may be faster).
func (*ErigonImpl) GetLatestLogs ¶
func (api *ErigonImpl) GetLatestLogs(ctx context.Context, crit filters.FilterCriteria, logOptions filters.LogFilterOptions) (types.ErigonLogs, error)
GetLatestLogs implements erigon_getLatestLogs. Return specific number of logs or block matching a give filter objects by descend. IgnoreTopicsOrder option provide a way to match the logs with addresses and topics without caring about the topics' orders When IgnoreTopicsOrde option is true, once the logs have a topic that matched, it will be returned no matter what topic position it is in.
blockCount parameter is for better pagination. `crit` filter is the same filter.
Examples: {} or nil matches any topics list {{A}} matches topic A in any positions. Logs with {{B}, {A}} will be matched
func (*ErigonImpl) GetLogs ¶
func (api *ErigonImpl) GetLogs(ctx context.Context, crit filters.FilterCriteria) (types.ErigonLogs, error)
GetLogs implements erigon_getLogs. Returns an array of logs matching a given filter object.
func (*ErigonImpl) GetLogsByHash ¶
GetLogsByHash implements erigon_getLogsByHash. Returns an array of arrays of logs generated by the transactions in the block given by the block's hash.
type EthAPI ¶
type EthAPI interface { // Block related (proposed file: ./eth_blocks.go) GetBlockByNumber(ctx context.Context, number rpc.BlockNumber, fullTx bool) (map[string]interface{}, error) GetBlockByHash(ctx context.Context, hash rpc.BlockNumberOrHash, fullTx bool) (map[string]interface{}, error) GetBlockTransactionCountByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*hexutil.Uint, error) GetBlockTransactionCountByHash(ctx context.Context, blockHash common.Hash) (*hexutil.Uint, error) // Transaction related (see ./eth_txs.go) GetTransactionByHash(ctx context.Context, hash common.Hash) (*RPCTransaction, error) GetTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, txIndex hexutil.Uint64) (*RPCTransaction, error) GetTransactionByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, txIndex hexutil.Uint) (*RPCTransaction, error) GetRawTransactionByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, index hexutil.Uint) (hexutility.Bytes, error) GetRawTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, index hexutil.Uint) (hexutility.Bytes, error) GetRawTransactionByHash(ctx context.Context, hash common.Hash) (hexutility.Bytes, error) // Receipt related (see ./eth_receipts.go) GetTransactionReceipt(ctx context.Context, hash common.Hash) (map[string]interface{}, error) GetLogs(ctx context.Context, crit ethFilters.FilterCriteria) (types.Logs, error) GetBlockReceipts(ctx context.Context, numberOrHash rpc.BlockNumberOrHash) ([]map[string]interface{}, error) // Uncle related (see ./eth_uncles.go) GetUncleByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, index hexutil.Uint) (map[string]interface{}, error) GetUncleByBlockHashAndIndex(ctx context.Context, hash common.Hash, index hexutil.Uint) (map[string]interface{}, error) GetUncleCountByBlockNumber(ctx context.Context, number rpc.BlockNumber) (*hexutil.Uint, error) GetUncleCountByBlockHash(ctx context.Context, hash common.Hash) (*hexutil.Uint, error) // Filter related (see ./eth_filters.go) NewPendingTransactionFilter(_ context.Context) (string, error) NewBlockFilter(_ context.Context) (string, error) NewFilter(_ context.Context, crit ethFilters.FilterCriteria) (string, error) UninstallFilter(_ context.Context, index string) (bool, error) GetFilterChanges(_ context.Context, index string) ([]any, error) GetFilterLogs(_ context.Context, index string) ([]*types.Log, error) // Account related (see ./eth_accounts.go) Accounts(ctx context.Context) ([]common.Address, error) GetBalance(ctx context.Context, address common.Address, blockNrOrHash rpc.BlockNumberOrHash) (*hexutil.Big, error) GetTransactionCount(ctx context.Context, address common.Address, blockNrOrHash rpc.BlockNumberOrHash) (*hexutil.Uint64, error) GetStorageAt(ctx context.Context, address common.Address, index string, blockNrOrHash rpc.BlockNumberOrHash) (string, error) GetCode(ctx context.Context, address common.Address, blockNrOrHash rpc.BlockNumberOrHash) (hexutility.Bytes, error) // System related (see ./eth_system.go) BlockNumber(ctx context.Context) (hexutil.Uint64, error) Syncing(ctx context.Context) (interface{}, error) ChainId(ctx context.Context) (hexutil.Uint64, error) /* called eth_protocolVersion elsewhere */ ProtocolVersion(_ context.Context) (hexutil.Uint, error) GasPrice(_ context.Context) (*hexutil.Big, error) // Sending related (see ./eth_call.go) Call(ctx context.Context, args ethapi2.CallArgs, blockNrOrHash rpc.BlockNumberOrHash, overrides *ethapi2.StateOverrides) (hexutility.Bytes, error) EstimateGas(ctx context.Context, argsOrNil *ethapi2.CallArgs, blockNrOrHash *rpc.BlockNumberOrHash, overrides *ethapi2.StateOverrides) (hexutil.Uint64, error) SendRawTransaction(ctx context.Context, encodedTx hexutility.Bytes) (common.Hash, error) SendTransaction(_ context.Context, txObject interface{}) (common.Hash, error) Sign(ctx context.Context, _ common.Address, _ hexutility.Bytes) (hexutility.Bytes, error) SignTransaction(_ context.Context, txObject interface{}) (common.Hash, error) GetProof(ctx context.Context, address common.Address, storageKeys []common.Hash, blockNr rpc.BlockNumberOrHash) (*accounts.AccProofResult, error) CreateAccessList(ctx context.Context, args ethapi2.CallArgs, blockNrOrHash *rpc.BlockNumberOrHash, optimizeGas *bool) (*accessListResult, error) // Mining related (see ./eth_mining.go) Coinbase(ctx context.Context) (common.Address, error) Hashrate(ctx context.Context) (uint64, error) Mining(ctx context.Context) (bool, error) GetWork(ctx context.Context) ([4]string, error) SubmitWork(ctx context.Context, nonce types.BlockNonce, powHash, digest common.Hash) (bool, error) SubmitHashrate(ctx context.Context, hashRate hexutil.Uint64, id common.Hash) (bool, error) }
EthAPI is a collection of functions that are exposed in the
type Forks ¶
type Forks struct { GenesisHash common.Hash `json:"genesis"` HeightForks []uint64 `json:"heightForks"` TimeForks []uint64 `json:"timeForks"` }
Forks is a data type to record a list of forks passed by this node
type GasPriceCache ¶
type GasPriceCache struct {
// contains filtered or unexported fields
}
func NewGasPriceCache ¶
func NewGasPriceCache() *GasPriceCache
type GasPriceOracleBackend ¶
type GasPriceOracleBackend struct {
// contains filtered or unexported fields
}
func NewGasPriceOracleBackend ¶
func NewGasPriceOracleBackend(tx kv.Tx, baseApi *BaseAPI) *GasPriceOracleBackend
func (*GasPriceOracleBackend) BlockByNumber ¶
func (b *GasPriceOracleBackend) BlockByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Block, error)
func (*GasPriceOracleBackend) ChainConfig ¶
func (b *GasPriceOracleBackend) ChainConfig() *chain.Config
func (*GasPriceOracleBackend) GetReceipts ¶
func (*GasPriceOracleBackend) HeaderByNumber ¶
func (b *GasPriceOracleBackend) HeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error)
func (*GasPriceOracleBackend) PendingBlockAndReceipts ¶
func (b *GasPriceOracleBackend) PendingBlockAndReceipts() (*types.Block, types.Receipts)
type GenericTracer ¶
type GenericTracer interface { vm.EVMLogger SetTransaction(tx types.Transaction) Found() bool }
type GethTrace ¶
type GethTrace struct { Type string `json:"type"` Error string `json:"error"` From string `json:"from"` To string `json:"to"` Value string `json:"value"` Gas string `json:"gas"` GasUsed string `json:"gasUsed"` Input string `json:"input"` Output string `json:"output"` Time string `json:"time"` Calls GethTraces `json:"calls"` }
GethTrace The trace as received from the existing Geth javascript tracer 'callTracer'
type GraphQLAPI ¶
type GraphQLAPIImpl ¶
type GraphQLAPIImpl struct { *BaseAPI // contains filtered or unexported fields }
func NewGraphQLAPI ¶
func NewGraphQLAPI(base *BaseAPI, db kv.RoDB) *GraphQLAPIImpl
func (*GraphQLAPIImpl) GetBlockDetails ¶
func (api *GraphQLAPIImpl) GetBlockDetails(ctx context.Context, blockNumber rpc.BlockNumber) (map[string]interface{}, error)
func (*GraphQLAPIImpl) GetChainID ¶
type InternalOperation ¶
type MapTxNum2BlockNumIter ¶
type MapTxNum2BlockNumIter struct {
// contains filtered or unexported fields
}
MapTxNum2BlockNumIter - enrich iterator by TxNumbers, adding more info:
- blockNum
- txIndex in block: -1 means first system tx
- isFinalTxn: last system-txn. BlockRewards and similar things - are attribute to this virtual txn.
- blockNumChanged: means this and previous txNum belongs to different blockNumbers
Expect: `it` to return sorted txNums, then blockNum will not change until `it.Next() < maxTxNumInBlock`
it allow certain optimizations.
func MapDescendTxNum2BlockNum ¶
func MapDescendTxNum2BlockNum(tx kv.Tx, txNumsReader rawdbv3.TxNumsReader, it stream.U64) *MapTxNum2BlockNumIter
func MapTxNum2BlockNum ¶
func MapTxNum2BlockNum(tx kv.Tx, txNumsReader rawdbv3.TxNumsReader, it stream.U64) *MapTxNum2BlockNumIter
func (*MapTxNum2BlockNumIter) HasNext ¶
func (i *MapTxNum2BlockNumIter) HasNext() bool
type NetAPI ¶
type NetAPI interface { Listening(_ context.Context) (bool, error) Version(_ context.Context) (string, error) PeerCount(_ context.Context) (hexutil.Uint, error) }
NetAPI the interface for the net_ RPC commands
type NetAPIImpl ¶
type NetAPIImpl struct {
// contains filtered or unexported fields
}
NetAPIImpl data structure to store things needed for net_ commands
func NewNetAPIImpl ¶
func NewNetAPIImpl(eth rpchelper.ApiBackend) *NetAPIImpl
NewNetAPIImpl returns NetAPIImplImpl instance
func (*NetAPIImpl) Listening ¶
func (api *NetAPIImpl) Listening(_ context.Context) (bool, error)
Listening implements net_listening. Returns true if client is actively listening for network connections. TODO: Remove hard coded value
type OeTracer ¶
type OeTracer struct {
// contains filtered or unexported fields
}
OeTracer is an OpenEthereum-style tracer
func (*OeTracer) CaptureEnd ¶
func (*OeTracer) CaptureEnter ¶
func (*OeTracer) CaptureExit ¶
func (*OeTracer) CaptureFault ¶
func (*OeTracer) CaptureStart ¶
func (*OeTracer) CaptureState ¶
func (*OeTracer) CaptureTxEnd ¶
func (*OeTracer) CaptureTxStart ¶
type OeTracerConfig ¶
type OeTracerConfig struct {
IncludePrecompiles bool `json:"includePrecompiles"` // by default Parity/OpenEthereum format does not include precompiles
}
type OperationType ¶
type OperationType int
const ( OP_TRANSFER OperationType = 0 OP_SELF_DESTRUCT OperationType = 1 OP_CREATE OperationType = 2 OP_CREATE2 OperationType = 3 )
type OperationsTracer ¶
type OperationsTracer struct { DefaultTracer Results []*InternalOperation // contains filtered or unexported fields }
func NewOperationsTracer ¶
func NewOperationsTracer(ctx context.Context) *OperationsTracer
type OtterscanAPI ¶
type OtterscanAPI interface { GetApiLevel() uint8 GetInternalOperations(ctx context.Context, hash common.Hash) ([]*InternalOperation, error) SearchTransactionsBefore(ctx context.Context, addr common.Address, blockNum uint64, pageSize uint16) (*TransactionsWithReceipts, error) SearchTransactionsAfter(ctx context.Context, addr common.Address, blockNum uint64, pageSize uint16) (*TransactionsWithReceipts, error) GetBlockDetails(ctx context.Context, number rpc.BlockNumber) (map[string]interface{}, error) GetBlockDetailsByHash(ctx context.Context, hash common.Hash) (map[string]interface{}, error) GetBlockTransactions(ctx context.Context, number rpc.BlockNumber, pageNumber uint8, pageSize uint8) (map[string]interface{}, error) HasCode(ctx context.Context, address common.Address, blockNrOrHash rpc.BlockNumberOrHash) (bool, error) TraceTransaction(ctx context.Context, hash common.Hash) ([]*TraceEntry, error) GetTransactionError(ctx context.Context, hash common.Hash) (hexutility.Bytes, error) GetTransactionBySenderAndNonce(ctx context.Context, addr common.Address, nonce uint64) (*common.Hash, error) GetContractCreator(ctx context.Context, addr common.Address) (*ContractCreatorData, error) }
type OtterscanAPIImpl ¶
type OtterscanAPIImpl struct { *BaseAPI // contains filtered or unexported fields }
func NewOtterscanAPI ¶
func NewOtterscanAPI(base *BaseAPI, db kv.RoDB, maxPageSize uint64) *OtterscanAPIImpl
func (*OtterscanAPIImpl) GetApiLevel ¶
func (api *OtterscanAPIImpl) GetApiLevel() uint8
func (*OtterscanAPIImpl) GetBlockDetails ¶
func (api *OtterscanAPIImpl) GetBlockDetails(ctx context.Context, number rpc.BlockNumber) (map[string]interface{}, error)
func (*OtterscanAPIImpl) GetBlockDetailsByHash ¶
func (*OtterscanAPIImpl) GetBlockTransactions ¶
func (api *OtterscanAPIImpl) GetBlockTransactions(ctx context.Context, number rpc.BlockNumber, pageNumber uint8, pageSize uint8) (map[string]interface{}, error)
func (*OtterscanAPIImpl) GetContractCreator ¶
func (api *OtterscanAPIImpl) GetContractCreator(ctx context.Context, addr common.Address) (*ContractCreatorData, error)
func (*OtterscanAPIImpl) GetInternalOperations ¶
func (api *OtterscanAPIImpl) GetInternalOperations(ctx context.Context, hash common.Hash) ([]*InternalOperation, error)
func (*OtterscanAPIImpl) GetTransactionBySenderAndNonce ¶
func (*OtterscanAPIImpl) GetTransactionError ¶
func (api *OtterscanAPIImpl) GetTransactionError(ctx context.Context, hash common.Hash) (hexutility.Bytes, error)
func (*OtterscanAPIImpl) HasCode ¶
func (api *OtterscanAPIImpl) HasCode(ctx context.Context, address common.Address, blockNrOrHash rpc.BlockNumberOrHash) (bool, error)
func (*OtterscanAPIImpl) SearchTransactionsAfter ¶
func (api *OtterscanAPIImpl) SearchTransactionsAfter(ctx context.Context, addr common.Address, blockNum uint64, pageSize uint16) (*TransactionsWithReceipts, error)
Search transactions that touch a certain address.
It searches forward a certain block (excluding); the results are sorted descending.
The pageSize indicates how many txs may be returned. If there are less txs than pageSize, they are just returned. But it may return a little more than pageSize if there are more txs than the necessary to fill pageSize in the last found block, i.e., let's say you want pageSize == 25, you already found 24 txs, the next block contains 4 matches, then this function will return 28 txs.
func (*OtterscanAPIImpl) SearchTransactionsBefore ¶
func (api *OtterscanAPIImpl) SearchTransactionsBefore(ctx context.Context, addr common.Address, blockNum uint64, pageSize uint16) (*TransactionsWithReceipts, error)
Search transactions that touch a certain address.
It searches back a certain block (excluding); the results are sorted descending.
The pageSize indicates how many txs may be returned. If there are less txs than pageSize, they are just returned. But it may return a little more than pageSize if there are more txs than the necessary to fill pageSize in the last found block, i.e., let's say you want pageSize == 25, you already found 24 txs, the next block contains 4 matches, then this function will return 28 txs.
func (*OtterscanAPIImpl) TraceTransaction ¶
func (api *OtterscanAPIImpl) TraceTransaction(ctx context.Context, hash common.Hash) ([]*TraceEntry, error)
type OverlayAPI ¶
type OverlayAPI interface { GetLogs(ctx context.Context, crit filters.FilterCriteria, stateOverride *ethapi.StateOverrides) ([]*types.Log, error) CallConstructor(ctx context.Context, address common.Address, code *hexutility.Bytes) (*CreationCode, error) }
type OverlayAPIImpl ¶
type OverlayAPIImpl struct { *BaseAPI GasCap uint64 OverlayGetLogsTimeout time.Duration OverlayReplayBlockTimeout time.Duration OtsAPI OtterscanAPI // contains filtered or unexported fields }
OverlayAPIImpl is implementation of the OverlayAPIImpl interface based on remote Db access
func NewOverlayAPI ¶
func NewOverlayAPI(base *BaseAPI, db kv.RoDB, gascap uint64, overlayGetLogsTimeout time.Duration, overlayReplayBlockTimeout time.Duration, otsApi OtterscanAPI) *OverlayAPIImpl
NewOverlayAPI returns OverlayAPIImpl instance
func (*OverlayAPIImpl) CallConstructor ¶
func (api *OverlayAPIImpl) CallConstructor(ctx context.Context, address common.Address, code *hexutility.Bytes) (*CreationCode, error)
func (*OverlayAPIImpl) GetLogs ¶
func (api *OverlayAPIImpl) GetLogs(ctx context.Context, crit filters.FilterCriteria, stateOverride *ethapi.StateOverrides) ([]*types.Log, error)
type OverlayCreateTracer ¶
type OverlayCreateTracer struct {
// contains filtered or unexported fields
}
func (*OverlayCreateTracer) CaptureEnd ¶
func (ct *OverlayCreateTracer) CaptureEnd(output []byte, usedGas uint64, err error)
func (*OverlayCreateTracer) CaptureEnter ¶
func (ct *OverlayCreateTracer) CaptureEnter(typ vm.OpCode, from libcommon.Address, to libcommon.Address, precompile bool, create bool, input []byte, gas uint64, value *uint256.Int, code []byte)
Rest of the frames
func (*OverlayCreateTracer) CaptureExit ¶
func (ct *OverlayCreateTracer) CaptureExit(output []byte, usedGas uint64, err error)
func (*OverlayCreateTracer) CaptureFault ¶
func (ct *OverlayCreateTracer) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error)
func (*OverlayCreateTracer) CaptureStart ¶
func (ct *OverlayCreateTracer) CaptureStart(env *vm.EVM, from libcommon.Address, to libcommon.Address, precompile bool, create bool, input []byte, gas uint64, value *uint256.Int, code []byte)
Top call frame
func (*OverlayCreateTracer) CaptureState ¶
func (ct *OverlayCreateTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error)
Opcode level
func (*OverlayCreateTracer) CaptureTxEnd ¶
func (ct *OverlayCreateTracer) CaptureTxEnd(restGas uint64)
func (*OverlayCreateTracer) CaptureTxStart ¶
func (ct *OverlayCreateTracer) CaptureTxStart(gasLimit uint64)
Transaction level
type ParityAPI ¶
type ParityAPI interface {
ListStorageKeys(ctx context.Context, account libcommon.Address, quantity int, offset *hexutility.Bytes, blockNumber rpc.BlockNumberOrHash) ([]hexutility.Bytes, error)
}
ParityAPI the interface for the parity_ RPC commands
type ParityAPIImpl ¶
type ParityAPIImpl struct { *BaseAPI // contains filtered or unexported fields }
ParityAPIImpl data structure to store things needed for parity_ commands
func NewParityAPIImpl ¶
func NewParityAPIImpl(base *BaseAPI, db kv.RoDB) *ParityAPIImpl
NewParityAPIImpl returns ParityAPIImpl instance
func (*ParityAPIImpl) ListStorageKeys ¶
func (api *ParityAPIImpl) ListStorageKeys(ctx context.Context, account libcommon.Address, quantity int, offset *hexutility.Bytes, blockNumberOrTag rpc.BlockNumberOrHash) ([]hexutility.Bytes, error)
ListStorageKeys implements parity_listStorageKeys. Returns all storage keys of the given address
type ParityTrace ¶
type ParityTrace struct { // Do not change the ordering of these fields -- allows for easier comparison with other clients Action interface{} `json:"action"` // Can be either CallTraceAction or CreateTraceAction BlockHash *common.Hash `json:"blockHash,omitempty"` BlockNumber *uint64 `json:"blockNumber,omitempty"` Error string `json:"error,omitempty"` Result interface{} `json:"result"` Subtraces int `json:"subtraces"` TraceAddress []int `json:"traceAddress"` TransactionHash *common.Hash `json:"transactionHash,omitempty"` TransactionPosition *uint64 `json:"transactionPosition,omitempty"` Type string `json:"type"` }
ParityTrace A trace in the desired format (Parity/OpenEthereum) See: https://openethereum.github.io/wiki/JSONRPC-trace-module
func (ParityTrace) String ¶
func (t ParityTrace) String() string
Allows for easy printing of a parity trace for debugging
type PrivateDebugAPI ¶
type PrivateDebugAPI interface { StorageRangeAt(ctx context.Context, blockHash common.Hash, txIndex uint64, contractAddress common.Address, keyStart hexutility.Bytes, maxResult int) (StorageRangeResult, error) TraceTransaction(ctx context.Context, hash common.Hash, config *tracersConfig.TraceConfig, stream *jsoniter.Stream) error TraceBlockByHash(ctx context.Context, hash common.Hash, config *tracersConfig.TraceConfig, stream *jsoniter.Stream) error TraceBlockByNumber(ctx context.Context, number rpc.BlockNumber, config *tracersConfig.TraceConfig, stream *jsoniter.Stream) error AccountRange(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash, start []byte, maxResults int, nocode, nostorage bool) (state.IteratorDump, error) GetModifiedAccountsByNumber(ctx context.Context, startNum rpc.BlockNumber, endNum *rpc.BlockNumber) ([]common.Address, error) GetModifiedAccountsByHash(ctx context.Context, startHash common.Hash, endHash *common.Hash) ([]common.Address, error) TraceCall(ctx context.Context, args ethapi.CallArgs, blockNrOrHash rpc.BlockNumberOrHash, config *tracersConfig.TraceConfig, stream *jsoniter.Stream) error AccountAt(ctx context.Context, blockHash common.Hash, txIndex uint64, account common.Address) (*AccountResult, error) GetRawHeader(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (hexutility.Bytes, error) GetRawBlock(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (hexutility.Bytes, error) }
PrivateDebugAPI Exposed RPC endpoints for debugging use
type PrivateDebugAPIImpl ¶
type PrivateDebugAPIImpl struct { *BaseAPI GasCap uint64 // contains filtered or unexported fields }
PrivateDebugAPIImpl is implementation of the PrivateDebugAPI interface based on remote Db access
func NewPrivateDebugAPI ¶
func NewPrivateDebugAPI(base *BaseAPI, db kv.RoDB, gascap uint64) *PrivateDebugAPIImpl
NewPrivateDebugAPI returns PrivateDebugAPIImpl instance
func (*PrivateDebugAPIImpl) AccountAt ¶
func (api *PrivateDebugAPIImpl) AccountAt(ctx context.Context, blockHash common.Hash, txIndex uint64, address common.Address) (*AccountResult, error)
func (*PrivateDebugAPIImpl) AccountRange ¶
func (api *PrivateDebugAPIImpl) AccountRange(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash, startKey []byte, maxResults int, excludeCode, excludeStorage bool) (state.IteratorDump, error)
AccountRange implements debug_accountRange. Returns a range of accounts involved in the given block rangeb
func (*PrivateDebugAPIImpl) GetModifiedAccountsByHash ¶
func (api *PrivateDebugAPIImpl) GetModifiedAccountsByHash(ctx context.Context, startHash common.Hash, endHash *common.Hash) ([]common.Address, error)
GetModifiedAccountsByHash implements debug_getModifiedAccountsByHash. Returns a list of accounts modified in the given block.
func (*PrivateDebugAPIImpl) GetModifiedAccountsByNumber ¶
func (api *PrivateDebugAPIImpl) GetModifiedAccountsByNumber(ctx context.Context, startNumber rpc.BlockNumber, endNumber *rpc.BlockNumber) ([]common.Address, error)
GetModifiedAccountsByNumber implements debug_getModifiedAccountsByNumber. Returns a list of accounts modified in the given block. [from, to)
func (*PrivateDebugAPIImpl) GetRawBlock ¶
func (api *PrivateDebugAPIImpl) GetRawBlock(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (hexutility.Bytes, error)
func (*PrivateDebugAPIImpl) GetRawHeader ¶
func (api *PrivateDebugAPIImpl) GetRawHeader(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (hexutility.Bytes, error)
func (*PrivateDebugAPIImpl) StorageRangeAt ¶
func (api *PrivateDebugAPIImpl) StorageRangeAt(ctx context.Context, blockHash common.Hash, txIndex uint64, contractAddress common.Address, keyStart hexutility.Bytes, maxResult int) (StorageRangeResult, error)
storageRangeAt implements debug_storageRangeAt. Returns information about a range of storage locations (if any) for the given address.
func (*PrivateDebugAPIImpl) TraceBlockByHash ¶
func (api *PrivateDebugAPIImpl) TraceBlockByHash(ctx context.Context, hash common.Hash, config *tracersConfig.TraceConfig, stream *jsoniter.Stream) error
TraceBlockByHash implements debug_traceBlockByHash. Returns Geth style block traces.
func (*PrivateDebugAPIImpl) TraceBlockByNumber ¶
func (api *PrivateDebugAPIImpl) TraceBlockByNumber(ctx context.Context, blockNum rpc.BlockNumber, config *tracersConfig.TraceConfig, stream *jsoniter.Stream) error
TraceBlockByNumber implements debug_traceBlockByNumber. Returns Geth style block traces.
func (*PrivateDebugAPIImpl) TraceCall ¶
func (api *PrivateDebugAPIImpl) TraceCall(ctx context.Context, args ethapi.CallArgs, blockNrOrHash rpc.BlockNumberOrHash, config *tracersConfig.TraceConfig, stream *jsoniter.Stream) error
TraceCall implements debug_traceCall. Returns Geth style call traces.
func (*PrivateDebugAPIImpl) TraceCallMany ¶
func (api *PrivateDebugAPIImpl) TraceCallMany(ctx context.Context, bundles []Bundle, simulateContext StateContext, config *tracersConfig.TraceConfig, stream *jsoniter.Stream) error
func (*PrivateDebugAPIImpl) TraceTransaction ¶
func (api *PrivateDebugAPIImpl) TraceTransaction(ctx context.Context, hash common.Hash, config *tracersConfig.TraceConfig, stream *jsoniter.Stream) error
TraceTransaction implements debug_traceTransaction. Returns Geth style transaction traces.
type RPCTransaction ¶
type RPCTransaction 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,omitempty"` Tip *hexutil.Big `json:"maxPriorityFeePerGas,omitempty"` FeeCap *hexutil.Big `json:"maxFeePerGas,omitempty"` Hash common.Hash `json:"hash"` Input hexutility.Bytes `json:"input"` Nonce hexutil.Uint64 `json:"nonce"` To *common.Address `json:"to"` TransactionIndex *hexutil.Uint64 `json:"transactionIndex"` Value *hexutil.Big `json:"value"` Type hexutil.Uint64 `json:"type"` Accesses *types2.AccessList `json:"accessList,omitempty"` ChainID *hexutil.Big `json:"chainId,omitempty"` MaxFeePerBlobGas *hexutil.Big `json:"maxFeePerBlobGas,omitempty"` BlobVersionedHashes []common.Hash `json:"blobVersionedHashes,omitempty"` Authorizations *[]types.JsonAuthorization `json:"authorizationList,omitempty"` V *hexutil.Big `json:"v"` YParity *hexutil.Big `json:"yParity,omitempty"` R *hexutil.Big `json:"r"` S *hexutil.Big `json:"s"` }
RPCTransaction represents a transaction that will serialize to the RPC representation of a transaction
func NewRPCTransaction ¶
func NewRPCTransaction(txn types.Transaction, blockHash common.Hash, blockNumber uint64, index uint64, baseFee *big.Int) *RPCTransaction
NewRPCTransaction returns a transaction that will serialize to the RPC representation, with the given location metadata set (if available).
type RewardTraceAction ¶
type Snapshot ¶
type Snapshot struct { Number uint64 `json:"number"` // Block number where the snapshot was created Hash common.Hash `json:"hash"` // Block hash where the snapshot was created ValidatorSet *ValidatorSet `json:"validatorSet"` // Validator set at this moment // contains filtered or unexported fields }
type StateContext ¶
type StateContext struct { BlockNumber rpc.BlockNumberOrHash TransactionIndex *int }
type StateDiff ¶
type StateDiff struct {
// contains filtered or unexported fields
}
Implements core/state/StateWriter to provide state diffs
func (*StateDiff) CompareStates ¶
func (sd *StateDiff) CompareStates(initialIbs, ibs *state.IntraBlockState)
CompareStates uses the addresses accumulated in the sdMap and compares balances, nonces, and codes of the accounts, and fills the rest of the sdMap
func (*StateDiff) CreateContract ¶
func (*StateDiff) DeleteAccount ¶
func (*StateDiff) UpdateAccountCode ¶
func (*StateDiff) UpdateAccountData ¶
type StateDiffAccount ¶
type StateDiffAccount struct { Balance interface{} `json:"balance"` // Can be either string "=" or mapping "*" => {"from": "hex", "to": "hex"} Code interface{} `json:"code"` Nonce interface{} `json:"nonce"` Storage map[libcommon.Hash]map[string]interface{} `json:"storage"` }
StateDiffAccount is the part of `trace_call` response that is under "stateDiff" tag
type StateDiffBalance ¶
type StateDiffCode ¶
type StateDiffCode struct { From hexutility.Bytes `json:"from"` To hexutility.Bytes `json:"to"` }
type StateDiffNonce ¶
type StateDiffStorage ¶
type StorageEntry ¶
StorageEntry an entry in storage of the account
type StorageRangeResult ¶
type StorageRangeResult struct { Storage storageMap `json:"storage"` NextKey *libcommon.Hash `json:"nextKey"` // nil if Storage includes the last key in the trie. }
StorageRangeResult is the result of a debug_storageRangeAt API call.
type SuicideTraceAction ¶
type TouchTracer ¶
type TouchTracer struct { DefaultTracer Found bool // contains filtered or unexported fields }
func NewTouchTracer ¶
func NewTouchTracer(searchAddr common.Address) *TouchTracer
func (*TouchTracer) CaptureEnter ¶
type TraceAPI ¶
type TraceAPI interface { ReplayBlockTransactions(ctx context.Context, blockNr rpc.BlockNumberOrHash, traceTypes []string, gasBailOut *bool, traceConfig *config.TraceConfig) ([]*TraceCallResult, error) ReplayTransaction(ctx context.Context, txHash libcommon.Hash, traceTypes []string, gasBailOut *bool, traceConfig *config.TraceConfig) (*TraceCallResult, error) Call(ctx context.Context, call TraceCallParam, types []string, blockNr *rpc.BlockNumberOrHash, traceConfig *config.TraceConfig) (*TraceCallResult, error) CallMany(ctx context.Context, calls json.RawMessage, blockNr *rpc.BlockNumberOrHash, traceConfig *config.TraceConfig) ([]*TraceCallResult, error) RawTransaction(ctx context.Context, txHash libcommon.Hash, traceTypes []string) ([]interface{}, error) Transaction(ctx context.Context, txHash libcommon.Hash, gasBailOut *bool, traceConfig *config.TraceConfig) (ParityTraces, error) Get(ctx context.Context, txHash libcommon.Hash, txIndicies []hexutil.Uint64, gasBailOut *bool, traceConfig *config.TraceConfig) (*ParityTrace, error) Block(ctx context.Context, blockNr rpc.BlockNumber, gasBailOut *bool, traceConfig *config.TraceConfig) (ParityTraces, error) Filter(ctx context.Context, req TraceFilterRequest, gasBailOut *bool, traceConfig *config.TraceConfig, stream *jsoniter.Stream) error }
TraceAPI RPC interface into tracing API
type TraceAPIImpl ¶
type TraceAPIImpl struct { *BaseAPI // contains filtered or unexported fields }
TraceAPIImpl is implementation of the TraceAPI interface based on remote Db access
func NewTraceAPI ¶
NewTraceAPI returns NewTraceAPI instance
func (*TraceAPIImpl) Block ¶
func (api *TraceAPIImpl) Block(ctx context.Context, blockNr rpc.BlockNumber, gasBailOut *bool, traceConfig *config.TraceConfig) (ParityTraces, error)
Block implements trace_block
func (*TraceAPIImpl) Call ¶
func (api *TraceAPIImpl) Call(ctx context.Context, args TraceCallParam, traceTypes []string, blockNrOrHash *rpc.BlockNumberOrHash, traceConfig *config.TraceConfig) (*TraceCallResult, error)
Call implements trace_call.
func (*TraceAPIImpl) CallMany ¶
func (api *TraceAPIImpl) CallMany(ctx context.Context, calls json.RawMessage, parentNrOrHash *rpc.BlockNumberOrHash, traceConfig *config.TraceConfig) ([]*TraceCallResult, error)
CallMany implements trace_callMany.
func (*TraceAPIImpl) Filter ¶
func (api *TraceAPIImpl) Filter(ctx context.Context, req TraceFilterRequest, gasBailOut *bool, traceConfig *config.TraceConfig, stream *jsoniter.Stream) error
Filter implements trace_filter NOTE: We do not store full traces - we just store index for each address Pull blocks which have txs with matching address
func (*TraceAPIImpl) Get ¶
func (api *TraceAPIImpl) Get(ctx context.Context, txHash common.Hash, indicies []hexutil.Uint64, gasBailOut *bool, traceConfig *config.TraceConfig) (*ParityTrace, error)
Get implements trace_get
func (*TraceAPIImpl) RawTransaction ¶
func (api *TraceAPIImpl) RawTransaction(ctx context.Context, txHash libcommon.Hash, traceTypes []string) ([]interface{}, error)
RawTransaction implements trace_rawTransaction.
func (*TraceAPIImpl) ReplayBlockTransactions ¶
func (api *TraceAPIImpl) ReplayBlockTransactions(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash, traceTypes []string, gasBailOut *bool, traceConfig *config.TraceConfig) ([]*TraceCallResult, error)
func (*TraceAPIImpl) ReplayTransaction ¶
func (api *TraceAPIImpl) ReplayTransaction(ctx context.Context, txHash libcommon.Hash, traceTypes []string, gasBailOut *bool, traceConfig *config.TraceConfig) (*TraceCallResult, error)
func (*TraceAPIImpl) Transaction ¶
func (api *TraceAPIImpl) Transaction(ctx context.Context, txHash common.Hash, gasBailOut *bool, traceConfig *config.TraceConfig) (ParityTraces, error)
Transaction implements trace_transaction
type TraceAction ¶
type TraceAction struct { // Do not change the ordering of these fields -- allows for easier comparison with other clients Author string `json:"author,omitempty"` RewardType string `json:"rewardType,omitempty"` SelfDestructed string `json:"address,omitempty"` Balance string `json:"balance,omitempty"` CallType string `json:"callType,omitempty"` From common.Address `json:"from"` Gas hexutil.Big `json:"gas"` Init hexutility.Bytes `json:"init,omitempty"` Input hexutility.Bytes `json:"input,omitempty"` RefundAddress string `json:"refundAddress,omitempty"` To string `json:"to,omitempty"` Value string `json:"value,omitempty"` }
TraceAction A parity formatted trace action
type TraceCallParam ¶
type TraceCallParam struct { From *libcommon.Address `json:"from"` To *libcommon.Address `json:"to"` Gas *hexutil.Uint64 `json:"gas"` GasPrice *hexutil.Big `json:"gasPrice"` MaxPriorityFeePerGas *hexutil.Big `json:"maxPriorityFeePerGas"` MaxFeePerGas *hexutil.Big `json:"maxFeePerGas"` MaxFeePerBlobGas *hexutil.Big `json:"maxFeePerBlobGas"` Value *hexutil.Big `json:"value"` Data hexutility.Bytes `json:"data"` AccessList *types2.AccessList `json:"accessList"` // contains filtered or unexported fields }
TraceCallParam (see SendTxArgs -- this allows optional prams plus don't use MixedcaseAddress
type TraceCallResult ¶
type TraceCallResult struct { Output hexutility.Bytes `json:"output"` StateDiff map[libcommon.Address]*StateDiffAccount `json:"stateDiff"` Trace []*ParityTrace `json:"trace"` VmTrace *VmTrace `json:"vmTrace"` TransactionHash *libcommon.Hash `json:"transactionHash,omitempty"` }
TraceCallResult is the response to `trace_call` method
type TraceEntry ¶
type TraceFilterMode ¶
type TraceFilterMode string
type TraceFilterRequest ¶
type TraceFilterRequest struct { FromBlock *hexutil.Uint64 `json:"fromBlock"` ToBlock *hexutil.Uint64 `json:"toBlock"` FromAddress []*common.Address `json:"fromAddress"` ToAddress []*common.Address `json:"toAddress"` Mode TraceFilterMode `json:"mode"` After *uint64 `json:"after"` Count *uint64 `json:"count"` }
TraceFilterRequest represents the arguments for trace_filter
type TraceResult ¶
type TraceResult struct { // Do not change the ordering of these fields -- allows for easier comparison with other clients GasUsed *hexutil.Big `json:"gasUsed"` Output hexutility.Bytes `json:"output"` }
TraceResult A parity formatted trace result
type TransactionTracer ¶
type TransactionTracer struct { DefaultTracer Results []*TraceEntry // contains filtered or unexported fields }
func NewTransactionTracer ¶
func NewTransactionTracer(ctx context.Context) *TransactionTracer
func (*TransactionTracer) CaptureEnd ¶
func (t *TransactionTracer) CaptureEnd(output []byte, usedGas uint64, err error)
func (*TransactionTracer) CaptureEnter ¶
func (*TransactionTracer) CaptureExit ¶
func (t *TransactionTracer) CaptureExit(output []byte, usedGas uint64, err error)
type TransactionsWithReceipts ¶
type TransactionsWithReceipts struct { Txs []*RPCTransaction `json:"txs"` Receipts []map[string]interface{} `json:"receipts"` FirstPage bool `json:"firstPage"` LastPage bool `json:"lastPage"` }
type TxPoolAPI ¶
type TxPoolAPI interface { Content(ctx context.Context) (map[string]map[string]map[string]*RPCTransaction, error) ContentFrom(ctx context.Context, addr libcommon.Address) (map[string]map[string]*RPCTransaction, error) }
TxPoolAPI the interface for the txpool_ RPC commands
type TxPoolAPIImpl ¶
type TxPoolAPIImpl struct { *BaseAPI // contains filtered or unexported fields }
TxPoolAPIImpl data structure to store things needed for net_ commands
func NewTxPoolAPI ¶
func NewTxPoolAPI(base *BaseAPI, db kv.RoDB, pool proto_txpool.TxpoolClient) *TxPoolAPIImpl
NewTxPoolAPI returns NetAPIImplImpl instance
func (*TxPoolAPIImpl) Content ¶
func (api *TxPoolAPIImpl) Content(ctx context.Context) (map[string]map[string]map[string]*RPCTransaction, error)
func (*TxPoolAPIImpl) ContentFrom ¶
func (api *TxPoolAPIImpl) ContentFrom(ctx context.Context, addr libcommon.Address) (map[string]map[string]*RPCTransaction, error)
type ValidatorSet ¶
type ValidatorSet = valset.ValidatorSet
type VmTrace ¶
type VmTrace struct { Code hexutility.Bytes `json:"code"` Ops []*VmTraceOp `json:"ops"` }
VmTrace is the part of `trace_call` response that is under "vmTrace" tag
type VmTraceEx ¶
type VmTraceEx struct { Mem *VmTraceMem `json:"mem"` Push []string `json:"push"` Store *VmTraceStore `json:"store"` Used int `json:"used"` }
type VmTraceMem ¶
type VmTraceOp ¶
type VmTraceOp struct { Cost int `json:"cost"` Ex *VmTraceEx `json:"ex"` Pc int `json:"pc"` Sub *VmTrace `json:"sub"` Op string `json:"op,omitempty"` Idx string `json:"idx,omitempty"` }
VmTraceOp is one element of the vmTrace ops trace
type VmTraceStore ¶
type Web3API ¶
type Web3API interface { ClientVersion(_ context.Context) (string, error) Sha3(_ context.Context, input hexutility.Bytes) hexutility.Bytes }
Web3API provides interfaces for the web3_ RPC commands
type Web3APIImpl ¶
type Web3APIImpl struct { *BaseAPI // contains filtered or unexported fields }
func NewWeb3APIImpl ¶
func NewWeb3APIImpl(ethBackend rpchelper.ApiBackend) *Web3APIImpl
NewWeb3APIImpl returns Web3APIImpl instance
func (*Web3APIImpl) ClientVersion ¶
func (api *Web3APIImpl) ClientVersion(ctx context.Context) (string, error)
ClientVersion implements web3_clientVersion. Returns the current client version.
func (*Web3APIImpl) Sha3 ¶
func (api *Web3APIImpl) Sha3(_ context.Context, input hexutility.Bytes) hexutility.Bytes
Sha3 implements web3_sha3. Returns Keccak-256 (not the standardized SHA3-256) of the given data.
Source Files ¶
- admin_api.go
- bor_api.go
- bor_helper.go
- bor_snapshot.go
- daemon.go
- db_api_deprecated.go
- debug_api.go
- erigon_api.go
- erigon_block.go
- erigon_cache_check.go
- erigon_nodeInfo.go
- erigon_receipts.go
- erigon_system.go
- error_messages.go
- eth_accounts.go
- eth_api.go
- eth_block.go
- eth_call.go
- eth_callMany.go
- eth_deprecated.go
- eth_filters.go
- eth_mining.go
- eth_receipts.go
- eth_system.go
- eth_txs.go
- eth_uncles.go
- graphql_api.go
- net_api.go
- otterscan_api.go
- otterscan_block_details.go
- otterscan_contract_creator.go
- otterscan_default_tracer.go
- otterscan_generic_tracer.go
- otterscan_has_code.go
- otterscan_search_backward.go
- otterscan_search_forward.go
- otterscan_search_multi.go
- otterscan_search_trace.go
- otterscan_search_v3.go
- otterscan_trace_contract_creator.go
- otterscan_trace_operations.go
- otterscan_trace_touch.go
- otterscan_trace_transaction.go
- otterscan_transaction_by_sender_and_nonce.go
- otterscan_transaction_error.go
- otterscan_types.go
- overlay_api.go
- overlay_create_tracer.go
- parity_api.go
- send_transaction.go
- storage_range.go
- trace_adhoc.go
- trace_api.go
- trace_filtering.go
- trace_types.go
- tracing.go
- txpool_api.go
- web3_api.go