Skip to content

Commit

Permalink
removed duplicate fields
Browse files Browse the repository at this point in the history
  • Loading branch information
remoterami committed Aug 1, 2024
1 parent f7fc84c commit 189f0be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
12 changes: 2 additions & 10 deletions backend/pkg/api/types/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,13 @@ type BlockSummary struct {
type InternalGetBlockResponse ApiDataResponse[BlockSummary]

type BlockExecutionPayload struct {
Block uint64 `json:"block"`
BlockHash Hash `json:"block_hash"`
ParentHash Hash `json:"parent_hash"`
PriorityFeesRecipient Address `json:"priority_fees_recipient"`
PriorityFees decimal.Decimal `json:"priority_fees"`
GasUsed uint64 `json:"gas_used"`
GasLimit uint64 `json:"gas_limit"`
BaseFeePerGas decimal.Decimal `json:"base_fee_per_gas"`
BaseFees decimal.Decimal `json:"base_fees"`
Transactions struct {
General uint64 `json:"general"`
Blob uint64 `json:"blob"`
} `json:"transactions"`
Time int64 `json:"time"`
ExtraData string `json:"extra_data,omitempty"`
Graffiti string `json:"graffiti"`
}

type BlockConsensusLayer struct {
Expand All @@ -49,6 +40,7 @@ type BlockConsensusLayer struct {
Deposits uint64 `json:"deposit"`
SyncCommittee BlockSyncCommittee `json:"sync_committee"`
Eth1Data BlockEth1Data `json:"eth1_data"`
Graffiti string `json:"graffiti"`
}

type BlockSyncCommittee struct {
Expand Down Expand Up @@ -114,7 +106,7 @@ type BlockOverview struct {
Transactions *struct {
General uint64 `json:"general"`
Internal uint64 `json:"internal"`
Blob uint64 `json:"blob"`
Blob uint64 `json:"blob,omitempty"`
} `json:"transactions,omitempty"`
BlockRoot Hash `json:"block_root,omitempty"`
ParentRoot Hash `json:"parent_root,omitempty"`
Expand Down
12 changes: 2 additions & 10 deletions frontend/types/api/block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,13 @@ export interface BlockSummary {
}
export type InternalGetBlockResponse = ApiDataResponse<BlockSummary>;
export interface BlockExecutionPayload {
block: number /* uint64 */;
block_hash: Hash;
parent_hash: Hash;
priority_fees_recipient: Address;
priority_fees: string /* decimal.Decimal */;
gas_used: number /* uint64 */;
gas_limit: number /* uint64 */;
base_fee_per_gas: string /* decimal.Decimal */;
base_fees: string /* decimal.Decimal */;
transactions: {
general: number /* uint64 */;
blob: number /* uint64 */;
};
time: number /* int64 */;
extra_data?: string;
graffiti: string;
}
export interface BlockConsensusLayer {
state_root: Hash;
Expand All @@ -49,6 +40,7 @@ export interface BlockConsensusLayer {
deposit: number /* uint64 */;
sync_committee: BlockSyncCommittee;
eth1_data: BlockEth1Data;
graffiti: string;
}
export interface BlockSyncCommittee {
participation: number /* float64 */;
Expand Down Expand Up @@ -116,7 +108,7 @@ export interface BlockOverview {
transactions?: {
general: number /* uint64 */;
internal: number /* uint64 */;
blob: number /* uint64 */;
blob?: number /* uint64 */;
};
block_root?: Hash;
parent_root?: Hash;
Expand Down

0 comments on commit 189f0be

Please sign in to comment.