diff --git a/Cargo.lock b/Cargo.lock index dda69bdc430..715a3182a0e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1185,6 +1185,7 @@ dependencies = [ "fuel-client", "fuel-tx", "fuel-vm", + "futures", "hex", "line-col", "pest 2.1.3 (git+https://github.com/sezna/pest.git?rev=8aa58791f759daf4caee26e8560e862df5a6afb7)", diff --git a/forc/Cargo.toml b/forc/Cargo.toml index 87cc77601bc..ea556b70bc8 100644 --- a/forc/Cargo.toml +++ b/forc/Cargo.toml @@ -17,6 +17,7 @@ fuel-asm = {git = "ssh://git@github.com/FuelLabs/fuel-asm.git"} fuel-client = {git = "ssh://git@github.com/FuelLabs/fuel-core", default-features = false } fuel-tx = {git = "ssh://git@github.com/FuelLabs/fuel-tx.git"} fuel-vm = { git = "ssh://git@github.com/FuelLabs/fuel-vm.git" } +futures = "0.3" hex = "0.4.3" line-col = "0.2" pest = {git = "https://github.com/sezna/pest.git", rev = "8aa58791f759daf4caee26e8560e862df5a6afb7"} diff --git a/forc/src/ops/forc_run.rs b/forc/src/ops/forc_run.rs index ab7fa8e7d15..530e16bd059 100644 --- a/forc/src/ops/forc_run.rs +++ b/forc/src/ops/forc_run.rs @@ -1,6 +1,7 @@ use core_lang::parse; use fuel_client::client::FuelClient; use fuel_tx::Transaction; +use futures::TryFutureExt; use std::io::{self, Write}; use std::path::PathBuf; use tokio::process::Child; @@ -138,7 +139,12 @@ async fn send_tx( tx: &Transaction, pretty_print: bool, ) -> Result<(), CliError> { - match client.submit(&tx).await { + let id = format!("{:#x}", tx.id()); + match client + .submit(&tx) + .and_then(|_| client.receipts(id.as_str())) + .await + { Ok(logs) => { if pretty_print { println!("{:#?}", logs);