remove the zkasm format

Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
xermicus
2024-05-08 10:48:01 +02:00
parent 169740eb5e
commit b55669f5c5
15 changed files with 28 additions and 215 deletions
-30
View File
@@ -234,36 +234,6 @@ impl Project {
BTreeMap::new(),
))
}
/// Parses the PolkaVM assembly source code file and returns the source data.
pub fn try_from_zkasm_path(path: &Path) -> anyhow::Result<Self> {
let source_code = std::fs::read_to_string(path).map_err(|error| {
anyhow::anyhow!("PolkaVM assembly file {:?} reading error: {}", path, error)
})?;
let source_hash = sha3::Keccak256::digest(source_code.as_bytes()).into();
let source_version =
SolcVersion::new_simple(revive_llvm_context::polkavm_const::ZKEVM_VERSION);
let path = path.to_string_lossy().to_string();
let mut project_contracts = BTreeMap::new();
project_contracts.insert(
path.clone(),
Contract::new(
path.clone(),
source_hash,
source_version.clone(),
IR::new_zkasm(path, source_code),
None,
),
);
Ok(Self::new(
source_version,
project_contracts,
BTreeMap::new(),
))
}
}
impl revive_llvm_context::PolkaVMDependency for Project {