Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.

Commit 2981de1

Browse files
authored
private-tx preferences: fast mode (metachris#10)
1 parent 8e662ad commit 2981de1

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

examples/sendPrivateTransaction/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ func main() {
1717

1818
sendPrivTxArgs := flashbotsrpc.FlashbotsSendPrivateTransactionRequest{
1919
Tx: "0xYOUR_RAW_TX",
20+
Preferences: &flashbotsrpc.FlashbotsPrivateTxPreferences{
21+
Fast: true,
22+
},
2023
}
2124

2225
txHash, err := rpc.FlashbotsSendPrivateTransaction(privateKey, sendPrivTxArgs)

types.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,12 @@ type FlashbotsSendBundleResponse struct {
406406

407407
// sendPrivateTransaction
408408
type FlashbotsSendPrivateTransactionRequest struct {
409-
Tx string `json:"tx"`
409+
Tx string `json:"tx"`
410+
Preferences *FlashbotsPrivateTxPreferences `json:"preferences,omitempty"`
411+
}
412+
413+
type FlashbotsPrivateTxPreferences struct {
414+
Fast bool `json:"fast"`
410415
}
411416

412417
// cancelPrivateTransaction

0 commit comments

Comments
 (0)