From 6bac80be44e49e3c4d7c7e0f166ec78687b6c40c Mon Sep 17 00:00:00 2001 From: James Date: Mon, 6 May 2024 13:12:53 -0400 Subject: [PATCH] feat: fromimpl --- crates/types/src/bindings.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/crates/types/src/bindings.rs b/crates/types/src/bindings.rs index c4a55af..e26c864 100644 --- a/crates/types/src/bindings.rs +++ b/crates/types/src/bindings.rs @@ -5,3 +5,15 @@ sol!( Zenith, "abi/zenith.json" ); + +impl From<&Zenith::BlockSubmitted> for Zenith::BlockHeader { + fn from(event: &Zenith::BlockSubmitted) -> Zenith::BlockHeader { + Zenith::BlockHeader { + rollupChainId: event.rollupChainId, + sequence: event.sequence, + confirmBy: event.confirmBy, + gasLimit: event.gasLimit, + rewardAddress: event.rewardAddress, + } + } +}