re-export low fidelity

This commit is contained in:
francois 2023-01-01 20:16:54 +01:00
parent 6acd2735c1
commit c047a0e7f5
3 changed files with 11 additions and 7 deletions

View File

@ -12,11 +12,12 @@ use crate::{
artifacts::{ artifacts::{
bytecode::{CompactBytecode, CompactDeployedBytecode}, bytecode::{CompactBytecode, CompactDeployedBytecode},
contract::{CompactContract, CompactContractBytecode, Contract}, contract::{CompactContract, CompactContractBytecode, Contract},
lowfidelity::Ast,
output_selection::{ output_selection::{
BytecodeOutputSelection, ContractOutputSelection, EvmOutputSelection, BytecodeOutputSelection, ContractOutputSelection, EvmOutputSelection,
EwasmOutputSelection, EwasmOutputSelection,
}, },
Ast, CompactContractBytecodeCow, DevDoc, Evm, Ewasm, FunctionDebugData, GasEstimates, CompactContractBytecodeCow, DevDoc, Evm, Ewasm, FunctionDebugData, GasEstimates,
GeneratedSource, LosslessAbi, LosslessMetadata, Metadata, Offsets, GeneratedSource, LosslessAbi, LosslessMetadata, Metadata, Offsets,
Settings, /*SourceUnit,*/ Settings, /*SourceUnit,*/
StorageLayout, UserDoc, StorageLayout, UserDoc,

View File

@ -14,6 +14,7 @@
mod macros; mod macros;
mod misc; mod misc;
pub use misc::*; pub use misc::*;
pub mod lowfidelity;
pub mod util; pub mod util;
pub mod visitor; pub mod visitor;

View File

@ -1,6 +1,10 @@
//! Solc artifact types //! Solc artifact types
use crate::{ 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 ethers_core::abi::Abi;
use md5::Digest; use md5::Digest;
@ -22,9 +26,7 @@ pub mod contract;
pub mod output_selection; pub mod output_selection;
pub mod serde_helpers; pub mod serde_helpers;
use crate::{ use crate::{
artifacts::{ artifacts::output_selection::{ContractOutputSelection, OutputSelection},
output_selection::{ContractOutputSelection, OutputSelection},
},
filter::FilteredSources, filter::FilteredSources,
}; };
pub use bytecode::*; pub use bytecode::*;
@ -535,7 +537,7 @@ impl Libraries {
if items.next().is_some() { if items.next().is_some() {
return Err(SolcError::msg(format!( return Err(SolcError::msg(format!(
"failed to parse, too many arguments passed: {lib}" "failed to parse, too many arguments passed: {lib}"
))) )));
} }
libraries libraries
.entry(file.into()) .entry(file.into())
@ -1851,7 +1853,7 @@ impl SourceFile {
return ast return ast
.nodes .nodes
.iter() .iter()
.any(|node| matches!(node.node_type, NodeType::ContractDefinition)) .any(|node| matches!(node.node_type, NodeType::ContractDefinition));
// abstract contract, interfaces: ContractDefinition // abstract contract, interfaces: ContractDefinition
} }