Documentation
¶
Index ¶
- Constants
- func HexToECDSA(privateKey string) *ecdsa.PrivateKey
- func HextoBlockNumber(blockNumber uint64) string
- func RelayDefaultRPC(netType string) (string, error)
- type CallBundleParams
- type CallBundleResponse
- type FlashbotLaunch
- func (f *FlashbotLaunch) CallBundle(transaction []string, blockNumber uint64) (*CallBundleResponse, error)
- func (f *FlashbotLaunch) GetUserStats(blockNumber uint64) (*UserStatsResponse, error)
- func (f *FlashbotLaunch) SendBundle(transactions []string, blockNumber uint64) (*SendBundleResponse, error)
- func (f *FlashbotLaunch) SendPrivateTransaction(tx string, maxBlockNumber string) (*SendPrivateTxResponse, error)
- type SendBundleParams
- type SendBundleResponse
- type SendPrivateTx
- type SendPrivateTxResponse
- type UserStatsResponse
Constants ¶
View Source
const ( // `eth_sendBundle` can be used to send your bundles to the Flashbots builder. MethodSendBundle = "eth_sendBundle" // eth_callBundle can be used to simulate a bundle against a specific block number, // including simulating a bundle at the top of the next block. MethodCallBundle = "eth_callBundle" // `eth_sendPrivateTransaction` used to send a single transaction to Flashbots. MethodSendPrivateTransaction = "eth_sendPrivateTransaction" // `eth_cancelPrivateTransaction` Method stops private // transactions from being submitted for future blocks. MethodCancelPrivateTransaction = "eth_cancelPrivateTransaction" MethodEstimateGasBundle = "eth_estimateGasBundle" MethodGetUserStats = "flashbots_getUserStats" MethodGetBundleStats = "flashbots_getBundleStats" )
Variables ¶
This section is empty.
Functions ¶
func HexToECDSA ¶
func HexToECDSA(privateKey string) *ecdsa.PrivateKey
func HextoBlockNumber ¶
func RelayDefaultRPC ¶
Types ¶
type CallBundleParams ¶
type CallBundleParams struct { Transactions []string `json:"txs"` BlockNumber string `json:"blockNumber"` StateBlockNumber string `json:"stateBlockNumber"` Timestamp int64 `json:"timestamp,omitempty"` }
############
callBundle
############
type CallBundleResponse ¶
type FlashbotLaunch ¶
type FlashbotLaunch struct { Rpc string PrivateKey *ecdsa.PrivateKey }
func New ¶
func New(relayRPC string) *FlashbotLaunch
func (*FlashbotLaunch) CallBundle ¶
func (f *FlashbotLaunch) CallBundle(transaction []string, blockNumber uint64) (*CallBundleResponse, error)
func (*FlashbotLaunch) GetUserStats ¶
func (f *FlashbotLaunch) GetUserStats(blockNumber uint64) (*UserStatsResponse, error)
func (*FlashbotLaunch) SendBundle ¶
func (f *FlashbotLaunch) SendBundle(transactions []string, blockNumber uint64) (*SendBundleResponse, error)
func (*FlashbotLaunch) SendPrivateTransaction ¶
func (f *FlashbotLaunch) SendPrivateTransaction(tx string, maxBlockNumber string) (*SendPrivateTxResponse, error)
type SendBundleParams ¶
type SendBundleParams struct { Transactions []string `json:"txs"` BlockNumber string `json:"blockNumber"` MinTimestamp int64 `json:"minTimestamp,omitempty"` MaxTimestamp int64 `json:"maxTimestamp,omitempty"` RevertingTxHashes []string `json:"revertingTxHashes,omitempty"` }
############
sendBundle
############
type SendBundleResponse ¶
type SendPrivateTx ¶
type SendPrivateTx struct { Transaction string `json:"txs"` MaxBlockNumber string `json:"maxBlockNumber"` Preferences map[string]bool `json:"preferences"` }
####################
PrivateTransaction
####################
type SendPrivateTxResponse ¶
type UserStatsResponse ¶
type UserStatsResponse struct { ID uint `json:"id"` Version string `json:"jsonrpc"` Result *userStats `json:"result"` }
###########
userStats
###########
Click to show internal directories.
Click to hide internal directories.