Versions in this module Expand all Collapse all v1 v1.1.3 Jan 20, 2025 v1.1.2 Jan 20, 2025 Changes in this version + const APIDebug + const APIEth + const APINet + const APITxPool + const APIWeb3 + const APIZKEVM + const FilterTypeBlock + const FilterTypeLog + const FilterTypePendingTx + var ErrFilterInvalidPayload = errors.New(...) + var ErrNotFound = errors.New("object not found") + func RPCErrorResponse(code int, message string, err error, logError bool) (interface{}, types.Error) + func RPCErrorResponseWithData(code int, message string, data []byte, err error, logError bool) (interface{}, types.Error) + type Config struct + BatchRequestsEnabled bool + BatchRequestsLimit uint + EnableHttpLog bool + EnableL2SuggestedGasPricePolling bool + Host string + L2Coinbase common.Address + MaxCumulativeGasUsed uint64 + MaxLogsBlockRange uint64 + MaxLogsCount uint64 + MaxNativeBlockHashBlockRange uint64 + MaxRequestsPerIPAndSecond float64 + Port int + ReadTimeout types.Duration + SequencerNodeURI string + WebSockets WebSocketsConfig + WriteTimeout types.Duration + ZKCountersLimits ZKCountersLimits + type DBTxManager struct + func (f *DBTxManager) NewDbTxScope(db DBTxer, scopedFn DBTxScopedFn) (interface{}, types.Error) + type DBTxScopedFn func(ctx context.Context, dbTx pgx.Tx) (interface{}, types.Error) + type DBTxer interface + BeginStateTransaction func(ctx context.Context) (pgx.Tx, error) + type DebugEndpoints struct + func NewDebugEndpoints(cfg Config, state types.StateInterface, etherman types.EthermanInterface) *DebugEndpoints + func (d *DebugEndpoints) TraceBatchByNumber(httpRequest *http.Request, number types.BatchNumber, cfg *traceConfig) (interface{}, types.Error) + func (d *DebugEndpoints) TraceBlockByHash(hash types.ArgHash, cfg *traceConfig) (interface{}, types.Error) + func (d *DebugEndpoints) TraceBlockByNumber(number types.BlockNumber, cfg *traceConfig) (interface{}, types.Error) + func (d *DebugEndpoints) TraceTransaction(hash types.ArgHash, cfg *traceConfig) (interface{}, types.Error) + type EthEndpoints struct + func NewEthEndpoints(cfg Config, chainID uint64, p types.PoolInterface, s types.StateInterface, ...) *EthEndpoints + func (e *EthEndpoints) BlockNumber() (interface{}, types.Error) + func (e *EthEndpoints) Call(arg *types.TxArgs, blockArg *types.BlockNumberOrHash) (interface{}, types.Error) + func (e *EthEndpoints) ChainId() (interface{}, types.Error) + func (e *EthEndpoints) Coinbase() (interface{}, types.Error) + func (e *EthEndpoints) EstimateGas(arg *types.TxArgs, blockArg *types.BlockNumberOrHash) (interface{}, types.Error) + func (e *EthEndpoints) GasPrice() (interface{}, types.Error) + func (e *EthEndpoints) GetBalance(address types.ArgAddress, blockArg *types.BlockNumberOrHash) (interface{}, types.Error) + func (e *EthEndpoints) GetBlockByHash(hash types.ArgHash, fullTx bool, includeExtraInfo *bool) (interface{}, types.Error) + func (e *EthEndpoints) GetBlockByNumber(number types.BlockNumber, fullTx bool, includeExtraInfo *bool) (interface{}, types.Error) + func (e *EthEndpoints) GetBlockTransactionCountByHash(hash types.ArgHash) (interface{}, types.Error) + func (e *EthEndpoints) GetBlockTransactionCountByNumber(number *types.BlockNumber) (interface{}, types.Error) + func (e *EthEndpoints) GetCode(address types.ArgAddress, blockArg *types.BlockNumberOrHash) (interface{}, types.Error) + func (e *EthEndpoints) GetCompilers() (interface{}, types.Error) + func (e *EthEndpoints) GetFilterChanges(filterID string) (interface{}, types.Error) + func (e *EthEndpoints) GetFilterLogs(filterID string) (interface{}, types.Error) + func (e *EthEndpoints) GetLogs(filter LogFilter) (interface{}, types.Error) + func (e *EthEndpoints) GetStorageAt(address types.ArgAddress, storageKeyStr string, ...) (interface{}, types.Error) + func (e *EthEndpoints) GetTransactionByBlockHashAndIndex(hash types.ArgHash, index types.Index, includeExtraInfo *bool) (interface{}, types.Error) + func (e *EthEndpoints) GetTransactionByBlockNumberAndIndex(number *types.BlockNumber, index types.Index, includeExtraInfo *bool) (interface{}, types.Error) + func (e *EthEndpoints) GetTransactionByHash(hash types.ArgHash, includeExtraInfo *bool) (interface{}, types.Error) + func (e *EthEndpoints) GetTransactionCount(address types.ArgAddress, blockArg *types.BlockNumberOrHash) (interface{}, types.Error) + func (e *EthEndpoints) GetTransactionReceipt(hash types.ArgHash) (interface{}, types.Error) + func (e *EthEndpoints) GetUncleByBlockHashAndIndex(hash types.ArgHash, index types.Index) (interface{}, types.Error) + func (e *EthEndpoints) GetUncleByBlockNumberAndIndex(number types.BlockNumber, index types.Index) (interface{}, types.Error) + func (e *EthEndpoints) GetUncleCountByBlockHash(hash types.ArgAddress) (interface{}, types.Error) + func (e *EthEndpoints) GetUncleCountByBlockNumber(number types.BlockNumber) (interface{}, types.Error) + func (e *EthEndpoints) NewBlockFilter() (interface{}, types.Error) + func (e *EthEndpoints) NewFilter(filter LogFilter) (interface{}, types.Error) + func (e *EthEndpoints) NewPendingTransactionFilter() (interface{}, types.Error) + func (e *EthEndpoints) ProtocolVersion() (interface{}, types.Error) + func (e *EthEndpoints) SendRawTransaction(httpRequest *http.Request, input string) (interface{}, types.Error) + func (e *EthEndpoints) Subscribe(wsConn *concurrentWsConn, name string, logFilter *LogFilter) (interface{}, types.Error) + func (e *EthEndpoints) Syncing() (interface{}, types.Error) + func (e *EthEndpoints) UninstallFilter(filterID string) (interface{}, types.Error) + func (e *EthEndpoints) Unsubscribe(wsConn *concurrentWsConn, filterID string) (interface{}, types.Error) + type Filter struct + ID string + LastPoll time.Time + Parameters interface{} + Type FilterType + WsConn *concurrentWsConn + func (f *Filter) EnqueueSubscriptionDataToBeSent(data []byte) + func (f *Filter) SendEnqueuedSubscriptionData() + type FilterType string + type Handler struct + func (h *Handler) Handle(req handleRequest) types.Response + func (h *Handler) HandleWs(reqBody []byte, wsConn *concurrentWsConn, httpReq *http.Request) ([]byte, error) + func (h *Handler) RemoveFilterByWsConn(wsConn *concurrentWsConn) + type LogFilter struct + Addresses []common.Address + BlockHash *common.Hash + FromBlock *types.BlockNumber + Since *time.Time + ToBlock *types.BlockNumber + Topics [][]common.Hash + func (f *LogFilter) GetNumericBlockNumbers(ctx context.Context, cfg Config, s types.StateInterface, ...) (uint64, uint64, types.Error) + func (f *LogFilter) MarshalJSON() ([]byte, error) + func (f *LogFilter) Match(log *types.Log) bool + func (f *LogFilter) ShouldFilterByBlockHash() bool + func (f *LogFilter) ShouldFilterByBlockRange() bool + func (f *LogFilter) UnmarshalJSON(data []byte) error + func (f *LogFilter) Validate() error + type NativeBlockHashBlockRangeFilter struct + FromBlock types.BlockNumber + ToBlock types.BlockNumber + func (f *NativeBlockHashBlockRangeFilter) GetNumericBlockNumbers(ctx context.Context, cfg Config, s types.StateInterface, ...) (uint64, uint64, types.Error) + type NetEndpoints struct + func NewNetEndpoints(cfg Config, chainID uint64) *NetEndpoints + func (n *NetEndpoints) Version() (interface{}, types.Error) + type Server struct + func NewServer(cfg Config, chainID uint64, p types.PoolInterface, s types.StateInterface, ...) *Server + func (s *Server) Start() error + func (s *Server) Stop() error + type Service struct + Name string + Service interface{} + type Storage struct + func NewStorage() *Storage + func (s *Storage) GetAllBlockFiltersWithWSConn() []*Filter + func (s *Storage) GetAllLogFiltersWithWSConn() []*Filter + func (s *Storage) GetFilter(filterID string) (*Filter, error) + func (s *Storage) NewBlockFilter(wsConn *concurrentWsConn) (string, error) + func (s *Storage) NewLogFilter(wsConn *concurrentWsConn, filter LogFilter) (string, error) + func (s *Storage) NewPendingTransactionFilter(wsConn *concurrentWsConn) (string, error) + func (s *Storage) UninstallFilter(filterID string) error + func (s *Storage) UninstallFilterByWSConn(wsConn *concurrentWsConn) error + func (s *Storage) UpdateFilterLastPoll(filterID string) error + type TxPoolEndpoints struct + func (e *TxPoolEndpoints) Content() (interface{}, types.Error) + type Web3Endpoints struct + func (e *Web3Endpoints) ClientVersion() (interface{}, types.Error) + func (e *Web3Endpoints) Sha3(data types.ArgBig) (interface{}, types.Error) + type WebSocketsConfig struct + Enabled bool + Host string + Port int + ReadLimit int64 + type ZKCountersLimits struct + MaxArithmetics uint32 + MaxBinaries uint32 + MaxKeccakHashes uint32 + MaxMemAligns uint32 + MaxPoseidonHashes uint32 + MaxPoseidonPaddings uint32 + MaxSHA256Hashes uint32 + MaxSteps uint32 + type ZKEVMEndpoints struct + func NewZKEVMEndpoints(cfg Config, pool types.PoolInterface, state types.StateInterface, ...) *ZKEVMEndpoints + func (z *ZKEVMEndpoints) BatchNumber() (interface{}, types.Error) + func (z *ZKEVMEndpoints) BatchNumberByBlockNumber(blockNumber types.ArgUint64) (interface{}, types.Error) + func (z *ZKEVMEndpoints) ConsolidatedBlockNumber() (interface{}, types.Error) + func (z *ZKEVMEndpoints) EstimateCounters(arg *types.TxArgs, blockArg *types.BlockNumberOrHash) (interface{}, types.Error) + func (z *ZKEVMEndpoints) EstimateFee(arg *types.TxArgs, blockArg *types.BlockNumberOrHash) (interface{}, types.Error) + func (z *ZKEVMEndpoints) EstimateGasPrice(arg *types.TxArgs, blockArg *types.BlockNumberOrHash) (interface{}, types.Error) + func (z *ZKEVMEndpoints) GetBatchByNumber(batchNumber types.BatchNumber, fullTx bool) (interface{}, types.Error) + func (z *ZKEVMEndpoints) GetExitRootsByGER(globalExitRoot common.Hash) (interface{}, types.Error) + func (z *ZKEVMEndpoints) GetFullBlockByHash(hash types.ArgHash, fullTx bool) (interface{}, types.Error) + func (z *ZKEVMEndpoints) GetFullBlockByNumber(number types.BlockNumber, fullTx bool) (interface{}, types.Error) + func (z *ZKEVMEndpoints) GetLatestGlobalExitRoot() (interface{}, types.Error) + func (z *ZKEVMEndpoints) GetNativeBlockHashesInRange(filter NativeBlockHashBlockRangeFilter) (interface{}, types.Error) + func (z *ZKEVMEndpoints) GetTransactionByL2Hash(hash types.ArgHash) (interface{}, types.Error) + func (z *ZKEVMEndpoints) GetTransactionReceiptByL2Hash(hash types.ArgHash) (interface{}, types.Error) + func (z *ZKEVMEndpoints) IsBlockConsolidated(blockNumber types.ArgUint64) (interface{}, types.Error) + func (z *ZKEVMEndpoints) IsBlockVirtualized(blockNumber types.ArgUint64) (interface{}, types.Error) + func (z *ZKEVMEndpoints) VerifiedBatchNumber() (interface{}, types.Error) + func (z *ZKEVMEndpoints) VirtualBatchNumber() (interface{}, types.Error)