Skip to content

Commit 7198adc

Browse files
authored
Add eth_getLogs documentation for Flashblocks (#455)
1 parent 35bac04 commit 7198adc

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

docs/base-chain/flashblocks/apps.mdx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,34 @@ curl https://sepolia-preconf.base.org -X POST -H "Content-Type: application/json
172172
}
173173
```
174174

175+
#### eth_getLogs
176+
177+
Use the `pending` tag for `toBlock` to retrieve logs from the latest Flashblock:
178+
```
179+
curl https://sepolia-preconf.base.org -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"fromBlock":"latest","toBlock":"pending","address":"0x...","topics":["0x..."]}],"id":1}'
180+
```
181+
182+
**Example Response**
183+
```
184+
{
185+
"jsonrpc": "2.0",
186+
"id": 1,
187+
"result": [
188+
{
189+
"address": "0x...",
190+
"topics": ["0x..."],
191+
"data": "0x...",
192+
"blockNumber": "0x1234",
193+
"transactionHash": "0x...",
194+
"transactionIndex": "0x0",
195+
"blockHash": "0x...",
196+
"logIndex": "0x0",
197+
"removed": false
198+
}
199+
]
200+
}
201+
```
202+
175203
### Libraries
176204

177205
You will need to use a Flashblocks-aware RPC endpoint to use Flashblocks with the following libraries:

docs/base-chain/flashblocks/docs.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ Currently the ones that have flashblocks enabled are:
6767
- eth_call (with pending tag)
6868
- eth_simulateV1 (with pending tag)
6969
- eth_estimateGas (with pending tag)
70+
- eth_getLogs (with pending tag)
7071

7172
## Node
7273

0 commit comments

Comments
 (0)