Skip to content

Commit cce0157

Browse files
authored
chore: Remove EOF opcodes and add new Prague opcodes (#67)
1 parent 40614f3 commit cce0157

File tree

6 files changed

+118
-170
lines changed

6 files changed

+118
-170
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
- Convert context to a list of contexts to allow for nested contexts in lexing.
77
- Make Prague the default EVM version.
88
- Update `revm` and `foundry` to the latest version.
9+
- Add `AUTH` and `AUTHCALL` opcodes to the code table.
10+
- Remove EOF opcodes from the code table.
911

1012
## [1.1.7] - 2025-03-30
1113
- Throw error if the argument count for a macro call is not equal to the macro definition (Fixes: #49).

Cargo.lock

Lines changed: 3 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ huff-neo-parser = { path = "crates/parser" }
2121
huff-neo-test-runner = { path = "crates/test-runner" }
2222
huff-neo-utils = { path = "crates/utils" }
2323

24-
alloy-consensus = "1.0.7"
25-
alloy-dyn-abi = "1.1.2"
26-
alloy-evm = "0.10.0"
27-
alloy-primitives = "1.1.2"
24+
alloy-consensus = { version = "1.0.7", default-features = false }
25+
alloy-dyn-abi = { version = "1.1.2", default-features = false }
26+
alloy-evm = { version = "0.10.0", default-features = false }
27+
alloy-primitives = { version = "1.1.2", default-features = false, features = ["std"] }
2828

2929
anvil = { git = "https://github.com/foundry-rs/foundry", rev = "7e68208" }
3030
cfg-if = "1.0.0"
@@ -48,7 +48,6 @@ phf = { version = "0.11.3", features = ["macros"] }
4848
rand = "0.9.0"
4949
regex = "1.11.1"
5050
revm = { version = "24.0.0", default-features = false, features = ["optional_no_base_fee"] }
51-
revm-inspectors = "0.23.0"
5251
shadow-rs = "1.0.1"
5352
thiserror = "2.0.12"
5453
tokio = "1.44.2"
@@ -70,7 +69,7 @@ strum_macros = "0.27.1"
7069
toml = { version = "0.8.20", default-features = false, features = ["parse"] }
7170

7271
# dev
73-
criterion = "0.5.1"
72+
criterion = "0.6.0"
7473
getrandom = { version = "0.3.2", features = ["wasm_js"] }
7574
rayon = "1.10.0"
7675

crates/lexer/tests/opcodes.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ fn opcodes() {
2323

2424
let tokens = lexer.into_iter().map(|x| x.unwrap()).filter(|x| !matches!(x.kind, TokenKind::Whitespace)).collect::<Vec<Token>>();
2525

26-
assert_eq!(tokens.get(tokens.len() - 3).unwrap().kind, TokenKind::Opcode(OPCODES_MAP.get(&opcode).unwrap().to_owned()),);
26+
assert!(OPCODES_MAP.get(&opcode).is_some(), "Opcode `{opcode}` is not defined in OPCODES_MAP");
27+
assert_eq!(
28+
tokens.get(tokens.len() - 3).unwrap().kind,
29+
TokenKind::Opcode(OPCODES_MAP.get(&opcode).unwrap().to_owned()),
30+
"Opcode `{opcode}` did not lex correctly"
31+
);
2732
}
2833
}

crates/utils/src/evm_version.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ pub enum SupportedEVMVersions {
1212
Shanghai,
1313
/// Introduced TLOAD, TSTORE, MCOPY, BLOBHASH, and BLOBBASEFEE
1414
Cancun,
15-
/// Introduces EOA account code
15+
/// Introduced AUTH and AUTHCALL
1616
#[default]
1717
Prague,
18-
/// Introduces EOF
18+
/// No new opcodes
1919
Osaka,
2020
}
2121

0 commit comments

Comments
 (0)