Documentation ¶
Index ¶
- Constants
- type CfxLogsApiHandler
- type CfxPrunedLogsHandler
- type CfxStateHandler
- func (h *CfxStateHandler) Call(ctx context.Context, cfx sdk.ClientOperator, request types.CallRequest, ...) (hexutil.Bytes, error)
- func (h *CfxStateHandler) CheckBalanceAgainstTransaction(ctx context.Context, cfx sdk.ClientOperator, accountAddress types.Address, ...) (types.CheckBalanceAgainstTransactionResponse, error)
- func (h *CfxStateHandler) EstimateGasAndCollateral(ctx context.Context, cfx sdk.ClientOperator, request types.CallRequest, ...) (types.Estimate, error)
- func (h *CfxStateHandler) GetAccountInfo(ctx context.Context, cfx sdk.ClientOperator, account types.Address, ...) (types.AccountInfo, error)
- func (h *CfxStateHandler) GetAccumulateInterestRate(ctx context.Context, cfx sdk.ClientOperator, epoch ...*types.Epoch) (*hexutil.Big, error)
- func (h *CfxStateHandler) GetAdmin(ctx context.Context, cfx sdk.ClientOperator, contractAddress types.Address, ...) (*types.Address, error)
- func (h *CfxStateHandler) GetBalance(ctx context.Context, cfx sdk.ClientOperator, address types.Address, ...) (*hexutil.Big, error)
- func (h *CfxStateHandler) GetCode(ctx context.Context, cfx sdk.ClientOperator, address types.Address, ...) (hexutil.Bytes, error)
- func (h *CfxStateHandler) GetCollateralForStorage(ctx context.Context, cfx sdk.ClientOperator, account types.Address, ...) (*hexutil.Big, error)
- func (h *CfxStateHandler) GetCollateralInfo(ctx context.Context, cfx sdk.ClientOperator, epoch ...*types.Epoch) (types.StorageCollateralInfo, error)
- func (h *CfxStateHandler) GetDepositList(ctx context.Context, cfx sdk.ClientOperator, address types.Address, ...) ([]types.DepositInfo, error)
- func (h *CfxStateHandler) GetInterestRate(ctx context.Context, cfx sdk.ClientOperator, epoch ...*types.Epoch) (*hexutil.Big, error)
- func (h *CfxStateHandler) GetNextNonce(ctx context.Context, cfx sdk.ClientOperator, address types.Address, ...) (*hexutil.Big, error)
- func (h *CfxStateHandler) GetParamsFromVote(ctx context.Context, cfx sdk.ClientOperator, epoch ...*types.Epoch) (postypes.VoteParamsInfo, error)
- func (h *CfxStateHandler) GetPoSEconomics(ctx context.Context, cfx sdk.ClientOperator, epoch ...*types.Epoch) (types.PoSEconomics, error)
- func (h *CfxStateHandler) GetSponsorInfo(ctx context.Context, cfx sdk.ClientOperator, contractAddress types.Address, ...) (sponsor types.SponsorInfo, err error)
- func (h *CfxStateHandler) GetStakingBalance(ctx context.Context, cfx sdk.ClientOperator, account types.Address, ...) (*hexutil.Big, error)
- func (h *CfxStateHandler) GetStorageAt(ctx context.Context, cfx sdk.ClientOperator, address types.Address, ...) (hexutil.Bytes, error)
- func (h *CfxStateHandler) GetStorageRoot(ctx context.Context, cfx sdk.ClientOperator, address types.Address, ...) (*types.StorageRoot, error)
- func (h *CfxStateHandler) GetSupplyInfo(ctx context.Context, cfx sdk.ClientOperator, epoch ...*types.Epoch) (types.TokenSupplyInfo, error)
- func (h *CfxStateHandler) GetVoteList(ctx context.Context, cfx sdk.ClientOperator, address types.Address, ...) ([]types.VoteStakeInfo, error)
- type CfxStoreHandler
- func (h *CfxStoreHandler) GetBlockByBlockNumber(ctx context.Context, blockNumer hexutil.Uint64, includeTxs bool) (block interface{}, err error)
- func (h *CfxStoreHandler) GetBlockByEpochNumber(ctx context.Context, epoch *types.Epoch, includeTxs bool) (block interface{}, err error)
- func (h *CfxStoreHandler) GetBlockByHash(ctx context.Context, blockHash types.Hash, includeTxs bool) (block interface{}, err error)
- func (h *CfxStoreHandler) GetBlocksByEpoch(ctx context.Context, epoch *types.Epoch) (blockHashes []types.Hash, err error)
- func (h *CfxStoreHandler) GetTransactionByHash(ctx context.Context, txHash types.Hash) (txn *types.Transaction, err error)
- func (h *CfxStoreHandler) GetTransactionReceipt(ctx context.Context, txHash types.Hash) (rcpt *types.TransactionReceipt, err error)
- type CfxTxnHandler
- type EthLogsApiHandler
- type EthStateHandler
- func (h *EthStateHandler) Balance(ctx context.Context, w3c *node.Web3goClient, addr common.Address, ...) (*big.Int, error)
- func (h *EthStateHandler) Call(ctx context.Context, w3c *node.Web3goClient, callRequest types.CallRequest, ...) ([]byte, error)
- func (h *EthStateHandler) CodeAt(ctx context.Context, w3c *node.Web3goClient, addr common.Address, ...) ([]byte, error)
- func (h *EthStateHandler) EstimateGas(ctx context.Context, w3c *node.Web3goClient, callRequest types.CallRequest, ...) (*big.Int, error)
- func (h *EthStateHandler) StorageAt(ctx context.Context, w3c *node.Web3goClient, addr common.Address, ...) (common.Hash, error)
- func (h *EthStateHandler) TransactionCount(ctx context.Context, w3c *node.Web3goClient, addr common.Address, ...) (*big.Int, error)
- type EthStoreHandler
- func (h *EthStoreHandler) GetBlockByHash(ctx context.Context, blockHash common.Hash, includeTxs bool) (block *web3Types.Block, err error)
- func (h *EthStoreHandler) GetBlockByNumber(ctx context.Context, blockNum *web3Types.BlockNumber, includeTxs bool) (block *web3Types.Block, err error)
- func (h *EthStoreHandler) GetLogs(ctx context.Context, filter store.LogFilter) (logs []web3Types.Log, err error)
- func (h *EthStoreHandler) GetTransactionByHash(ctx context.Context, txHash common.Hash) (*web3Types.TransactionDetail, error)
- func (h *EthStoreHandler) GetTransactionReceipt(ctx context.Context, txHash common.Hash) (*web3Types.Receipt, error)
- type EthTxnHandler
- type GasStationHandler
Constants ¶
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
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
type CfxStateHandler ¶
type CfxStateHandler struct {
// contains filtered or unexported fields
}
CfxStateHandler handles core space state RPC method by redirecting requests to another full state node if state is not available on normal full node.
func NewCfxStateHandler ¶
func NewCfxStateHandler(cp *node.CfxClientProvider) *CfxStateHandler
func (*CfxStateHandler) Call ¶
func (h *CfxStateHandler) Call( ctx context.Context, cfx sdk.ClientOperator, request types.CallRequest, epoch *types.EpochOrBlockHash, ) (hexutil.Bytes, error)
func (*CfxStateHandler) CheckBalanceAgainstTransaction ¶
func (h *CfxStateHandler) CheckBalanceAgainstTransaction( ctx context.Context, cfx sdk.ClientOperator, accountAddress types.Address, contractAddress types.Address, gasLimit *hexutil.Big, gasPrice *hexutil.Big, storageLimit *hexutil.Big, epoch ...*types.Epoch, ) (types.CheckBalanceAgainstTransactionResponse, error)
func (*CfxStateHandler) EstimateGasAndCollateral ¶
func (h *CfxStateHandler) EstimateGasAndCollateral( ctx context.Context, cfx sdk.ClientOperator, request types.CallRequest, epoch ...*types.Epoch, ) (types.Estimate, error)
func (*CfxStateHandler) GetAccountInfo ¶
func (h *CfxStateHandler) GetAccountInfo( ctx context.Context, cfx sdk.ClientOperator, account types.Address, epoch ...*types.Epoch, ) (types.AccountInfo, error)
func (*CfxStateHandler) GetAccumulateInterestRate ¶
func (h *CfxStateHandler) GetAccumulateInterestRate( ctx context.Context, cfx sdk.ClientOperator, epoch ...*types.Epoch, ) (*hexutil.Big, error)
func (*CfxStateHandler) GetBalance ¶
func (h *CfxStateHandler) GetBalance( ctx context.Context, cfx sdk.ClientOperator, address types.Address, epoch ...*types.EpochOrBlockHash, ) (*hexutil.Big, error)
func (*CfxStateHandler) GetCode ¶
func (h *CfxStateHandler) GetCode( ctx context.Context, cfx sdk.ClientOperator, address types.Address, epoch ...*types.EpochOrBlockHash, ) (hexutil.Bytes, error)
func (*CfxStateHandler) GetCollateralForStorage ¶
func (*CfxStateHandler) GetCollateralInfo ¶
func (h *CfxStateHandler) GetCollateralInfo( ctx context.Context, cfx sdk.ClientOperator, epoch ...*types.Epoch, ) (types.StorageCollateralInfo, error)
func (*CfxStateHandler) GetDepositList ¶
func (h *CfxStateHandler) GetDepositList( ctx context.Context, cfx sdk.ClientOperator, address types.Address, epoch ...*types.Epoch, ) ([]types.DepositInfo, error)
func (*CfxStateHandler) GetInterestRate ¶
func (h *CfxStateHandler) GetInterestRate( ctx context.Context, cfx sdk.ClientOperator, epoch ...*types.Epoch, ) (*hexutil.Big, error)
func (*CfxStateHandler) GetNextNonce ¶
func (h *CfxStateHandler) GetNextNonce( ctx context.Context, cfx sdk.ClientOperator, address types.Address, epoch ...*types.EpochOrBlockHash, ) (*hexutil.Big, error)
func (*CfxStateHandler) GetParamsFromVote ¶
func (h *CfxStateHandler) GetParamsFromVote( ctx context.Context, cfx sdk.ClientOperator, epoch ...*types.Epoch, ) (postypes.VoteParamsInfo, error)
func (*CfxStateHandler) GetPoSEconomics ¶
func (h *CfxStateHandler) GetPoSEconomics( ctx context.Context, cfx sdk.ClientOperator, epoch ...*types.Epoch, ) (types.PoSEconomics, error)
func (*CfxStateHandler) GetSponsorInfo ¶
func (h *CfxStateHandler) GetSponsorInfo( ctx context.Context, cfx sdk.ClientOperator, contractAddress types.Address, epoch ...*types.Epoch, ) (sponsor types.SponsorInfo, err error)
func (*CfxStateHandler) GetStakingBalance ¶
func (*CfxStateHandler) GetStorageAt ¶
func (h *CfxStateHandler) GetStorageAt( ctx context.Context, cfx sdk.ClientOperator, address types.Address, position *hexutil.Big, epoch ...*types.EpochOrBlockHash, ) (hexutil.Bytes, error)
func (*CfxStateHandler) GetStorageRoot ¶
func (h *CfxStateHandler) GetStorageRoot( ctx context.Context, cfx sdk.ClientOperator, address types.Address, epoch ...*types.Epoch, ) (*types.StorageRoot, error)
func (*CfxStateHandler) GetSupplyInfo ¶
func (h *CfxStateHandler) GetSupplyInfo( ctx context.Context, cfx sdk.ClientOperator, epoch ...*types.Epoch, ) (types.TokenSupplyInfo, error)
func (*CfxStateHandler) GetVoteList ¶
func (h *CfxStateHandler) GetVoteList( ctx context.Context, cfx sdk.ClientOperator, address types.Address, epoch ...*types.Epoch, ) ([]types.VoteStakeInfo, 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 (*CfxStoreHandler) GetBlockByEpochNumber ¶
func (*CfxStoreHandler) GetBlockByHash ¶
func (*CfxStoreHandler) GetBlocksByEpoch ¶
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 CfxTxnHandler ¶
type CfxTxnHandler struct {
// contains filtered or unexported fields
}
CfxTxnHandler RPC handler to optimize sending transaction by relaying txn broadcasting asynchronously and replicating txn sending synchronously to all full nodes of some node group to improve consistency and availability once consistent hashing LB repartitioned.
func MustNewCfxTxnHandler ¶
func MustNewCfxTxnHandler(relayer relay.TxnRelayer) *CfxTxnHandler
func (*CfxTxnHandler) SendRawTxn ¶
func (h *CfxTxnHandler) SendRawTxn(cfx sdk.ClientOperator, group node.Group, signedTx hexutil.Bytes) (types.Hash, 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, delegatedRpcMethod string, ) ([]types.Log, bool, error)
func (*EthLogsApiHandler) GetNetworkId ¶
func (handler *EthLogsApiHandler) GetNetworkId(eth *client.RpcEthClient) (uint32, error)
type EthStateHandler ¶
type EthStateHandler struct {
// contains filtered or unexported fields
}
EthStateHandler handles evm space state RPC method by redirecting requests to another full state node if state is not available on normal full node.
func NewEthStateHandler ¶
func NewEthStateHandler(cp *node.EthClientProvider) *EthStateHandler
func (*EthStateHandler) Balance ¶
func (h *EthStateHandler) Balance( ctx context.Context, w3c *node.Web3goClient, addr common.Address, block *types.BlockNumberOrHash, ) (*big.Int, error)
func (*EthStateHandler) Call ¶
func (h *EthStateHandler) Call( ctx context.Context, w3c *node.Web3goClient, callRequest types.CallRequest, blockNum *types.BlockNumberOrHash, ) ([]byte, error)
func (*EthStateHandler) CodeAt ¶
func (h *EthStateHandler) CodeAt( ctx context.Context, w3c *node.Web3goClient, addr common.Address, blockNum *types.BlockNumberOrHash, ) ([]byte, error)
func (*EthStateHandler) EstimateGas ¶
func (h *EthStateHandler) EstimateGas( ctx context.Context, w3c *node.Web3goClient, callRequest types.CallRequest, blockNum *types.BlockNumberOrHash, ) (*big.Int, error)
func (*EthStateHandler) StorageAt ¶
func (h *EthStateHandler) StorageAt( ctx context.Context, w3c *node.Web3goClient, addr common.Address, location *big.Int, block *types.BlockNumberOrHash, ) (common.Hash, error)
func (*EthStateHandler) TransactionCount ¶
func (h *EthStateHandler) TransactionCount( ctx context.Context, w3c *node.Web3goClient, addr common.Address, blockNum *types.BlockNumberOrHash, ) (*big.Int, 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 (*EthStoreHandler) GetBlockByNumber ¶
func (h *EthStoreHandler) GetBlockByNumber(ctx context.Context, blockNum *web3Types.BlockNumber, includeTxs bool) ( block *web3Types.Block, err error, )
func (*EthStoreHandler) GetTransactionByHash ¶
func (h *EthStoreHandler) GetTransactionByHash(ctx context.Context, txHash common.Hash) (*web3Types.TransactionDetail, error)
func (*EthStoreHandler) GetTransactionReceipt ¶
type EthTxnHandler ¶
type EthTxnHandler struct {
// contains filtered or unexported fields
}
EthTxnHandler evm space RPC handler to optimize sending transaction by relay and replication.
func MustNewEthTxnHandler ¶
func MustNewEthTxnHandler(relayer relay.TxnRelayer) *EthTxnHandler
func (*EthTxnHandler) SendRawTxn ¶
func (h *EthTxnHandler) SendRawTxn(w3c *node.Web3goClient, group node.Group, signedTx hexutil.Bytes) (common.Hash, 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)