File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
utils/e2e-tests/ts/tests/evm-tracing Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,42 @@ 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 firstTxHash = await alice . sendTransaction ( {
29+ to : bob . account . address ,
30+ value : 1_000_000n ,
31+ } ) ;
32+ await publicClient . waitForTransactionReceipt ( {
33+ hash : firstTxHash ,
34+ } ) ;
35+
36+ const secondTxHash = await alice . sendTransaction ( {
37+ to : bob . account . address ,
38+ value : 1_000_000n ,
39+ } ) ;
40+ const secondTxReceipt = await publicClient . waitForTransactionReceipt ( {
41+ hash : secondTxHash ,
42+ } ) ;
43+
44+ const blockNumber = secondTxReceipt . blockNumber ;
45+ const blockNumberHex = secondTxReceipt . blockNumber . toString ( 16 ) ;
46+
47+ const response = await customRpcRequest (
48+ node . meta . rpcUrlHttp ,
49+ "trace_filter" ,
50+ [
51+ {
52+ fromBlock : "0x00" ,
53+ toBlock : blockNumberHex ,
54+ } ,
55+ ] ,
56+ ) ;
57+
58+ expect ( BigInt ( response . length ) ) . to . equal ( blockNumber ) ;
59+ } ) ;
60+
2561 it ( "should support filtering trace per fromAddress/toAddress" , async ( ) => {
2662 const [ alice , bob ] = devClients ;
2763
You can’t perform that action at this time.
0 commit comments