pub async fn send_rpc(&self, method: &str, params: Option<Params>) -> Result<Value> {
        trace!("Sending RPC {} with params {:?}", method, params);

        let response = self
            .client
            .request(method, params)
            .await
            .map_err(|e| Web3Error::RpcRequestError(e.to_string()))?;

        trace!("RPC Response {:?}", response);

        match response {
            Output::Success(s) => Ok(s.result),
            Output::Failure(f) => Err(Web3Error::RpcResponseError(f.error.to_string())),
        }
    }
/// Send a RPC call with the given method and parameters.
///
/// # Examples
///
/// ```ignore
/// let web3 = web3::Web3::new("http://127.0.0.1:8545").unwrap();
///
/// let response = web3.send_rpc("eth_blockNumber", None).await;
/// assert!(response.is_ok());
/// ```
Send a RPC call with the given method and parameters.
Send a RPC call with the given method and parameters .
pub async fn send_rpc(&self, method: &str, params: Option<Params>) -> Result<Value> {
        trace!("Sending RPC {} with params {:?}", method, params);
        let response = self
            .client
            .request(method, params)
            .await
            .map_err(|e| Web3Error::RpcRequestError(e.to_string()))?;
        trace!("RPC Response {:?}", response);
        match response {
            Output::Success(s) => Ok(s.result),
            Output::Failure(f) => Err(Web3Error::RpcResponseError(f.error.to_string())),
        }
    }
pub async fn send_rpc ( & self , method : & str , params : Option < Params > ) -> Result < Value > { trace ! ( " " method params ) ; let response = self . client . request ( method , params ) . await . map_err ( | e | Web3Error :: RpcRequestError ( e . to_string ( ) ) ) ? ; trace ! ( " " response ) ; match response { Output :: Success ( s ) => Ok ( s . result ) , Output :: Failure ( f ) => Err ( Web3Error :: RpcResponseError ( f . error . to_string ( ) ) ) , } }
Send a RPC call with the given method and parameters.
Send a RPC call with the given method and parameters .
&self
method
&str
params
Option<Params>
examples


let response = web3.send_rpc("eth_blockNumber", None).await;
assert!(response.is_ok());
```
let response = web3 . send_rpc ( " eth_blockNumber " None ) . await ; assert! ( response . is_ok () ) ; ` ` `