@@ -254,6 +254,25 @@ pub trait EthApi<
254254 #[ method( name = "getHeaderByHash" ) ]
255255 async fn header_by_hash ( & self , hash : B256 ) -> RpcResult < Option < H > > ;
256256
257+ /// Returns the finalized block header.
258+ ///
259+ /// The `verified_validator_num` parameter is provided for BSC compatibility but is not used
260+ /// in standard Ethereum. The finalized block is determined by the Beacon Chain consensus
261+ /// (Casper FFG) and requires 2/3+ validator attestations.
262+ #[ method( name = "getFinalizedHeader" ) ]
263+ async fn finalized_header ( & self , verified_validator_num : u64 ) -> RpcResult < Option < H > > ;
264+
265+ /// Returns the finalized block.
266+ ///
267+ /// The `verified_validator_num` parameter is provided for BSC compatibility but is not used
268+ /// in standard Ethereum. The finalized block is determined by the Beacon Chain consensus
269+ /// (Casper FFG) and requires 2/3+ validator attestations.
270+ ///
271+ /// If `full` is true, the block object will contain all transaction objects,
272+ /// otherwise it will only contain the transaction hashes.
273+ #[ method( name = "getFinalizedBlock" ) ]
274+ async fn finalized_block ( & self , verified_validator_num : u64 , full : bool ) -> RpcResult < Option < B > > ;
275+
257276 /// `eth_simulateV1` executes an arbitrary number of transactions on top of the requested state.
258277 /// The transactions are packed into individual blocks. Overrides can be provided.
259278 #[ method( name = "simulateV1" ) ]
@@ -776,6 +795,18 @@ where
776795 Ok ( EthBlocks :: rpc_block_header ( self , hash. into ( ) ) . await ?)
777796 }
778797
798+ /// Handler for: `eth_getFinalizedHeader`
799+ async fn finalized_header ( & self , verified_validator_num : u64 ) -> RpcResult < Option < RpcHeader < T :: NetworkTypes > > > {
800+ trace ! ( target: "rpc::eth" , verified_validator_num, "Serving eth_getFinalizedHeader" ) ;
801+ Ok ( EthBlocks :: rpc_finalized_header ( self , verified_validator_num) . await ?)
802+ }
803+
804+ /// Handler for: `eth_getFinalizedBlock`
805+ async fn finalized_block ( & self , verified_validator_num : u64 , full : bool ) -> RpcResult < Option < RpcBlock < T :: NetworkTypes > > > {
806+ trace ! ( target: "rpc::eth" , verified_validator_num, ?full, "Serving eth_getFinalizedBlock" ) ;
807+ Ok ( EthBlocks :: rpc_finalized_block ( self , verified_validator_num, full) . await ?)
808+ }
809+
779810 /// Handler for: `eth_simulateV1`
780811 async fn simulate_v1 (
781812 & self ,
0 commit comments