@@ -221,10 +221,12 @@ pub trait EngineApi<Engine: EngineTypes> {
221221
222222/// A subset of the ETH rpc interface: <https://ethereum.github.io/execution-apis/api-documentation/>
223223///
224+ /// This also includes additional eth functions required by optimism.
225+ ///
224226/// Specifically for the engine auth server: <https://github.com/ethereum/execution-apis/blob/main/src/engine/common.md#underlying-protocol>
225227#[ cfg_attr( not( feature = "client" ) , rpc( server, namespace = "eth" ) ) ]
226228#[ cfg_attr( feature = "client" , rpc( server, client, namespace = "eth" ) ) ]
227- pub trait EngineEthApi < B : RpcObject > {
229+ pub trait EngineEthApi < B : RpcObject , R : RpcObject > {
228230 /// Returns an object with data about the sync status or false.
229231 #[ method( name = "syncing" ) ]
230232 fn syncing ( & self ) -> RpcResult < SyncStatus > ;
@@ -259,10 +261,18 @@ pub trait EngineEthApi<B: RpcObject> {
259261 #[ method( name = "getBlockByNumber" ) ]
260262 async fn block_by_number ( & self , number : BlockNumberOrTag , full : bool ) -> RpcResult < Option < B > > ;
261263
264+ /// Returns all transaction receipts for a given block.
265+ #[ method( name = "getBlockReceipts" ) ]
266+ async fn block_receipts ( & self , block_id : BlockId ) -> RpcResult < Option < Vec < R > > > ;
267+
262268 /// Sends signed transaction, returning its hash.
263269 #[ method( name = "sendRawTransaction" ) ]
264270 async fn send_raw_transaction ( & self , bytes : Bytes ) -> RpcResult < B256 > ;
265271
272+ /// Returns the receipt of a transaction by transaction hash.
273+ #[ method( name = "getTransactionReceipt" ) ]
274+ async fn transaction_receipt ( & self , hash : B256 ) -> RpcResult < Option < R > > ;
275+
266276 /// Returns logs matching given filter object.
267277 #[ method( name = "getLogs" ) ]
268278 async fn logs ( & self , filter : Filter ) -> RpcResult < Vec < Log > > ;
0 commit comments