switch to pallet_revive runtime (#40)

Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
Cyrill Leutwiler
2024-09-03 17:18:22 +02:00
committed by GitHub
parent 41c8d4e955
commit d2f76b645f
66 changed files with 3023 additions and 2911 deletions
-1
View File
@@ -129,7 +129,6 @@ impl Compiler {
)
})?;
output.preprocess_ast(&version, pipeline, suppressed_warnings.as_slice())?;
output.remove_evm();
Ok(output)
}
+3 -1
View File
@@ -1,10 +1,12 @@
//! The Solidity compiler pipeline type.
use serde::{Deserialize, Serialize};
use crate::solc::version::Version as SolcVersion;
use crate::solc::Compiler as SolcCompiler;
/// The Solidity compiler pipeline type.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[allow(non_camel_case_types)]
#[allow(clippy::upper_case_acronyms)]
pub enum Pipeline {
@@ -37,6 +37,8 @@ pub enum Flag {
/// The EVM legacy assembly JSON.
#[serde(rename = "evm.legacyAssembly")]
EVMLA,
#[serde(rename = "evm.bytecode")]
EVMBC,
#[serde(rename = "evm.deployedBytecode")]
EVMDBC,
}
@@ -62,6 +64,7 @@ impl std::fmt::Display for Flag {
Self::AST => write!(f, "ast"),
Self::Yul => write!(f, "irOptimized"),
Self::EVMLA => write!(f, "evm.legacyAssembly"),
Self::EVMBC => write!(f, "evm.bytecode"),
Self::EVMDBC => write!(f, "evm.deployedBytecode"),
}
}
@@ -28,6 +28,7 @@ impl File {
Self {
per_file: Some(HashSet::from_iter([SelectionFlag::AST])),
per_contract: Some(HashSet::from_iter([
SelectionFlag::EVMBC,
SelectionFlag::EVMDBC,
SelectionFlag::MethodIdentifiers,
SelectionFlag::Metadata,
@@ -138,19 +138,6 @@ impl Output {
))
}
/// Removes EVM artifacts to prevent their accidental usage.
pub fn remove_evm(&mut self) {
if let Some(files) = self.contracts.as_mut() {
for (_, file) in files.iter_mut() {
for (_, contract) in file.iter_mut() {
if let Some(evm) = contract.evm.as_mut() {
evm.bytecode = None;
}
}
}
}
}
/// Traverses the AST and returns the list of additional errors and warnings.
pub fn preprocess_ast(
&mut self,