Compare commits

..

1 Commits

Author SHA1 Message Date
Omar Abdulla 81829e9e1f Supply the revert reason in the logs 2025-11-02 20:52:12 +03:00
5 changed files with 5 additions and 24 deletions
+1 -5
View File
@@ -16,7 +16,6 @@ use alloy::{
primitives::{B256, FixedBytes, U256}, primitives::{B256, FixedBytes, U256},
signers::local::PrivateKeySigner, signers::local::PrivateKeySigner,
}; };
use anyhow::Context as _;
use clap::{Parser, ValueEnum, ValueHint}; use clap::{Parser, ValueEnum, ValueHint};
use revive_dt_common::types::{ParsedTestSpecifier, PlatformIdentifier}; use revive_dt_common::types::{ParsedTestSpecifier, PlatformIdentifier};
use semver::Version; use semver::Version;
@@ -1080,10 +1079,7 @@ impl FromStr for WorkingDirectoryConfiguration {
fn from_str(s: &str) -> Result<Self, Self::Err> { fn from_str(s: &str) -> Result<Self, Self::Err> {
match s { match s {
"" => Ok(Default::default()), "" => Ok(Default::default()),
_ => PathBuf::from(s) _ => Ok(Self::Path(PathBuf::from(s))),
.canonicalize()
.context("Failed to canonicalize the working directory path")
.map(Self::Path),
} }
} }
} }
+2 -14
View File
@@ -234,15 +234,9 @@ impl Platform for ReviveDevNodePolkavmResolcPlatform {
.path .path
.as_path(); .as_path();
let wallet = AsRef::<WalletConfiguration>::as_ref(&context).wallet(); let wallet = AsRef::<WalletConfiguration>::as_ref(&context).wallet();
let working_directory = AsRef::<WorkingDirectoryConfiguration>::as_ref(&context).as_path();
let export_chainspec_command = SubstrateNode::REVIVE_DEV_NODE_EXPORT_CHAINSPEC_COMMAND; let export_chainspec_command = SubstrateNode::REVIVE_DEV_NODE_EXPORT_CHAINSPEC_COMMAND;
SubstrateNode::node_genesis( SubstrateNode::node_genesis(revive_dev_node_path, export_chainspec_command, &wallet)
revive_dev_node_path,
export_chainspec_command,
&wallet,
working_directory,
)
} }
} }
@@ -308,15 +302,9 @@ impl Platform for ReviveDevNodeRevmSolcPlatform {
.path .path
.as_path(); .as_path();
let wallet = AsRef::<WalletConfiguration>::as_ref(&context).wallet(); let wallet = AsRef::<WalletConfiguration>::as_ref(&context).wallet();
let working_directory = AsRef::<WorkingDirectoryConfiguration>::as_ref(&context).as_path();
let export_chainspec_command = SubstrateNode::REVIVE_DEV_NODE_EXPORT_CHAINSPEC_COMMAND; let export_chainspec_command = SubstrateNode::REVIVE_DEV_NODE_EXPORT_CHAINSPEC_COMMAND;
SubstrateNode::node_genesis( SubstrateNode::node_genesis(revive_dev_node_path, export_chainspec_command, &wallet)
revive_dev_node_path,
export_chainspec_command,
&wallet,
working_directory,
)
} }
} }
@@ -160,7 +160,6 @@ impl SubstrateNode {
&self.node_binary, &self.node_binary,
&self.export_chainspec_command, &self.export_chainspec_command,
&self.wallet, &self.wallet,
self.base_directory.as_path(),
) )
.context("Failed to prepare the chainspec command")?; .context("Failed to prepare the chainspec command")?;
@@ -320,7 +319,6 @@ impl SubstrateNode {
node_path: &Path, node_path: &Path,
export_chainspec_command: &str, export_chainspec_command: &str,
wallet: &EthereumWallet, wallet: &EthereumWallet,
base_directory: impl AsRef<Path>,
) -> anyhow::Result<serde_json::Value> { ) -> anyhow::Result<serde_json::Value> {
trace!("Exporting the chainspec"); trace!("Exporting the chainspec");
let output = Command::new(node_path) let output = Command::new(node_path)
@@ -328,7 +326,6 @@ impl SubstrateNode {
.arg("--chain") .arg("--chain")
.arg("dev") .arg("dev")
.env_remove("RUST_LOG") .env_remove("RUST_LOG")
.current_dir(base_directory)
.output() .output()
.context("Failed to export the chain-spec")?; .context("Failed to export the chain-spec")?;