Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bundle data API #460

Merged
merged 8 commits into from
Jan 6, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions BEPs/BEP322.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,57 @@ Response:
}
```

##### 4.4.1.3 Query Bundle Data

This API is used by mev data analysts to query the bundle information from the builder. For example, In order to be able
to directly reflect the mev market size, the mev data provider launches a bundle panel needs to show the number of
bundles per day or per block.

Request:

```json
{
"jsonrpc": "2.0",
"method": "mev_bundles",
"params": [
{
"fromBlock": "0x1",
"toBlock": "0x2"
unclezoro marked this conversation as resolved.
Show resolved Hide resolved
}
],
"id": 1
}
```
* The diff between fromBlock and toBlock should be less than 100.

Response:

```json
{
"jsonrpc": "2.0",
"result": [
{
"blockNumber": "0x1",
irrun marked this conversation as resolved.
Show resolved Hide resolved
"bundleCount": "0x2",
"bundles": [
{"txHashes": ["0x88...44b", "0x89..45b", "0x90...46b"]},
irrun marked this conversation as resolved.
Show resolved Hide resolved
{"txHashes": ["0x23...24b", "0x39..45b"]}
]
},
{
"blockNumber": "0x2",
"bundleCount": "0x3",
"bundles": [
{"txHashes": ["0x88...44b", "0x89..45b", "0x90...46b"]},
{"txHashes": ["0x23...24b", "0x39..45b"]},
{"txHashes": ["0x27...f4b", "0x94..4cb"]}
]
}
],
"id": 1
}
```

#### 4.4.2 Validator APIs

The following APIs should be implemented on the validator side or BSC clients.
Expand Down