From 3c7e994066787be2d8a6c3f04c452ba7219e6316 Mon Sep 17 00:00:00 2001 From: lyfsn Date: Mon, 11 Mar 2024 20:29:25 +0800 Subject: [PATCH] fix: Use hex string for blockNumber param in eth_getBlockReceipts --- ethstore.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ethstore.go b/ethstore.go index 1d9adad..38708dc 100644 --- a/ethstore.go +++ b/ethstore.go @@ -643,8 +643,8 @@ func batchRequestReceipts(ctx context.Context, elClient *gethRPC.Client, txHashe func requestReceipts(ctx context.Context, elClient *gethRPC.Client, blockNumber uint64) ([]*TxReceipt, error) { txReceipts := make([]*TxReceipt, 0) - - ioErr := elClient.CallContext(ctx, &txReceipts, "eth_getBlockReceipts", blockNumber) + blockNumberHex := fmt.Sprintf("0x%x", blockNumber) + ioErr := elClient.CallContext(ctx, &txReceipts, "eth_getBlockReceipts", blockNumberHex) if ioErr != nil { return nil, fmt.Errorf("io-error when fetching tx-receipts: %w", ioErr) }