pub fn mint_coins(&self, receiver: &AccountAddress, num_coins: u64) -> Result<()> {
        let mut runtime = tokio::runtime::Runtime::new()?;
        let client = hyper::Client::new();

        let url = format!(
            "http://{}?amount={}&address={:?}",
            self.faucet_url, num_coins, receiver
        )
        .parse::<hyper::Uri>()?;

        let response = runtime.block_on(client.get(url))?;
        let status_code = response.status();
        let body = response.into_body().concat2().wait()?;
        let raw_data = std::str::from_utf8(&body)?;

        if status_code != 200 {
            return Err(format_err!(
                "Failed to query remote faucet server[status={}]: {:?}",
                status_code,
                raw_data,
            ));
        }

        //        let sequence_number = raw_data.parse::<u64>()?;
        //        if is_blocking {
        //            self.wait_for_transaction(AccountAddress::new([0; 32]), sequence_number);
        //        }

        Ok(())
    }
// TODO(perf): Rewrite in async way (use the global tokio runtime).
Rewrite in async way (use the global tokio runtime).
Rewrite in async way ( use the global tokio runtime ) .
pub fn mint_coins(&self, receiver: &AccountAddress, num_coins: u64) -> Result<()> {
        let mut runtime = tokio::runtime::Runtime::new()?;
        let client = hyper::Client::new();
        let url = format!(
            "http://{}?amount={}&address={:?}",
            self.faucet_url, num_coins, receiver
        )
        .parse::<hyper::Uri>()?;
        let response = runtime.block_on(client.get(url))?;
        let status_code = response.status();
        let body = response.into_body().concat2().wait()?;
        let raw_data = std::str::from_utf8(&body)?;
        if status_code != 200 {
            return Err(format_err!(
                "Failed to query remote faucet server[status={}]: {:?}",
                status_code,
                raw_data,
            ));
        }
        //        let sequence_number = raw_data.parse::<u64>()?;
        //        if is_blocking {
        //            self.wait_for_transaction(AccountAddress::new([0; 32]), sequence_number);
        //        }
        Ok(())
    }
pub fn mint_coins ( & self , receiver : & AccountAddress , num_coins : u64 ) -> Result < ( ) > { let mut runtime = tokio :: runtime :: Runtime :: new ( ) ? ; let client = hyper :: Client :: new ( ) ; let url = format ! ( " " self faucet_url num_coins receiver ) . parse :: < hyper :: Uri > ( ) ? ; let response = runtime . block_on ( client . get ( url ) ) ? ; let status_code = response . status ( ) ; let body = response . into_body ( ) . concat2 ( ) . wait ( ) ? ; let raw_data = std :: str :: from_utf8 ( & body ) ? ; if status_code != 200 { return Err ( format_err ! ( " " status_code raw_data ) ) ; } //        let sequence_number = raw_data.parse::<u64>()?; //        if is_blocking { //            self.wait_for_transaction(AccountAddress::new([0; 32]), sequence_number); //        } Ok ( ( ) ) }
TODO(perf): Rewrite in async way (use the global tokio runtime).
TODO ( perf ) : Rewrite in async way ( use the global tokio runtime ) .
&self
receiver
&AccountAddress
num_coins
u64
&self
receiver
&AccountAddress
num_coins
u64