Skip to main content

EthereumRpcClient

Struct EthereumRpcClient 

Source
pub struct EthereumRpcClient { /* private fields */ }
Expand description

Standard Ethereum JSON-RPC namespace.

Implementations§

Source§

impl EthereumRpcClient

Source

pub fn eth_accounts(&self) -> PendingRpcRequest<Vec<String>>

Creates a pending eth_accounts request.

Source

pub fn eth_base_fee(&self) -> PendingRpcRequest<String>

Creates a pending eth_baseFee request.

Source

pub fn eth_blob_base_fee(&self) -> PendingRpcRequest<String>

Creates a pending eth_blobBaseFee request.

Source

pub fn eth_block_number(&self) -> PendingRpcRequest<String>

Creates a pending eth_blockNumber request.

Source

pub fn eth_capabilities(&self) -> PendingRpcRequest<Value>

Creates a pending eth_capabilities request.

Source

pub fn eth_chain_id(&self) -> PendingRpcRequest<String>

Creates a pending eth_chainId request.

Source

pub fn eth_gas_price(&self) -> PendingRpcRequest<String>

Creates a pending eth_gasPrice request.

Source

pub fn eth_max_priority_fee_per_gas(&self) -> PendingRpcRequest<String>

Creates a pending eth_maxPriorityFeePerGas request.

Source

pub fn eth_new_block_filter(&self) -> PendingRpcRequest<String>

Creates a pending eth_newBlockFilter request.

Source

pub fn eth_new_pending_transaction_filter(&self) -> PendingRpcRequest<String>

Creates a pending eth_newPendingTransactionFilter request.

Source

pub fn eth_syncing(&self) -> PendingRpcRequest<Value>

Creates a pending eth_syncing request.

Source

pub fn net_listening(&self) -> PendingRpcRequest<bool>

Creates a pending net_listening request.

Source

pub fn net_peer_count(&self) -> PendingRpcRequest<String>

Creates a pending net_peerCount request.

Source

pub fn net_version(&self) -> PendingRpcRequest<String>

Creates a pending net_version request.

Source

pub fn txpool_content(&self) -> PendingRpcRequest<Value>

Creates a pending txpool_content request.

Source

pub fn txpool_inspect(&self) -> PendingRpcRequest<Value>

Creates a pending txpool_inspect request.

Source

pub fn txpool_status(&self) -> PendingRpcRequest<Value>

Creates a pending txpool_status request.

Source

pub fn web3_client_version(&self) -> PendingRpcRequest<String>

Creates a pending web3_clientVersion request.

Source§

impl EthereumRpcClient

Source

pub fn eth_call<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<String>>

Creates a pending eth_call request from positional parameters.

Source

pub fn eth_call_many<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending eth_callMany request from positional parameters.

Source

pub fn eth_create_access_list<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending eth_createAccessList request from positional parameters.

Source

pub fn eth_estimate_gas<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<String>>

Creates a pending eth_estimateGas request from positional parameters.

Source

pub fn eth_fee_history<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending eth_feeHistory request from positional parameters.

Source

pub fn eth_get_account<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending eth_getAccount request from positional parameters.

Source

pub fn eth_get_balance<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<String>>

Creates a pending eth_getBalance request from positional parameters.

Source

pub fn eth_get_block_by_hash<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Option<Value>>>

Creates a pending eth_getBlockByHash request from positional parameters.

Source

pub fn eth_get_block_by_number<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Option<Value>>>

Creates a pending eth_getBlockByNumber request from positional parameters.

Source

pub fn eth_get_block_receipts<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Option<Value>>>

Creates a pending eth_getBlockReceipts request from positional parameters.

Source

pub fn eth_get_block_transaction_count_by_hash<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Option<String>>>

Creates a pending eth_getBlockTransactionCountByHash request from positional parameters.

Source

pub fn eth_get_block_transaction_count_by_number<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Option<String>>>

Creates a pending eth_getBlockTransactionCountByNumber request from positional parameters.

Source

pub fn eth_get_code<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<String>>

Creates a pending eth_getCode request from positional parameters.

Source

pub fn eth_get_filter_changes<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending eth_getFilterChanges request from positional parameters.

Source

pub fn eth_get_filter_logs<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending eth_getFilterLogs request from positional parameters.

Source

pub fn eth_get_logs<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending eth_getLogs request from positional parameters.

Source

pub fn eth_get_proof<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending eth_getProof request from positional parameters.

Source

pub fn eth_get_raw_transaction_by_hash<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Option<String>>>

Creates a pending eth_getRawTransactionByHash request from positional parameters.

Source

pub fn eth_get_storage_at<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<String>>

Creates a pending eth_getStorageAt request from positional parameters.

Source

pub fn eth_get_transaction_by_block_hash_and_index<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Option<Value>>>

Creates a pending eth_getTransactionByBlockHashAndIndex request from positional parameters.

Source

pub fn eth_get_transaction_by_block_number_and_index<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Option<Value>>>

Creates a pending eth_getTransactionByBlockNumberAndIndex request from positional parameters.

Source

pub fn eth_get_transaction_by_hash<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Option<Value>>>

Creates a pending eth_getTransactionByHash request from positional parameters.

Source

pub fn eth_get_transaction_by_sender_and_nonce<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Option<Value>>>

Creates a pending eth_getTransactionBySenderAndNonce request from positional parameters.

Source

pub fn eth_get_transaction_count<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<String>>

Creates a pending eth_getTransactionCount request from positional parameters.

Source

pub fn eth_get_transaction_receipt<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Option<Value>>>

Creates a pending eth_getTransactionReceipt request from positional parameters.

Source

pub fn eth_get_uncle_count_by_block_hash<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<String>>

Creates a pending eth_getUncleCountByBlockHash request from positional parameters.

Source

pub fn eth_get_uncle_count_by_block_number<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<String>>

Creates a pending eth_getUncleCountByBlockNumber request from positional parameters.

Source

pub fn eth_new_filter<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<String>>

Creates a pending eth_newFilter request from positional parameters.

Source

pub fn eth_send_raw_transaction<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<String>>

Creates a pending eth_sendRawTransaction request from positional parameters.

Source

pub fn eth_sign_transaction<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<String>>

Creates a pending eth_signTransaction request from positional parameters.

Source

pub fn eth_simulate_v1<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending eth_simulateV1 request from positional parameters.

Source

pub fn eth_submit_work<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<bool>>

Creates a pending eth_submitWork request from positional parameters.

Source

pub fn eth_uninstall_filter<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<bool>>

Creates a pending eth_uninstallFilter request from positional parameters.

Source

pub fn txpool_content_from<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending txpool_contentFrom request from positional parameters.

Source

pub fn web3_sha3<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<String>>

Creates a pending web3_sha3 request from positional parameters.

Methods from Deref<Target = RpcNamespace>§

Source

pub fn endpoint(&self) -> String

Public endpoint without credentials.

Source

pub fn request<T: DeserializeOwned>( &self, method: impl Into<String>, params: impl Serialize, ) -> Result<PendingRpcRequest<T>>

Creates a typed request using wire-compatible method and parameters.

Source

pub fn request_without_params<T: DeserializeOwned>( &self, method: impl Into<String>, ) -> PendingRpcRequest<T>

Creates a typed parameterless request.

Source

pub fn raw<T: DeserializeOwned>( &self, method: impl Into<String>, params: Option<Value>, ) -> PendingRpcRequest<T>

Alias for arbitrary methods not yet represented by a convenience method.

Source

pub fn batch(&self, calls: Vec<RpcBatchCall>) -> Result<PendingRpcBatchRequest>

Validates and creates one unsplit batch request.

Trait Implementations§

Source§

impl Clone for EthereumRpcClient

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Deref for EthereumRpcClient

Source§

type Target = RpcNamespace

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more