Integrate benchmarks and differential tests against an EVM interpreter (#7)

This commit is contained in:
Cyrill Leutwiler
2024-04-24 18:51:19 +02:00
parent bd10742ef8
commit df8ebb61ec
27 changed files with 1567 additions and 383 deletions
@@ -23,3 +23,22 @@ impl Bytecode {
Self { object }
}
}
///
/// The `solc --standard-json` output contract EVM deployed bytecode.
///
#[derive(Debug, Serialize, Deserialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct DeployedBytecode {
/// The bytecode object.
pub object: String,
}
impl DeployedBytecode {
///
/// A shortcut constructor.
///
pub fn new(object: String) -> Self {
Self { object }
}
}
@@ -13,6 +13,7 @@ use serde::Serialize;
use crate::evmla::assembly::Assembly;
use self::bytecode::Bytecode;
use self::bytecode::DeployedBytecode;
use self::extra_metadata::ExtraMetadata;
///
@@ -32,6 +33,8 @@ pub struct EVM {
/// The contract bytecode.
/// Is reset by that of EraVM before yielding the compiled project artifacts.
pub bytecode: Option<Bytecode>,
/// The contract deployed bytecode.
pub deployed_bytecode: Option<DeployedBytecode>,
/// The contract function signatures.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub method_identifiers: Option<BTreeMap<String, String>>,