Documentation ¶
Overview ¶
Package flashbot provides a structured way to send TX to the flashbot relays.
Index ¶
- type Api
- type BundleStats
- type BundleUserStats
- type CancelPrivateTransactionResponse
- type Error
- type Flashbot
- func (self *Flashbot) Api() *Api
- func (self *Flashbot) CallBundle(ctx context.Context, txsHex []string, _blockNumState uint64) (*Response, error)
- func (self *Flashbot) CancelPrivateTransaction(ctx context.Context, txHash common.Hash) (*CancelPrivateTransactionResponse, error)
- func (self *Flashbot) GetBundleStats(ctx context.Context, bundleHash string, blockNum uint64) (*ResultBundleStats, error)
- func (self *Flashbot) GetUserStats(ctx context.Context, blockNum uint64) (*ResultUserStats, error)
- func (self *Flashbot) PrvKey() *ecdsa.PrivateKey
- func (self *Flashbot) SendBundle(ctx context.Context, txsHex []string, blockNum uint64) (*Response, error)
- func (self *Flashbot) SendPrivateTransaction(ctx context.Context, txHex string, blockNum uint64, fast bool) (*SendPrivateTransactionResponse, error)
- func (self *Flashbot) SetKey(prvKey *ecdsa.PrivateKey) error
- func (self *Flashbot) SimulateBundle(ctx context.Context, txsHex []string, blockNum uint64) (*SimBundleResult, error)
- type Flashboter
- type Inclusion
- type Metadata
- type ParamsCall
- type ParamsCancelPrivateTransaction
- type ParamsPrivateTransaction
- type ParamsSend
- type ParamsStats
- type Response
- type Result
- type ResultBundleStats
- type ResultUserStats
- type SendPrivateTransactionResponse
- type SimBundleResult
- type SimTx
- type SimulateBundleParams
- type Tx
- type TxResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api struct { URL string SupportsSimulation bool MethodCall string MethodSend string CustomHeaders map[string]string }
func DefaultApi ¶
type BundleStats ¶
type BundleUserStats ¶
type BundleUserStats struct { IsHighPriority bool `json:"is_high_priority,omitempty"` AllTimeMinerPayments string `json:"all_time_miner_payments,omitempty"` AllTimeGasSimulated string `json:"all_time_gas_simulated,omitempty"` Last7dMinerPayments string `json:"last_7d_miner_payments,omitempty"` Last7dGasSimulated string `json:"last_7d_gas_simulated,omitempty"` Last1dMinerPayments string `json:"last_1d_miner_payments,omitempty"` Last1dGasSimulated string `json:"last_1d_gas_simulated,omitempty"` }
type Flashbot ¶
type Flashbot struct {
// contains filtered or unexported fields
}
func (*Flashbot) CallBundle ¶
func (*Flashbot) CancelPrivateTransaction ¶
func (*Flashbot) GetBundleStats ¶
func (*Flashbot) GetUserStats ¶
func (*Flashbot) PrvKey ¶
func (self *Flashbot) PrvKey() *ecdsa.PrivateKey
func (*Flashbot) SendBundle ¶
func (*Flashbot) SendPrivateTransaction ¶
func (*Flashbot) SimulateBundle ¶
type Flashboter ¶
type Flashboter interface { SendPrivateTransaction(ctx context.Context, txHex string, blockNum uint64, fast bool) (*SendPrivateTransactionResponse, error) CancelPrivateTransaction(ctx context.Context, txHash common.Hash) (*CancelPrivateTransactionResponse, error) SendBundle(ctx context.Context, txsHex []string, blockNum uint64) (*Response, error) CallBundle(ctx context.Context, txsHex []string, blockNumState uint64) (*Response, error) GetBundleStats(ctx context.Context, bundleHash string, blockNum uint64) (*ResultBundleStats, error) GetUserStats(ctx context.Context, blockNum uint64) (*ResultUserStats, error) SimulateBundle(ctx context.Context, txsHex []string, blockNum uint64) (*SimBundleResult, error) Api() *Api }
func New ¶
func New(prvKey *ecdsa.PrivateKey, api *Api) (Flashboter, error)
func NewAll ¶
func NewAll(netID int64, prvKey *ecdsa.PrivateKey, additional ...*Api) ([]Flashboter, error)
func NewMulti ¶
func NewMulti(netID int64, prvKey *ecdsa.PrivateKey, apis ...*Api) ([]Flashboter, error)
type ParamsCall ¶
type ParamsCancelPrivateTransaction ¶
type ParamsCancelPrivateTransaction struct {
TxHash string `json:"txHash,omitempty"`
}
type ParamsSend ¶
type ParamsStats ¶
type ResultBundleStats ¶
type ResultBundleStats struct { Error Result BundleStats }
type ResultUserStats ¶
type ResultUserStats struct { Error Result BundleUserStats }
type SimBundleResult ¶
type SimBundleResult struct { Result struct { Error string `json:"error,omitempty"` Success bool `json:"success"` StateBlock string `json:"stateBlock"` MevGasPrice string `json:"mevGasPrice"` Profit string `json:"profit"` RefundableValue string `json:"refundableValue"` GasUsed string `json:"gasUsed"` Logs []any `json:"logs"` } `json:"result"` Error `json:"error,omitempty"` }
type SimulateBundleParams ¶
Click to show internal directories.
Click to hide internal directories.