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§
Sourcefn 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 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.
Sourcefn 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 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
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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
Sourcefn 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 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
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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).
Sourcefn 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_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.
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,
Sourcefn 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<'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.
Sourcefn 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_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.
Sourcefn 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_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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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).
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
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,
Sourcefn 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 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.
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,
Sourcefn 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 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
Sourcefn 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 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
Sourcefn 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 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
Sourcefn 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 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
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,
Sourcefn 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_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
Sourcefn 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_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
Sourcefn 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_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.
Sourcefn 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_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.
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 Methods§
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.