CfxRpcServer

Trait CfxRpcServer 

Source
pub trait CfxRpcServer:
    Sized
    + Send
    + Sync
    + 'static {
Show 43 methods // Required methods fn gas_price<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<U256>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn max_priority_fee_per_gas<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<U256>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn epoch_number<'life0, 'async_trait>( &'life0 self, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<U256>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn balance<'life0, 'async_trait>( &'life0 self, addr: RpcAddress, block_hash_or_epoch_number: Option<BlockHashOrEpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<U256>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn admin<'life0, 'async_trait>( &'life0 self, addr: RpcAddress, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<RpcAddress>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn sponsor_info<'life0, 'async_trait>( &'life0 self, addr: RpcAddress, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<SponsorInfo>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn staking_balance<'life0, 'async_trait>( &'life0 self, addr: RpcAddress, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<U256>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn deposit_list<'life0, 'async_trait>( &'life0 self, addr: RpcAddress, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Vec<DepositInfo>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn vote_list<'life0, 'async_trait>( &'life0 self, addr: RpcAddress, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Vec<VoteStakeInfo>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn collateral_for_storage<'life0, 'async_trait>( &'life0 self, addr: RpcAddress, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<U256>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn code<'life0, 'async_trait>( &'life0 self, addr: RpcAddress, block_hash_or_epoch_number: Option<BlockHashOrEpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Bytes>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn storage_at<'life0, 'async_trait>( &'life0 self, addr: RpcAddress, pos: U256, block_hash_or_epoch_number: Option<BlockHashOrEpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<H256>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn storage_root<'life0, 'async_trait>( &'life0 self, address: RpcAddress, epoch_num: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<StorageRoot>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn block_by_hash<'life0, 'async_trait>( &'life0 self, block_hash: H256, include_txs: bool, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<Block>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn block_by_hash_with_pivot_assumption<'life0, 'async_trait>( &'life0 self, block_hash: H256, pivot_hash: H256, epoch_number: U64, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Block>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn block_by_epoch_number<'life0, 'async_trait>( &'life0 self, epoch_number: EpochNumber, include_txs: bool, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<Block>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn block_by_block_number<'life0, 'async_trait>( &'life0 self, block_number: U64, include_txs: bool, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<Block>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn best_block_hash<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<H256>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn next_nonce<'life0, 'async_trait>( &'life0 self, addr: RpcAddress, epoch_number: Option<BlockHashOrEpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<U256>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn send_raw_transaction<'life0, 'async_trait>( &'life0 self, raw_tx: Bytes, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<H256>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn call<'life0, 'async_trait>( &'life0 self, tx: TransactionRequest, block_hash_or_epoch_number: Option<BlockHashOrEpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Bytes>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_logs<'life0, 'async_trait>( &'life0 self, filter: CfxRpcLogFilter, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Vec<RpcLog>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn transaction_by_hash<'life0, 'async_trait>( &'life0 self, tx_hash: H256, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<Transaction>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn estimate_gas_and_collateral<'life0, 'async_trait>( &'life0 self, request: TransactionRequest, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<EstimateGasAndCollateralResponse>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn fee_history<'life0, 'async_trait>( &'life0 self, block_count: HexU64, newest_block: EpochNumber, reward_percentiles: Option<Vec<f64>>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<CfxFeeHistory>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn check_balance_against_transaction<'life0, 'async_trait>( &'life0 self, account_addr: RpcAddress, contract_addr: RpcAddress, gas_limit: U256, gas_price: U256, storage_limit: U256, epoch: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<CheckBalanceAgainstTransactionResponse>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn blocks_by_epoch<'life0, 'async_trait>( &'life0 self, epoch_number: EpochNumber, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Vec<H256>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn skipped_blocks_by_epoch<'life0, 'async_trait>( &'life0 self, epoch_number: EpochNumber, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Vec<H256>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn transaction_receipt<'life0, 'async_trait>( &'life0 self, tx_hash: H256, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<RpcReceipt>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn account<'life0, 'async_trait>( &'life0 self, address: RpcAddress, epoch_num: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<RpcAccount>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn interest_rate<'life0, 'async_trait>( &'life0 self, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<U256>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn accumulate_interest_rate<'life0, 'async_trait>( &'life0 self, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<U256>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn pos_economics<'life0, 'async_trait>( &'life0 self, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<PoSEconomics>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn confirmation_risk_by_hash<'life0, 'async_trait>( &'life0 self, block_hash: H256, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<U256>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_status<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<RpcStatus>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_block_reward_info<'life0, 'async_trait>( &'life0 self, num: EpochNumber, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Vec<RpcRewardInfo>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_client_version<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_supply_info<'life0, 'async_trait>( &'life0 self, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<TokenSupplyInfo>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_collateral_info<'life0, 'async_trait>( &'life0 self, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<StorageCollateralInfo>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_fee_burnt<'life0, 'async_trait>( &'life0 self, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<U256>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_pos_reward_by_epoch<'life0, 'async_trait>( &'life0 self, epoch: EpochNumber, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<PoSEpochReward>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_vote_params<'life0, 'async_trait>( &'life0 self, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<VoteParamsInfo>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; // Provided method fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description

Server trait implementation for the CfxRpc RPC API.

Required Methods§

Source

fn gas_price<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the number of hashes per second that the node is mining with. Returns current gas price.

Source

fn max_priority_fee_per_gas<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns current max_priority_fee

Source

fn epoch_number<'life0, 'async_trait>( &'life0 self, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns highest epoch number.

Source

fn balance<'life0, 'async_trait>( &'life0 self, addr: RpcAddress, block_hash_or_epoch_number: Option<BlockHashOrEpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns balance of the given account.

Source

fn admin<'life0, 'async_trait>( &'life0 self, addr: RpcAddress, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<RpcAddress>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns admin of the given contract

Source

fn sponsor_info<'life0, 'async_trait>( &'life0 self, addr: RpcAddress, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<SponsorInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns sponsor information of the given contract

Source

fn staking_balance<'life0, 'async_trait>( &'life0 self, addr: RpcAddress, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns balance of the given account.

Source

fn deposit_list<'life0, 'async_trait>( &'life0 self, addr: RpcAddress, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Vec<DepositInfo>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns deposit list of the given account.

Source

fn vote_list<'life0, 'async_trait>( &'life0 self, addr: RpcAddress, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Vec<VoteStakeInfo>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns vote list of the given account.

Source

fn collateral_for_storage<'life0, 'async_trait>( &'life0 self, addr: RpcAddress, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns balance of the given account.

Source

fn code<'life0, 'async_trait>( &'life0 self, addr: RpcAddress, block_hash_or_epoch_number: Option<BlockHashOrEpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the code at given address at given time (epoch number).

Source

fn storage_at<'life0, 'async_trait>( &'life0 self, addr: RpcAddress, pos: U256, block_hash_or_epoch_number: Option<BlockHashOrEpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<H256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns storage entries from a given contract.

Source

fn storage_root<'life0, 'async_trait>( &'life0 self, address: RpcAddress, epoch_num: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<StorageRoot>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn block_by_hash<'life0, 'async_trait>( &'life0 self, block_hash: H256, include_txs: bool, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<Block>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns block with given hash.

Source

fn block_by_hash_with_pivot_assumption<'life0, 'async_trait>( &'life0 self, block_hash: H256, pivot_hash: H256, epoch_number: U64, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Block>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns block with given hash and pivot chain assumption.

Source

fn block_by_epoch_number<'life0, 'async_trait>( &'life0 self, epoch_number: EpochNumber, include_txs: bool, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<Block>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns block with given epoch number.

Source

fn block_by_block_number<'life0, 'async_trait>( &'life0 self, block_number: U64, include_txs: bool, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<Block>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns block with given block number.

Source

fn best_block_hash<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<H256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns best block hash.

Source

fn next_nonce<'life0, 'async_trait>( &'life0 self, addr: RpcAddress, epoch_number: Option<BlockHashOrEpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the nonce should be filled in next sending transaction from given address at given time (epoch number).

Source

fn send_raw_transaction<'life0, 'async_trait>( &'life0 self, raw_tx: Bytes, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<H256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Sends signed transaction, returning its hash.

Source

fn call<'life0, 'async_trait>( &'life0 self, tx: TransactionRequest, block_hash_or_epoch_number: Option<BlockHashOrEpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Call contract, returning the output data.

Source

fn get_logs<'life0, 'async_trait>( &'life0 self, filter: CfxRpcLogFilter, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Vec<RpcLog>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns logs matching the filter provided.

Source

fn transaction_by_hash<'life0, 'async_trait>( &'life0 self, tx_hash: H256, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<Transaction>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get transaction by its hash.

Source

fn estimate_gas_and_collateral<'life0, 'async_trait>( &'life0 self, request: TransactionRequest, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<EstimateGasAndCollateralResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Return estimated gas and collateral usage.

Source

fn fee_history<'life0, 'async_trait>( &'life0 self, block_count: HexU64, newest_block: EpochNumber, reward_percentiles: Option<Vec<f64>>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<CfxFeeHistory>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn check_balance_against_transaction<'life0, 'async_trait>( &'life0 self, account_addr: RpcAddress, contract_addr: RpcAddress, gas_limit: U256, gas_price: U256, storage_limit: U256, epoch: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<CheckBalanceAgainstTransactionResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Check if user balance is enough for the transaction.

Source

fn blocks_by_epoch<'life0, 'async_trait>( &'life0 self, epoch_number: EpochNumber, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Vec<H256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn skipped_blocks_by_epoch<'life0, 'async_trait>( &'life0 self, epoch_number: EpochNumber, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Vec<H256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn transaction_receipt<'life0, 'async_trait>( &'life0 self, tx_hash: H256, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<RpcReceipt>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn account<'life0, 'async_trait>( &'life0 self, address: RpcAddress, epoch_num: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<RpcAccount>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Return account related states of the given account

Source

fn interest_rate<'life0, 'async_trait>( &'life0 self, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns interest rate of the given epoch

Source

fn accumulate_interest_rate<'life0, 'async_trait>( &'life0 self, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns accumulate interest rate of the given epoch

Source

fn pos_economics<'life0, 'async_trait>( &'life0 self, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<PoSEconomics>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns accumulate interest rate of the given epoch

Source

fn confirmation_risk_by_hash<'life0, 'async_trait>( &'life0 self, block_hash: H256, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<U256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_status<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<RpcStatus>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_block_reward_info<'life0, 'async_trait>( &'life0 self, num: EpochNumber, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Vec<RpcRewardInfo>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns block reward information in an epoch

Source

fn get_client_version<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Return the client version as a string

Source

fn get_supply_info<'life0, 'async_trait>( &'life0 self, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<TokenSupplyInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Return information about total token supply.

Source

fn get_collateral_info<'life0, 'async_trait>( &'life0 self, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<StorageCollateralInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Return information about total token supply.

Source

fn get_fee_burnt<'life0, 'async_trait>( &'life0 self, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_pos_reward_by_epoch<'life0, 'async_trait>( &'life0 self, epoch: EpochNumber, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<Option<PoSEpochReward>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_vote_params<'life0, 'async_trait>( &'life0 self, epoch_number: Option<EpochNumber>, ) -> Pin<Box<dyn Future<Output = JsonRpcResult<VoteParamsInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn into_rpc(self) -> RpcModule<Self>

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§