Skip to content

Commit

Permalink
feat(refunds): Add flashbots_setFeeRefundRecipient documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanschneider authored Aug 12, 2024
1 parent ba98fd9 commit 3d29912
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/flashbots-auction/advanced/rpc-endpoint.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,37 @@ where
- `consideredByBuildersAt`: indicates time at which each builder selected the bundle to be included in the target block
- `sealedByBuildersAt`: indicates time at which each builder sealed a block containing the bundle

### flashbots_setFeeRefundRecipient

The `flashbots_setFeeRefundRecipient` JSON-RPC method allows a user to "delegate" their fee refunds to a specific wallet address. Two addresses must be provided, the first is the address associated with the signing key used to authenticate your request, while the second is the address to send refunds to.

```json
{
"jsonrpc": "2.0",
"id": 1,
"method": "flashbots_setFeeRefundRecipient",
"params": [
"0xD2824D2D7D6399a4b9A47F258B870D2AFb213948",
"0xa273A268CE96E54cF6a7D879B7d016F57E396F48"
]
}
```

If the first address matches the authentication signature, then a response with `from` and `to` fields in the result will be returned:

```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"from":"0xd2824d2d7d6399a4b9a47f258b870d2afb213948",
"to":"0xa273a268ce96e54cf6a7d879b7d016f57e396f48"
}
}
```

If the signature is invalid or does not match the first address, an appropriate error will be returned instead.

### API Response

- All method supports JSON-RPC standards for success response and not supported for error response(V2 methods are exceptions).
Expand Down

0 comments on commit 3d29912

Please sign in to comment.