Skip to content

Commit

Permalink
feat(derive): Add L1BlockInfoTx (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby authored Apr 14, 2024
1 parent 83ea2c9 commit ce4fab6
Show file tree
Hide file tree
Showing 3 changed files with 507 additions and 0 deletions.
11 changes: 11 additions & 0 deletions crates/derive/src/types/deposits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ pub enum DepositSourceDomain {
Upgrade(UpgradeDepositSource),
}

impl DepositSourceDomain {
/// Returns the source hash.
pub fn source_hash(&self) -> B256 {
match self {
Self::User(ds) => ds.source_hash(),
Self::L1Info(ds) => ds.source_hash(),
Self::Upgrade(ds) => ds.source_hash(),
}
}
}

/// A deposit transaction source.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct UserDepositSource {
Expand Down
Loading

0 comments on commit ce4fab6

Please sign in to comment.