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(refunds): Add flashbots_setFeeRefundRecipient documentation. #567

Merged
merged 2 commits into from
Aug 12, 2024
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
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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Could be useful to make "fee refunds" a link back to the docs on gas fee refunds here https://docs.flashbots.net/flashbots-auction/advanced/gas-fee-refunds

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, updated in fccfde4 and tested on vercel.

ryanschneider marked this conversation as resolved.
Show resolved Hide resolved

```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
Loading