Skip to content

Commit

Permalink
add l1BlockNumber field
Browse files Browse the repository at this point in the history
  • Loading branch information
belopash committed Jan 11, 2024
1 parent 3149008 commit 43cec6d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions evm/evm-processor/src/interfaces/evm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export interface EvmBlockHeader {
gasUsed: bigint
timestamp: number
baseFeePerGas: bigint
l1BlockNumber?: number
}


Expand Down
1 change: 1 addition & 0 deletions evm/evm-processor/src/mapping/entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export class BlockHeader {
gasUsed?: bigint
timestamp?: number
baseFeePerGas?: bigint
l1BlockNumber?: bigint

constructor(
height: number,
Expand Down
5 changes: 3 additions & 2 deletions evm/evm-processor/src/mapping/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ export function getBlockHeaderProps(fields: FieldSelection['block'], forArchive:
gasLimit: withSentinel('BlockHeader.gasLimit', -1n, QTY),
gasUsed: withSentinel('BlockHeader.gasUsed', -1n, QTY),
baseFeePerGas: withSentinel('BlockHeader.baseFeePerGas', -1n, QTY),
timestamp: withSentinel('BlockHeader.timestamp', 0, natural)
})
timestamp: withSentinel('BlockHeader.timestamp', 0, natural),
l1BlockNumber: option(natural),
})
}
}

Expand Down

0 comments on commit 43cec6d

Please sign in to comment.