Skip to content

Commit dbe1c4d

Browse files
committed
WIP
1 parent 4643ced commit dbe1c4d

File tree

8 files changed

+4085
-96
lines changed

8 files changed

+4085
-96
lines changed

Diff for: Cargo.lock

+740-89
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: crates/test-runner/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ colored = "2.0"
1313

1414
# used by revm; we need to force the js feature for wasm support
1515
getrandom = { version = "0.2.8", features = ["js"] }
16-
revm = "3.0"
16+
revm = "3.5.0"
17+
alloy-primitives = { version = "0.4" }

Diff for: crates/test-runner/src/lib.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
use bytes::Bytes;
1+
use alloy_primitives::{Address, Bytes};
22
use colored::Colorize;
3-
use revm::primitives::{AccountInfo, Bytecode, Env, ExecutionResult, TransactTo, B160, U256};
4-
use std::fmt::Display;
3+
use revm::primitives::{AccountInfo, Bytecode, Env, ExecutionResult, TransactTo, U256};
4+
use std::{fmt::Display, str::FromStr};
55

66
#[derive(Debug, Default)]
77
pub struct TestSink {
@@ -66,11 +66,12 @@ impl Display for TestSink {
6666
}
6767

6868
pub fn execute(name: &str, bytecode: &str, sink: &mut TestSink) -> bool {
69-
let bytecode = Bytecode::new_raw(Bytes::copy_from_slice(&hex::decode(bytecode).unwrap()));
69+
let bytecode = Bytecode::new_raw(alloy_primitives::Bytes(
70+
Bytes::copy_from_slice(&hex::decode(bytecode).unwrap()).into()));
7071

7172
let mut database = revm::InMemoryDB::default();
72-
let test_address = B160::from(42);
73-
let test_info = AccountInfo::new(U256::ZERO, 0, bytecode);
73+
let test_address = Address::from_str("42").unwrap();
74+
let test_info = AccountInfo::new(U256::ZERO, 0, bytecode.hash_slow(), bytecode);
7475
database.insert_account_info(test_address, test_info);
7576

7677
let mut env = Env::default();

Diff for: fuzz/.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
target
2+
corpus
3+
artifacts
4+
coverage

0 commit comments

Comments
 (0)