Skip to content

Commit 15085e5

Browse files
Add test to check tracing range of blocks
1 parent 034ce5d commit 15085e5

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

utils/e2e-tests/ts/tests/evm-tracing/traceFilter.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,32 @@ describe("test trace filter logic", () => {
2222
devClients = eth.devClientsFromNodeWebSocket(node, cleanup.push);
2323
}, 60 * 1000);
2424

25+
it("should support tracing range of blocks", async () => {
26+
const [alice, bob] = devClients;
27+
28+
const txHash = await alice.sendTransaction({
29+
to: bob.account.address,
30+
value: 1_000_000n,
31+
});
32+
const txReceipt = await publicClient.waitForTransactionReceipt({
33+
hash: txHash,
34+
});
35+
const blockNumberHex = txReceipt.blockNumber.toString(16);
36+
37+
const response = await customRpcRequest(
38+
node.meta.rpcUrlHttp,
39+
"trace_filter",
40+
[
41+
{
42+
fromBlock: "0x00",
43+
toBlock: blockNumberHex,
44+
},
45+
],
46+
);
47+
48+
expect(response.length).to.equal(txReceipt.blockNumber);
49+
});
50+
2551
it("should support filtering trace per fromAddress/toAddress", async () => {
2652
const [alice, bob] = devClients;
2753

0 commit comments

Comments
 (0)