handler

package
v1.0.8-testnet Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfGasStationPriceFast    = "gasstation_price_fast"
	ConfGasStationPriceFastest = "gasstation_price_fastest"
	ConfGasStationPriceSafeLow = "gasstation_price_safe_low"
	ConfGasStationPriceAverage = "gasstation_price_average"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CfxLogsApiHandler

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

CfxLogsApiHandler RPC handler to get core space event logs from store or fullnode.

func NewCfxLogsApiHandler

func NewCfxLogsApiHandler(ms *mysql.MysqlStore, prunedHandler *CfxPrunedLogsHandler) *CfxLogsApiHandler

func (*CfxLogsApiHandler) GetLogs

func (handler *CfxLogsApiHandler) GetLogs(
	ctx context.Context,
	cfx sdk.ClientOperator,
	filter *types.LogFilter,
) ([]types.Log, bool, error)

type CfxPrunedLogsHandler

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

CfxPrunedLogsHandler RPC handler to get pruned event logs from some archive fullnodes in rate limited way or vip mode with dedicated fullnode.

func NewCfxPrunedLogsHandler

func NewCfxPrunedLogsHandler(
	pool *node.CfxClientProvider, store *mysql.UserStore, client *redis.Client) *CfxPrunedLogsHandler

func (*CfxPrunedLogsHandler) GetLogs

func (h *CfxPrunedLogsHandler) GetLogs(ctx context.Context, filter types.LogFilter) ([]types.Log, error)

type CfxStoreHandler

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

CfxStoreHandler RPC handler to get block/txn/receipt data from store.

func NewCfxCommonStoreHandler

func NewCfxCommonStoreHandler(sname string, store store.Readable, next *CfxStoreHandler) *CfxStoreHandler

func (*CfxStoreHandler) GetBlockByBlockNumber

func (h *CfxStoreHandler) GetBlockByBlockNumber(
	ctx context.Context, blockNumer hexutil.Uint64, includeTxs bool,
) (block interface{}, err error)

func (*CfxStoreHandler) GetBlockByEpochNumber

func (h *CfxStoreHandler) GetBlockByEpochNumber(
	ctx context.Context, epoch *types.Epoch, includeTxs bool,
) (block interface{}, err error)

func (*CfxStoreHandler) GetBlockByHash

func (h *CfxStoreHandler) GetBlockByHash(
	ctx context.Context, blockHash types.Hash, includeTxs bool) (block interface{}, err error)

func (*CfxStoreHandler) GetBlocksByEpoch

func (h *CfxStoreHandler) GetBlocksByEpoch(
	ctx context.Context, epoch *types.Epoch,
) (blockHashes []types.Hash, err error)

func (*CfxStoreHandler) GetTransactionByHash

func (h *CfxStoreHandler) GetTransactionByHash(ctx context.Context, txHash types.Hash) (txn *types.Transaction, err error)

func (*CfxStoreHandler) GetTransactionReceipt

func (h *CfxStoreHandler) GetTransactionReceipt(
	ctx context.Context, txHash types.Hash,
) (rcpt *types.TransactionReceipt, err error)

type EthLogsApiHandler

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

EthLogsApiHandler RPC handler to get evm space event logs from store or fullnode.

func NewEthLogsApiHandler

func NewEthLogsApiHandler(ms *mysql.MysqlStore) *EthLogsApiHandler

func (*EthLogsApiHandler) GetLogs

func (handler *EthLogsApiHandler) GetLogs(
	ctx context.Context,
	eth *client.RpcEthClient,
	filter *types.FilterQuery,
) ([]types.Log, bool, error)

type EthStoreHandler

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

EthStoreHandler RPC handler to get block/txn/receipt data from store.

func NewEthStoreHandler

func NewEthStoreHandler(store store.Readable, next *EthStoreHandler) *EthStoreHandler

func (*EthStoreHandler) GetBlockByHash

func (h *EthStoreHandler) GetBlockByHash(ctx context.Context, blockHash common.Hash, includeTxs bool) (
	block *web3Types.Block, err error,
)

func (*EthStoreHandler) GetBlockByNumber

func (h *EthStoreHandler) GetBlockByNumber(ctx context.Context, blockNum *web3Types.BlockNumber, includeTxs bool) (
	block *web3Types.Block, err error,
)

func (*EthStoreHandler) GetLogs

func (h *EthStoreHandler) GetLogs(ctx context.Context, filter store.LogFilter) (logs []web3Types.Log, err error)

func (*EthStoreHandler) GetTransactionByHash

func (h *EthStoreHandler) GetTransactionByHash(ctx context.Context, txHash common.Hash) (*web3Types.TransactionDetail, error)

func (*EthStoreHandler) GetTransactionReceipt

func (h *EthStoreHandler) GetTransactionReceipt(ctx context.Context, txHash common.Hash) (*web3Types.Receipt, error)

type GasStationHandler

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

GasStationHandler RPC handler to serve gas price estimation etc.,

func NewGasStationHandler

func NewGasStationHandler(db, cache store.Configurable) *GasStationHandler

func (*GasStationHandler) GetPrice

func (handler *GasStationHandler) GetPrice() (*itypes.GasStationPrice, error)

Jump to

Keyboard shortcuts

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