Skip to content

Commit

Permalink
add gencodec directive for ExecutableDataV2 (ethereum#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
roberto-bayardo authored Jan 10, 2023
1 parent 2b556db commit 4c3a671
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
46 changes: 46 additions & 0 deletions core/beacon/gen_edv2.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions core/beacon/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,18 @@ type executableDataMarshaling struct {
Transactions []hexutil.Bytes
}

//go:generate go run github.com/fjl/gencodec -type ExecutableDataV2 -field-override executableDataV2Marshaling -out gen_edv2.go

type ExecutableDataV2 struct {
ExecutionPayload *ExecutableData `json:"executionPayload" gencodec:"required"`
BlockValue *big.Int `json:"blockValue" gencodec:"required"`
}

// JSON type overrides for ExecutableDataV2.
type executableDataV2Marshaling struct {
BlockValue *hexutil.Big
}

type PayloadStatusV1 struct {
Status string `json:"status"`
LatestValidHash *common.Hash `json:"latestValidHash"`
Expand Down

0 comments on commit 4c3a671

Please sign in to comment.