Skip to content

Commit

Permalink
feat: bundle data API (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
irrun authored Jan 6, 2025
1 parent 31984f2 commit 8c1e757
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions BEPs/BEP322.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,60 @@ Response:
}
```

##### 4.4.1.3 Query Bundle Data

This API enables MEV data analysts to query bundle information from builders.
It is particularly useful for MEV data providers who need to analyze market trends and create analytics dashboards.
For instance, to accurately measure MEV market activity, providers can use this API to display metrics such as
daily bundle counts and bundles per block in their analytics panels.

Request:

```json
{
"jsonrpc": "2.0",
"method": "eth_bundles",
"params": [
"0x1",
"0x3"
],
"id": 1
}
```

Params:

1. String - `FromBlock`, It is the hex value of a block number.
2. String - `ToBlock`, It is either the hex value of a block number OR block tags: "latest", "pending". It should be
no less than `FromBlock` and less than `FromBlock+100`.

Response:

* Return bundles whose first-received-height(`receivedBlock`) is within the block range [`FromBlock`, `ToBlock`].

```json
{
"jsonrpc": "2.0",
"result": [
{
"receivedBlock": "0x1",
"bundles": [
["0x88...44b", "0x89..45b"], // tx hase list in the bundle
["0x90...46b"]
]
},
{
"receivedBlock": "0x2",
"bundles": [
["0x23...24b", "0x39..45b"],
["0x43...55a", "0x45..33a", "0x39..45b"] // it is possible that a same tx hash exists in different block
]
}
],
"id": 1
}
```

#### 4.4.2 Validator APIs

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

0 comments on commit 8c1e757

Please sign in to comment.