Skip to content

Commit

Permalink
chore: clean up 7702 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
onbjerg committed Jul 1, 2024
1 parent c98a175 commit 4c97a24
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions crates/eips/src/eip7702/auth_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,9 @@ impl Authorization {
pub fn signature_hash(&self) -> B256 {
use super::constants::MAGIC;

#[derive(RlpEncodable)]
struct Auth {
chain_id: ChainId,
nonce: OptionalNonce,
address: Address,
}

let mut buf = Vec::new();
buf.put_u8(MAGIC);

Auth { chain_id: self.chain_id, nonce: self.nonce, address: self.address }.encode(&mut buf);
self.encode(&mut buf);

keccak256(buf)
}
Expand Down

0 comments on commit 4c97a24

Please sign in to comment.