From 4c97a2490bf94b2d3711980ab013a8f1ade12420 Mon Sep 17 00:00:00 2001 From: Oliver Nordbjerg Date: Mon, 1 Jul 2024 11:41:35 +0200 Subject: [PATCH] chore: clean up 7702 encoding Ref https://github.com/ethereum/EIPs/pull/8679 --- crates/eips/src/eip7702/auth_list.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/crates/eips/src/eip7702/auth_list.rs b/crates/eips/src/eip7702/auth_list.rs index faa2c160ada..132981aaef1 100644 --- a/crates/eips/src/eip7702/auth_list.rs +++ b/crates/eips/src/eip7702/auth_list.rs @@ -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) }