Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

add in eip3074 auth & authcall #307

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion huff_utils/src/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use strum_macros::EnumString;
/// They are arranged in a particular order such that all the opcodes that have common
/// prefixes are ordered by decreasing length to avoid mismatch when lexing.
/// Example : [origin, or] or [push32, ..., push3]
pub const OPCODES: [&str; 147] = [
pub const OPCODES: [&str; 149] = [
"lt",
"gt",
"slt",
Expand Down Expand Up @@ -85,6 +85,8 @@ pub const OPCODES: [&str; 147] = [
"call",
"return",
"delegatecall",
"auth",
"authcall",
"staticcall",
"revert",
"invalid",
Expand Down Expand Up @@ -300,6 +302,8 @@ pub static OPCODES_MAP: phf::Map<&'static str, Opcode> = phf_map! {
"callcode" => Opcode::Callcode,
"return" => Opcode::Return,
"delegatecall" => Opcode::Delegatecall,
"auth" => Opcode::Auth,
"authcall" => Opcode::Authcall,
"staticcall" => Opcode::Staticcall,
"create2" => Opcode::Create2,
"revert" => Opcode::Revert,
Expand Down Expand Up @@ -597,6 +601,10 @@ pub enum Opcode {
Delegatecall,
/// Create a new account with associated code
Create2,
/// sets an authorized account based on an ECDSA signature
Auth,
/// Message-Call into an account, as an authorized account
Authcall,
/// Static Message-call into an account
Staticcall,
/// Halt execution, reverting state changes, but returning data and remaining gas
Expand Down Expand Up @@ -756,6 +764,8 @@ impl Opcode {
Opcode::Return => "f3",
Opcode::Delegatecall => "f4",
Opcode::Create2 => "f5",
Opcode::Auth => "f6",
Opcode::Authcall => "f7",
Opcode::Staticcall => "fa",
Opcode::Revert => "fd",
Opcode::Invalid => "fe",
Expand Down