diff --git a/ethers-solc/src/artifact_output/configurable.rs b/ethers-solc/src/artifact_output/configurable.rs index 9917ebe8..e75bc387 100644 --- a/ethers-solc/src/artifact_output/configurable.rs +++ b/ethers-solc/src/artifact_output/configurable.rs @@ -12,11 +12,12 @@ use crate::{ artifacts::{ bytecode::{CompactBytecode, CompactDeployedBytecode}, contract::{CompactContract, CompactContractBytecode, Contract}, + lowfidelity::Ast, output_selection::{ BytecodeOutputSelection, ContractOutputSelection, EvmOutputSelection, EwasmOutputSelection, }, - Ast, CompactContractBytecodeCow, DevDoc, Evm, Ewasm, FunctionDebugData, GasEstimates, + CompactContractBytecodeCow, DevDoc, Evm, Ewasm, FunctionDebugData, GasEstimates, GeneratedSource, LosslessAbi, LosslessMetadata, Metadata, Offsets, Settings, /*SourceUnit,*/ StorageLayout, UserDoc, diff --git a/ethers-solc/src/artifacts/ast/mod.rs b/ethers-solc/src/artifacts/ast/mod.rs index 31f3a496..79fd230a 100644 --- a/ethers-solc/src/artifacts/ast/mod.rs +++ b/ethers-solc/src/artifacts/ast/mod.rs @@ -14,6 +14,7 @@ mod macros; mod misc; pub use misc::*; +pub mod lowfidelity; pub mod util; pub mod visitor; diff --git a/ethers-solc/src/artifacts/mod.rs b/ethers-solc/src/artifacts/mod.rs index 5a103a9a..121479eb 100644 --- a/ethers-solc/src/artifacts/mod.rs +++ b/ethers-solc/src/artifacts/mod.rs @@ -1,6 +1,10 @@ //! Solc artifact types use crate::{ - compile::*, error::SolcIoError, remappings::Remapping, utils, ProjectPathsConfig, SolcError, + artifacts::lowfidelity::{Ast, NodeType}, + compile::*, + error::SolcIoError, + remappings::Remapping, + utils, ProjectPathsConfig, SolcError, }; use ethers_core::abi::Abi; use md5::Digest; @@ -22,9 +26,7 @@ pub mod contract; pub mod output_selection; pub mod serde_helpers; use crate::{ - artifacts::{ - output_selection::{ContractOutputSelection, OutputSelection}, - }, + artifacts::output_selection::{ContractOutputSelection, OutputSelection}, filter::FilteredSources, }; pub use bytecode::*; @@ -535,7 +537,7 @@ impl Libraries { if items.next().is_some() { return Err(SolcError::msg(format!( "failed to parse, too many arguments passed: {lib}" - ))) + ))); } libraries .entry(file.into()) @@ -1851,7 +1853,7 @@ impl SourceFile { return ast .nodes .iter() - .any(|node| matches!(node.node_type, NodeType::ContractDefinition)) + .any(|node| matches!(node.node_type, NodeType::ContractDefinition)); // abstract contract, interfaces: ContractDefinition }