diff --git a/internal/ethapi/api_test.go b/internal/ethapi/api_test.go index 22faf56834..b95d15ea1d 100644 --- a/internal/ethapi/api_test.go +++ b/internal/ethapi/api_test.go @@ -1838,6 +1838,7 @@ func setupReceiptBackend(t *testing.T, genBlocks int) (*testBackend, []common.Ha }} tx, err = types.SignTx(types.NewTx(&types.AccessListTx{Nonce: uint64(i), To: nil, Gas: 58100, GasPrice: b.BaseFee(), Data: common.FromHex("0x60806040"), AccessList: accessList}), signer, acc1Key) case 5: + // blob tx fee := big.NewInt(500) fee.Add(fee, b.BaseFee()) tx, err = types.SignTx(types.NewTx(&types.BlobTx{ @@ -2229,6 +2230,30 @@ func TestRPCGetBlockReceipts(t *testing.T) { test: rpc.BlockNumberOrHashWithNumber(rpc.BlockNumber(genBlocks + 1)), want: `null`, }, + // 11. block with blobl tx + { + test: rpc.BlockNumberOrHashWithNumber(rpc.BlockNumber(6)), + want: `[ + { + "blobGasPrice": "0x1", + "blobGasUsed": "0x20000", + "blockHash": "0x2ffcbc982ea819900e22b96c72bc85c8c64e080b9479d1c68ee49f55564816e7", + "blockNumber": "0x6", + "contractAddress": null, + "cumulativeGasUsed": "0x5208", + "effectiveGasPrice": "0x1b09d63b", + "from": "0x703c4b2bd70c169f5717101caee543299fc946c7", + "gasUsed": "0x5208", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "status": "0x1", + "to": "0x0d3ab14bbad3d99f4203bd7a11acb94882050e7e", + "transactionHash": "0xb51ee3d2a89ba5d5623c73133c8d7a6ba9fb41194c17f4302c21b30994a1180f", + "transactionIndex": "0x0", + "type": "0x3" + } +]`, + }, } for i, tt := range testSuite {