Skip to content

Commit

Permalink
feat: fromimpl
Browse files Browse the repository at this point in the history
  • Loading branch information
prestwich committed May 6, 2024
1 parent 060c7aa commit 6bac80b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions crates/types/src/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}
}

0 comments on commit 6bac80b

Please # to comment.