pub trait EthStateApiServer:
Sized
+ Send
+ Sync
+ 'static {
// Required methods
fn balance<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: Option<BlockNumberOrTagOrHash>,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn storage_at<'life0, 'async_trait>(
&'life0 self,
address: Address,
slot: U256,
block: Option<BlockNumberOrTagOrHash>,
) -> Pin<Box<dyn Future<Output = RpcResult<H256>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn transaction_count<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: Option<BlockNumberOrTagOrHash>,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn code<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: Option<BlockNumberOrTagOrHash>,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn proof<'life0, 'async_trait>(
&'life0 self,
address: Address,
storage_keys: H256,
block: Option<BlockNumberOrTagOrHash>,
) -> Pin<Box<dyn Future<Output = RpcResult<AccountProof>> + 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 EthStateApi
RPC API.
Required Methods§
Sourcefn balance<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: Option<BlockNumberOrTagOrHash>,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn balance<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: Option<BlockNumberOrTagOrHash>,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the balance of the account of given address.
Sourcefn storage_at<'life0, 'async_trait>(
&'life0 self,
address: Address,
slot: U256,
block: Option<BlockNumberOrTagOrHash>,
) -> Pin<Box<dyn Future<Output = RpcResult<H256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn storage_at<'life0, 'async_trait>(
&'life0 self,
address: Address,
slot: U256,
block: Option<BlockNumberOrTagOrHash>,
) -> Pin<Box<dyn Future<Output = RpcResult<H256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the value from a storage position at a given address.
Sourcefn transaction_count<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: Option<BlockNumberOrTagOrHash>,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transaction_count<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: Option<BlockNumberOrTagOrHash>,
) -> Pin<Box<dyn Future<Output = RpcResult<U256>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the number of transactions sent from an address.
Sourcefn code<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: Option<BlockNumberOrTagOrHash>,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn code<'life0, 'async_trait>(
&'life0 self,
address: Address,
block: Option<BlockNumberOrTagOrHash>,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the code at a given address.
Sourcefn proof<'life0, 'async_trait>(
&'life0 self,
address: Address,
storage_keys: H256,
block: Option<BlockNumberOrTagOrHash>,
) -> Pin<Box<dyn Future<Output = RpcResult<AccountProof>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn proof<'life0, 'async_trait>(
&'life0 self,
address: Address,
storage_keys: H256,
block: Option<BlockNumberOrTagOrHash>,
) -> Pin<Box<dyn Future<Output = RpcResult<AccountProof>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the merkle proof for a given account and optionally some storage keys.
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.