Skip to content

Commit 2791180

Browse files
committed
feat: registered getBlockReceipts to rpcMethodRegistry
Signed-off-by: Logan Nguyen <[email protected]>
1 parent 5d3d333 commit 2791180

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/relay/src/lib/eth.ts

+8
Original file line numberDiff line numberDiff line change
@@ -3287,10 +3287,18 @@ export class EthImpl implements Eth {
32873287

32883288
/**
32893289
* Gets all transaction receipts for a block by block hash or block number.
3290+
*
3291+
* @rpcMethod Exposed as eth_getBlockReceipts RPC endpoint
3292+
* @rpcParamValidationRules Applies JSON-RPC parameter validation according to the API specification
3293+
*
32903294
* @param {string } blockHashOrBlockNumber The block hash, block number, or block tag
32913295
* @param {RequestDetails} requestDetails The request details for logging and tracking
32923296
* @returns {Promise<Receipt[]>} Array of transaction receipts for the block
32933297
*/
3298+
@rpcMethod
3299+
@rpcParamValidationRules({
3300+
0: { type: ParamType.BLOCK_NUMBER_OR_HASH, required: true },
3301+
})
32943302
public async getBlockReceipts(blockHashOrBlockNumber: string, requestDetails: RequestDetails): Promise<Receipt[]> {
32953303
const requestIdPrefix = requestDetails.formattedRequestId;
32963304
if (this.logger.isLevelEnabled('trace')) {

0 commit comments

Comments
 (0)