Documentation ¶
Index ¶
- Constants
- func ExtractFunctionSelector(s string) string
- func GetBlockReceiptsParams(blockNum *big.Int) []interface{}
- func GetBlockWithTransactionsParams(blockNum *big.Int) []interface{}
- func GetBlockWithoutTransactionsParams(blockNum *big.Int) []interface{}
- func GetLogsParams(blockNum *big.Int) []interface{}
- func TraceBlockParams(blockNum *big.Int) []interface{}
- type BlocksPerRequestConfig
- type Client
- func (rpc *Client) Close()
- func (rpc *Client) GetBlocks(blockNumbers []*big.Int) []GetBlocksResult
- func (rpc *Client) GetBlocksPerRequest() BlocksPerRequestConfig
- func (rpc *Client) GetChainID() *big.Int
- func (rpc *Client) GetFullBlocks(blockNumbers []*big.Int) []GetFullBlockResult
- func (rpc *Client) GetLatestBlockNumber() (*big.Int, error)
- func (rpc *Client) GetURL() string
- func (rpc *Client) IsWebsocket() bool
- func (rpc *Client) SupportsTraceBlock() bool
- type GetBlocksResult
- type GetFullBlockResult
- type IRPCClient
- type RPCFetchBatchResult
Constants ¶
View Source
const ( DEFAULT_BLOCKS_PER_REQUEST = 1000 DEFAULT_LOGS_PER_REQUEST = 100 DEFAULT_TRACES_PER_REQUEST = 100 DEFAULT_RECEIPTS_PER_REQUEST = 250 )
TODO: we should detect this automatically
Variables ¶
This section is empty.
Functions ¶
func ExtractFunctionSelector ¶
*
- Extracts the function selector (first 4 bytes) from a transaction input.
func GetBlockReceiptsParams ¶
func GetLogsParams ¶
func TraceBlockParams ¶
Types ¶
type BlocksPerRequestConfig ¶
func GetBlockPerRequestConfig ¶
func GetBlockPerRequestConfig() BlocksPerRequestConfig
type Client ¶
type Client struct { RPCClient *gethRpc.Client EthClient *ethclient.Client // contains filtered or unexported fields }
func (*Client) GetBlocksPerRequest ¶
func (rpc *Client) GetBlocksPerRequest() BlocksPerRequestConfig
func (*Client) GetChainID ¶
func (*Client) GetFullBlocks ¶
func (rpc *Client) GetFullBlocks(blockNumbers []*big.Int) []GetFullBlockResult
func (*Client) IsWebsocket ¶
func (*Client) SupportsTraceBlock ¶
type GetBlocksResult ¶
func SerializeBlocks ¶
func SerializeBlocks(chainId *big.Int, blocks []RPCFetchBatchResult[common.RawBlock]) []GetBlocksResult
type GetFullBlockResult ¶
func SerializeFullBlocks ¶
func SerializeFullBlocks(chainId *big.Int, blocks *[]RPCFetchBatchResult[common.RawBlock], logs *[]RPCFetchBatchResult[common.RawLogs], traces *[]RPCFetchBatchResult[common.RawTraces], receipts *[]RPCFetchBatchResult[common.RawReceipts]) []GetFullBlockResult
type IRPCClient ¶
type IRPCClient interface { GetFullBlocks(blockNumbers []*big.Int) []GetFullBlockResult GetBlocks(blockNumbers []*big.Int) []GetBlocksResult GetLatestBlockNumber() (*big.Int, error) GetChainID() *big.Int GetURL() string GetBlocksPerRequest() BlocksPerRequestConfig IsWebsocket() bool SupportsTraceBlock() bool }
func Initialize ¶
func Initialize() (IRPCClient, error)
type RPCFetchBatchResult ¶
func RPCFetchBatch ¶
Click to show internal directories.
Click to hide internal directories.