Skip to content
Merged
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
8 changes: 7 additions & 1 deletion crates/bytecode/src/eip7702.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl Eip7702Bytecode {

Ok(Self {
delegated_address: Address::new(raw[3..].try_into().unwrap()),
version: EIP7702_VERSION,
version: raw[2],
raw,
})
}
Expand Down Expand Up @@ -75,6 +75,12 @@ impl Eip7702Bytecode {
pub fn address(&self) -> Address {
self.delegated_address
}

/// Returns the EIP7702 version of the delegated contract.
#[inline]
pub fn version(&self) -> u8 {
self.version
}
}

/// Bytecode errors
Expand Down
Loading