From e5e71025907f7c48abc7b9cfd578b4ac632340b7 Mon Sep 17 00:00:00 2001 From: Arsenii Kulikov Date: Tue, 22 Oct 2024 16:54:12 +0400 Subject: [PATCH] new_unchecked --- crates/eip7702/src/auth_list.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/eip7702/src/auth_list.rs b/crates/eip7702/src/auth_list.rs index ca153a2..20c7326 100644 --- a/crates/eip7702/src/auth_list.rs +++ b/crates/eip7702/src/auth_list.rs @@ -120,6 +120,11 @@ pub struct SignedAuthorization { } impl SignedAuthorization { + /// Creates a new signed authorization from raw signature values. + pub fn new_unchecked(inner: Authorization, y_parity: U8, r: U256, s: U256) -> Self { + Self { inner, y_parity, r, s } + } + /// Gets the `signature` for the authorization. Returns [`SignatureError`] if signature could /// not be constructed from vrs values. pub fn signature(&self) -> Result {