-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
Eth1block
container (#899)
- Loading branch information
1 parent
a1a45a0
commit 35151c1
Showing
3 changed files
with
41 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
defmodule Types.Eth1Block do | ||
@moduledoc """ | ||
Struct definition for `Eth1Block`. | ||
""" | ||
use LambdaEthereumConsensus.Container | ||
|
||
fields = [ | ||
:timestamp, | ||
:deposit_root, | ||
:deposit_count | ||
] | ||
|
||
@enforce_keys fields | ||
defstruct fields | ||
|
||
@type t :: %__MODULE__{ | ||
timestamp: Types.uint64(), | ||
deposit_root: Types.root(), | ||
deposit_count: Types.uint64() | ||
} | ||
|
||
@impl LambdaEthereumConsensus.Container | ||
def schema do | ||
[ | ||
timestamp: TypeAliases.uint64(), | ||
deposit_root: TypeAliases.root(), | ||
deposit_count: TypeAliases.uint64() | ||
] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters