Documentation ¶
Index ¶
- Variables
- func BigToHex(bigInt big.Int) string
- func Eth1() *big.Int
- func IntToHex(i int) string
- func ParseBigInt(value string) (big.Int, error)
- func ParseInt(value string) (int, error)
- func TxToRlp(tx *types.Transaction) string
- func WithDebug(enabled bool) func(rpc *FlashbotsRPC)
- func WithHttpClient(client httpClient) func(rpc *FlashbotsRPC)
- func WithLogger(l logger) func(rpc *FlashbotsRPC)
- type Block
- type CallBundleLog
- type EthereumAPI
- type FilterParams
- type FlashbotsCallBundleParam
- type FlashbotsCallBundleResponse
- type FlashbotsCallBundleResult
- type FlashbotsCancelPrivateTransactionRequest
- type FlashbotsRPC
- func (rpc *FlashbotsRPC) Call(method string, params ...interface{}) (json.RawMessage, error)
- func (rpc *FlashbotsRPC) CallWithFlashbotsSignature(method string, privKey *ecdsa.PrivateKey, params ...interface{}) (json.RawMessage, error)
- func (rpc *FlashbotsRPC) Eth1() *big.Int
- func (rpc *FlashbotsRPC) EthAccounts() ([]string, error)
- func (rpc *FlashbotsRPC) EthBlockNumber() (int, error)
- func (rpc *FlashbotsRPC) EthCall(transaction T, tag string) (string, error)
- func (rpc *FlashbotsRPC) EthCoinbase() (string, error)
- func (rpc *FlashbotsRPC) EthEstimateGas(transaction T) (int, error)
- func (rpc *FlashbotsRPC) EthGasPrice() (big.Int, error)
- func (rpc *FlashbotsRPC) EthGetBalance(address, block string) (big.Int, error)
- func (rpc *FlashbotsRPC) EthGetBlockByHash(hash string, withTransactions bool) (*Block, error)
- func (rpc *FlashbotsRPC) EthGetBlockByNumber(number int, withTransactions bool) (*Block, error)
- func (rpc *FlashbotsRPC) EthGetBlockTransactionCountByHash(hash string) (int, error)
- func (rpc *FlashbotsRPC) EthGetBlockTransactionCountByNumber(number int) (int, error)
- func (rpc *FlashbotsRPC) EthGetCode(address, block string) (string, error)
- func (rpc *FlashbotsRPC) EthGetCompilers() ([]string, error)
- func (rpc *FlashbotsRPC) EthGetFilterChanges(filterID string) ([]Log, error)
- func (rpc *FlashbotsRPC) EthGetFilterLogs(filterID string) ([]Log, error)
- func (rpc *FlashbotsRPC) EthGetLogs(params FilterParams) ([]Log, error)
- func (rpc *FlashbotsRPC) EthGetStorageAt(data string, position int, tag string) (string, error)
- func (rpc *FlashbotsRPC) EthGetTransactionByBlockHashAndIndex(blockHash string, transactionIndex int) (*Transaction, error)
- func (rpc *FlashbotsRPC) EthGetTransactionByBlockNumberAndIndex(blockNumber, transactionIndex int) (*Transaction, error)
- func (rpc *FlashbotsRPC) EthGetTransactionByHash(hash string) (*Transaction, error)
- func (rpc *FlashbotsRPC) EthGetTransactionCount(address, block string) (int, error)
- func (rpc *FlashbotsRPC) EthGetTransactionReceipt(hash string) (*TransactionReceipt, error)
- func (rpc *FlashbotsRPC) EthGetUncleCountByBlockHash(hash string) (int, error)
- func (rpc *FlashbotsRPC) EthGetUncleCountByBlockNumber(number int) (int, error)
- func (rpc *FlashbotsRPC) EthHashrate() (int, error)
- func (rpc *FlashbotsRPC) EthMining() (bool, error)
- func (rpc *FlashbotsRPC) EthNewBlockFilter() (string, error)
- func (rpc *FlashbotsRPC) EthNewFilter(params FilterParams) (string, error)
- func (rpc *FlashbotsRPC) EthNewPendingTransactionFilter() (string, error)
- func (rpc *FlashbotsRPC) EthProtocolVersion() (string, error)
- func (rpc *FlashbotsRPC) EthSendRawTransaction(data string) (string, error)
- func (rpc *FlashbotsRPC) EthSendTransaction(transaction T) (string, error)
- func (rpc *FlashbotsRPC) EthSign(address, data string) (string, error)
- func (rpc *FlashbotsRPC) EthSyncing() (*Syncing, error)
- func (rpc *FlashbotsRPC) EthUninstallFilter(filterID string) (bool, error)
- func (rpc *FlashbotsRPC) FlashbotsCallBundle(privKey *ecdsa.PrivateKey, param FlashbotsCallBundleParam) (res FlashbotsCallBundleResponse, err error)
- func (rpc *FlashbotsRPC) FlashbotsCancelPrivateTransaction(privKey *ecdsa.PrivateKey, param FlashbotsCancelPrivateTransactionRequest) (cancelled bool, err error)
- func (rpc *FlashbotsRPC) FlashbotsGetUserStats(privKey *ecdsa.PrivateKey, blockNumber uint64) (res FlashbotsUserStats, err error)
- func (rpc *FlashbotsRPC) FlashbotsSendBundle(privKey *ecdsa.PrivateKey, param FlashbotsSendBundleRequest) (res FlashbotsSendBundleResponse, err error)
- func (rpc *FlashbotsRPC) FlashbotsSendPrivateTransaction(privKey *ecdsa.PrivateKey, param FlashbotsSendPrivateTransactionRequest) (txHash string, err error)
- func (rpc *FlashbotsRPC) FlashbotsSimulateBlock(privKey *ecdsa.PrivateKey, block *types.Block, maxTx int) (res FlashbotsCallBundleResponse, err error)
- func (rpc *FlashbotsRPC) NetListening() (bool, error)
- func (rpc *FlashbotsRPC) NetPeerCount() (int, error)
- func (rpc *FlashbotsRPC) NetVersion() (string, error)
- func (rpc *FlashbotsRPC) RawCall(method string, params ...interface{}) (json.RawMessage, error)
- func (rpc *FlashbotsRPC) URL() string
- func (rpc *FlashbotsRPC) Web3ClientVersion() (string, error)
- func (rpc *FlashbotsRPC) Web3Sha3(data []byte) (string, error)
- type FlashbotsSendBundleRequest
- type FlashbotsSendBundleResponse
- type FlashbotsSendPrivateTransactionRequest
- type FlashbotsUserStats
- type Log
- type RelayErrorResponse
- type RpcError
- type Syncing
- type T
- type Transaction
- type TransactionReceipt
Constants ¶
This section is empty.
Variables ¶
var ErrRelayErrorResponse = errors.New("relay error response")
ErrRelayErrorResponse means it's a standard Flashbots relay error response - probably a user error rather than JSON or network error
Functions ¶
func ParseBigInt ¶
ParseBigInt parse hex string value to big.Int
func TxToRlp ¶
func TxToRlp(tx *types.Transaction) string
func WithHttpClient ¶
func WithHttpClient(client httpClient) func(rpc *FlashbotsRPC)
WithHttpClient set custom http client
Types ¶
type Block ¶
type Block struct { Number int Hash string ParentHash string Nonce string Sha3Uncles string LogsBloom string TransactionsRoot string StateRoot string Miner string Difficulty big.Int TotalDifficulty big.Int ExtraData string Size int GasLimit int GasUsed int Timestamp int Uncles []string Transactions []Transaction }
Block - block object
type CallBundleLog ¶
type CallBundleLog struct { Address string `json:"address"` Topics []string `json:"topics"` Data string `json:"data"` BlockNumber string `json:"blockNumber"` TransactionHash string `json:"transactionHash"` TransactionIndex string `json:"transactionIndex"` BlockHash string `json:"blockHash"` LogIndex string `json:"logIndex"` Removed bool `json:"removed"` }
type EthereumAPI ¶
type EthereumAPI interface { Web3ClientVersion() (string, error) Web3Sha3(data []byte) (string, error) NetVersion() (string, error) NetListening() (bool, error) NetPeerCount() (int, error) EthProtocolVersion() (string, error) EthSyncing() (*Syncing, error) EthCoinbase() (string, error) EthMining() (bool, error) EthHashrate() (int, error) EthGasPrice() (big.Int, error) EthAccounts() ([]string, error) EthBlockNumber() (int, error) EthGetBalance(address, block string) (big.Int, error) EthGetStorageAt(data string, position int, tag string) (string, error) EthGetTransactionCount(address, block string) (int, error) EthGetBlockTransactionCountByHash(hash string) (int, error) EthGetBlockTransactionCountByNumber(number int) (int, error) EthGetUncleCountByBlockHash(hash string) (int, error) EthGetUncleCountByBlockNumber(number int) (int, error) EthGetCode(address, block string) (string, error) EthSign(address, data string) (string, error) EthSendTransaction(transaction T) (string, error) EthSendRawTransaction(data string) (string, error) EthCall(transaction T, tag string) (string, error) EthEstimateGas(transaction T) (int, error) EthGetBlockByHash(hash string, withTransactions bool) (*Block, error) EthGetBlockByNumber(number int, withTransactions bool) (*Block, error) EthGetTransactionByHash(hash string) (*Transaction, error) EthGetTransactionByBlockHashAndIndex(blockHash string, transactionIndex int) (*Transaction, error) EthGetTransactionByBlockNumberAndIndex(blockNumber, transactionIndex int) (*Transaction, error) EthGetTransactionReceipt(hash string) (*TransactionReceipt, error) EthGetCompilers() ([]string, error) EthNewFilter(params FilterParams) (string, error) EthNewBlockFilter() (string, error) EthNewPendingTransactionFilter() (string, error) EthUninstallFilter(filterID string) (bool, error) EthGetFilterChanges(filterID string) ([]Log, error) EthGetFilterLogs(filterID string) ([]Log, error) EthGetLogs(params FilterParams) ([]Log, error) }
type FilterParams ¶
type FilterParams struct { FromBlock string `json:"fromBlock,omitempty"` ToBlock string `json:"toBlock,omitempty"` Address []string `json:"address,omitempty"` Topics [][]string `json:"topics,omitempty"` }
FilterParams - Filter parameters object
type FlashbotsCallBundleParam ¶
type FlashbotsCallBundleParam struct { Txs []string `json:"txs"` // Array[String], A list of signed transactions to execute in an atomic bundle BlockNumber string `json:"blockNumber"` // String, a hex encoded block number for which this bundle is valid on StateBlockNumber string `json:"stateBlockNumber"` // String, either a hex encoded number or a block tag for which state to base this simulation on. Can use "latest" Timestamp int64 `json:"timestamp,omitempty"` // Number, the timestamp to use for this bundle simulation, in seconds since the unix epoch Timeout int64 `json:"timeout,omitempty"` GasLimit uint64 `json:"gasLimit,omitempty"` Difficulty uint64 `json:"difficulty,omitempty"` BaseFee uint64 `json:"baseFee,omitempty"` }
type FlashbotsCallBundleResponse ¶
type FlashbotsCallBundleResponse struct { BundleGasPrice string `json:"bundleGasPrice"` // "43000001459", BundleHash string `json:"bundleHash"` // "0x2ca9c4d2ba00d8144d8e396a4989374443cb20fb490d800f4f883ad4e1b32158", CoinbaseDiff string `json:"coinbaseDiff"` // "2717471092204423", EthSentToCoinbase string `json:"ethSentToCoinbase"` // "0", GasFees string `json:"gasFees"` // "2717471092204423", Results []FlashbotsCallBundleResult `json:"results"` // [], StateBlockNumber int64 `json:"stateBlockNumber"` // 12960319, TotalGasUsed int64 `json:"totalGasUsed"` // 63197 }
type FlashbotsCallBundleResult ¶
type FlashbotsCallBundleResult struct { CoinbaseDiff string `json:"coinbaseDiff"` // "2717471092204423", EthSentToCoinbase string `json:"ethSentToCoinbase"` // "0", FromAddress string `json:"fromAddress"` // "0x37ff310ab11d1928BB70F37bC5E3cf62Df09a01c", GasFees string `json:"gasFees"` // "2717471092204423", GasPrice string `json:"gasPrice"` // "43000001459", GasUsed int64 `json:"gasUsed"` // 63197, ToAddress string `json:"toAddress"` // "0xdAC17F958D2ee523a2206206994597C13D831ec7", TxHash string `json:"txHash"` // "0xe2df005210bdc204a34ff03211606e5d8036740c686e9fe4e266ae91cf4d12df", Value string `json:"value"` // "0x" Error string `json:"error"` Revert string `json:"revert"` Logs []CallBundleLog `json:"logs"` }
type FlashbotsCancelPrivateTransactionRequest ¶
type FlashbotsCancelPrivateTransactionRequest struct {
TxHash string `json:"txHash"`
}
cancelPrivateTransaction
type FlashbotsRPC ¶
type FlashbotsRPC struct { Debug bool Headers map[string]string // Additional headers to send with the request Timeout time.Duration // contains filtered or unexported fields }
FlashbotsRPC - Ethereum rpc client
func New ¶
func New(url string, options ...func(rpc *FlashbotsRPC)) *FlashbotsRPC
New create new rpc client with given url
func NewFlashbotsRPC ¶
func NewFlashbotsRPC(url string, options ...func(rpc *FlashbotsRPC)) *FlashbotsRPC
NewFlashbotsRPC create new rpc client with given url
func (*FlashbotsRPC) Call ¶
func (rpc *FlashbotsRPC) Call(method string, params ...interface{}) (json.RawMessage, error)
Call returns raw response of method call
func (*FlashbotsRPC) CallWithFlashbotsSignature ¶
func (rpc *FlashbotsRPC) CallWithFlashbotsSignature(method string, privKey *ecdsa.PrivateKey, params ...interface{}) (json.RawMessage, error)
CallWithFlashbotsSignature is like Call but also signs the request
func (*FlashbotsRPC) Eth1 ¶
func (rpc *FlashbotsRPC) Eth1() *big.Int
Eth1 returns 1 ethereum value (10^18 wei)
func (*FlashbotsRPC) EthAccounts ¶
func (rpc *FlashbotsRPC) EthAccounts() ([]string, error)
EthAccounts returns a list of addresses owned by client.
func (*FlashbotsRPC) EthBlockNumber ¶
func (rpc *FlashbotsRPC) EthBlockNumber() (int, error)
EthBlockNumber returns the number of most recent block.
func (*FlashbotsRPC) EthCall ¶
func (rpc *FlashbotsRPC) EthCall(transaction T, tag string) (string, error)
EthCall executes a new message call immediately without creating a transaction on the block chain.
func (*FlashbotsRPC) EthCoinbase ¶
func (rpc *FlashbotsRPC) EthCoinbase() (string, error)
EthCoinbase returns the client coinbase address
func (*FlashbotsRPC) EthEstimateGas ¶
func (rpc *FlashbotsRPC) EthEstimateGas(transaction T) (int, error)
EthEstimateGas makes a call or transaction, which won't be added to the blockchain and returns the used gas, which can be used for estimating the used gas.
func (*FlashbotsRPC) EthGasPrice ¶
func (rpc *FlashbotsRPC) EthGasPrice() (big.Int, error)
EthGasPrice returns the current price per gas in wei.
func (*FlashbotsRPC) EthGetBalance ¶
func (rpc *FlashbotsRPC) EthGetBalance(address, block string) (big.Int, error)
EthGetBalance returns the balance of the account of given address in wei.
func (*FlashbotsRPC) EthGetBlockByHash ¶
func (rpc *FlashbotsRPC) EthGetBlockByHash(hash string, withTransactions bool) (*Block, error)
EthGetBlockByHash returns information about a block by hash.
func (*FlashbotsRPC) EthGetBlockByNumber ¶
func (rpc *FlashbotsRPC) EthGetBlockByNumber(number int, withTransactions bool) (*Block, error)
EthGetBlockByNumber returns information about a block by block number.
func (*FlashbotsRPC) EthGetBlockTransactionCountByHash ¶
func (rpc *FlashbotsRPC) EthGetBlockTransactionCountByHash(hash string) (int, error)
EthGetBlockTransactionCountByHash returns the number of transactions in a block from a block matching the given block hash.
func (*FlashbotsRPC) EthGetBlockTransactionCountByNumber ¶
func (rpc *FlashbotsRPC) EthGetBlockTransactionCountByNumber(number int) (int, error)
EthGetBlockTransactionCountByNumber returns the number of transactions in a block from a block matching the given block
func (*FlashbotsRPC) EthGetCode ¶
func (rpc *FlashbotsRPC) EthGetCode(address, block string) (string, error)
EthGetCode returns code at a given address.
func (*FlashbotsRPC) EthGetCompilers ¶
func (rpc *FlashbotsRPC) EthGetCompilers() ([]string, error)
EthGetCompilers returns a list of available compilers in the client.
func (*FlashbotsRPC) EthGetFilterChanges ¶
func (rpc *FlashbotsRPC) EthGetFilterChanges(filterID string) ([]Log, error)
EthGetFilterChanges polling method for a filter, which returns an array of logs which occurred since last poll.
func (*FlashbotsRPC) EthGetFilterLogs ¶
func (rpc *FlashbotsRPC) EthGetFilterLogs(filterID string) ([]Log, error)
EthGetFilterLogs returns an array of all logs matching filter with given id.
func (*FlashbotsRPC) EthGetLogs ¶
func (rpc *FlashbotsRPC) EthGetLogs(params FilterParams) ([]Log, error)
EthGetLogs returns an array of all logs matching a given filter object.
func (*FlashbotsRPC) EthGetStorageAt ¶
EthGetStorageAt returns the value from a storage position at a given address.
func (*FlashbotsRPC) EthGetTransactionByBlockHashAndIndex ¶
func (rpc *FlashbotsRPC) EthGetTransactionByBlockHashAndIndex(blockHash string, transactionIndex int) (*Transaction, error)
EthGetTransactionByBlockHashAndIndex returns information about a transaction by block hash and transaction index position.
func (*FlashbotsRPC) EthGetTransactionByBlockNumberAndIndex ¶
func (rpc *FlashbotsRPC) EthGetTransactionByBlockNumberAndIndex(blockNumber, transactionIndex int) (*Transaction, error)
EthGetTransactionByBlockNumberAndIndex returns information about a transaction by block number and transaction index position.
func (*FlashbotsRPC) EthGetTransactionByHash ¶
func (rpc *FlashbotsRPC) EthGetTransactionByHash(hash string) (*Transaction, error)
EthGetTransactionByHash returns the information about a transaction requested by transaction hash.
func (*FlashbotsRPC) EthGetTransactionCount ¶
func (rpc *FlashbotsRPC) EthGetTransactionCount(address, block string) (int, error)
EthGetTransactionCount returns the number of transactions sent from an address.
func (*FlashbotsRPC) EthGetTransactionReceipt ¶
func (rpc *FlashbotsRPC) EthGetTransactionReceipt(hash string) (*TransactionReceipt, error)
EthGetTransactionReceipt returns the receipt of a transaction by transaction hash. Note That the receipt is not available for pending transactions.
func (*FlashbotsRPC) EthGetUncleCountByBlockHash ¶
func (rpc *FlashbotsRPC) EthGetUncleCountByBlockHash(hash string) (int, error)
EthGetUncleCountByBlockHash returns the number of uncles in a block from a block matching the given block hash.
func (*FlashbotsRPC) EthGetUncleCountByBlockNumber ¶
func (rpc *FlashbotsRPC) EthGetUncleCountByBlockNumber(number int) (int, error)
EthGetUncleCountByBlockNumber returns the number of uncles in a block from a block matching the given block number.
func (*FlashbotsRPC) EthHashrate ¶
func (rpc *FlashbotsRPC) EthHashrate() (int, error)
EthHashrate returns the number of hashes per second that the node is mining with.
func (*FlashbotsRPC) EthMining ¶
func (rpc *FlashbotsRPC) EthMining() (bool, error)
EthMining returns true if client is actively mining new blocks.
func (*FlashbotsRPC) EthNewBlockFilter ¶
func (rpc *FlashbotsRPC) EthNewBlockFilter() (string, error)
EthNewBlockFilter creates a filter in the node, to notify when a new block arrives. To check if the state has changed, call EthGetFilterChanges.
func (*FlashbotsRPC) EthNewFilter ¶
func (rpc *FlashbotsRPC) EthNewFilter(params FilterParams) (string, error)
EthNewFilter creates a new filter object.
func (*FlashbotsRPC) EthNewPendingTransactionFilter ¶
func (rpc *FlashbotsRPC) EthNewPendingTransactionFilter() (string, error)
EthNewPendingTransactionFilter creates a filter in the node, to notify when new pending transactions arrive. To check if the state has changed, call EthGetFilterChanges.
func (*FlashbotsRPC) EthProtocolVersion ¶
func (rpc *FlashbotsRPC) EthProtocolVersion() (string, error)
EthProtocolVersion returns the current ethereum protocol version.
func (*FlashbotsRPC) EthSendRawTransaction ¶
func (rpc *FlashbotsRPC) EthSendRawTransaction(data string) (string, error)
EthSendRawTransaction creates new message call transaction or a contract creation for signed transactions.
func (*FlashbotsRPC) EthSendTransaction ¶
func (rpc *FlashbotsRPC) EthSendTransaction(transaction T) (string, error)
EthSendTransaction creates new message call transaction or a contract creation, if the data field contains code.
func (*FlashbotsRPC) EthSign ¶
func (rpc *FlashbotsRPC) EthSign(address, data string) (string, error)
EthSign signs data with a given address. Calculates an Ethereum specific signature with: sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)))
func (*FlashbotsRPC) EthSyncing ¶
func (rpc *FlashbotsRPC) EthSyncing() (*Syncing, error)
EthSyncing returns an object with data about the sync status or false.
func (*FlashbotsRPC) EthUninstallFilter ¶
func (rpc *FlashbotsRPC) EthUninstallFilter(filterID string) (bool, error)
EthUninstallFilter uninstalls a filter with given id.
func (*FlashbotsRPC) FlashbotsCallBundle ¶
func (rpc *FlashbotsRPC) FlashbotsCallBundle(privKey *ecdsa.PrivateKey, param FlashbotsCallBundleParam) (res FlashbotsCallBundleResponse, err error)
https://docs.flashbots.net/flashbots-auction/searchers/advanced/rpc-endpoint#eth_callbundle
func (*FlashbotsRPC) FlashbotsCancelPrivateTransaction ¶
func (rpc *FlashbotsRPC) FlashbotsCancelPrivateTransaction(privKey *ecdsa.PrivateKey, param FlashbotsCancelPrivateTransactionRequest) (cancelled bool, err error)
Try to cancel a private transaction at the Flashbots relay. If this call returns true this means the cancel was initiated, but it's not guaranteed that the transaction is actually cancelled, only that it won't be sent to miners anymore. A transaction that was already sent to miners might still be included in the next block.
Possible errors: 'tx not found', 'tx was already cancelled', 'tx has already expired'
func (*FlashbotsRPC) FlashbotsGetUserStats ¶
func (rpc *FlashbotsRPC) FlashbotsGetUserStats(privKey *ecdsa.PrivateKey, blockNumber uint64) (res FlashbotsUserStats, err error)
https://docs.flashbots.net/flashbots-auction/searchers/advanced/rpc-endpoint#flashbots_getuserstats
func (*FlashbotsRPC) FlashbotsSendBundle ¶
func (rpc *FlashbotsRPC) FlashbotsSendBundle(privKey *ecdsa.PrivateKey, param FlashbotsSendBundleRequest) (res FlashbotsSendBundleResponse, err error)
https://docs.flashbots.net/flashbots-auction/searchers/advanced/rpc-endpoint/#eth_sendbundle
func (*FlashbotsRPC) FlashbotsSendPrivateTransaction ¶
func (rpc *FlashbotsRPC) FlashbotsSendPrivateTransaction(privKey *ecdsa.PrivateKey, param FlashbotsSendPrivateTransactionRequest) (txHash string, err error)
Sends a rawTx to the Flashbots relay. It will be sent to miners as bundle for 25 blocks, after which the transaction is failed.
func (*FlashbotsRPC) FlashbotsSimulateBlock ¶
func (rpc *FlashbotsRPC) FlashbotsSimulateBlock(privKey *ecdsa.PrivateKey, block *types.Block, maxTx int) (res FlashbotsCallBundleResponse, err error)
Simulate a full Ethereum block. numTx is the maximum number of tx to include, used for troubleshooting (default: 0 - all transactions)
func (*FlashbotsRPC) NetListening ¶
func (rpc *FlashbotsRPC) NetListening() (bool, error)
NetListening returns true if client is actively listening for network connections.
func (*FlashbotsRPC) NetPeerCount ¶
func (rpc *FlashbotsRPC) NetPeerCount() (int, error)
NetPeerCount returns number of peers currently connected to the client.
func (*FlashbotsRPC) NetVersion ¶
func (rpc *FlashbotsRPC) NetVersion() (string, error)
NetVersion returns the current network protocol version.
func (*FlashbotsRPC) RawCall ¶
func (rpc *FlashbotsRPC) RawCall(method string, params ...interface{}) (json.RawMessage, error)
RawCall returns raw response of method call (Deprecated)
func (*FlashbotsRPC) Web3ClientVersion ¶
func (rpc *FlashbotsRPC) Web3ClientVersion() (string, error)
Web3ClientVersion returns the current client version.
type FlashbotsSendBundleRequest ¶
type FlashbotsSendBundleRequest struct { Txs []string `json:"txs"` // Array[String], A list of signed transactions to execute in an atomic bundle BlockNumber string `json:"blockNumber"` // String, a hex encoded block number for which this bundle is valid on MinTimestamp *uint64 `json:"minTimestamp,omitempty"` // (Optional) Number, the minimum timestamp for which this bundle is valid, in seconds since the unix epoch MaxTimestamp *uint64 `json:"maxTimestamp,omitempty"` // (Optional) Number, the maximum timestamp for which this bundle is valid, in seconds since the unix epoch RevertingTxs *[]string `json:"revertingTxHashes,omitempty"` // (Optional) Array[String], A list of tx hashes that are allowed to revert }
sendBundle
type FlashbotsSendBundleResponse ¶
type FlashbotsSendBundleResponse struct {
BundleHash string `json:"bundleHash"`
}
type FlashbotsSendPrivateTransactionRequest ¶
type FlashbotsSendPrivateTransactionRequest struct {
Tx string `json:"tx"`
}
sendPrivateTransaction
type FlashbotsUserStats ¶
type FlashbotsUserStats struct { IsHighPriority bool `json:"is_high_priority"` AllTimeMinerPayments string `json:"all_time_miner_payments"` AllTimeGasSimulated string `json:"all_time_gas_simulated"` Last7dMinerPayments string `json:"last_7d_miner_payments"` Last7dGasSimulated string `json:"last_7d_gas_simulated"` Last1dMinerPayments string `json:"last_1d_miner_payments"` Last1dGasSimulated string `json:"last_1d_gas_simulated"` }
type Log ¶
type Log struct { Removed bool LogIndex int TransactionIndex int TransactionHash string BlockNumber int BlockHash string Address string Data string Topics []string }
Log - log object
func (*Log) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type RelayErrorResponse ¶
type RelayErrorResponse struct {
Error string `json:"error"`
}
type Syncing ¶
Syncing - object with syncing data info
func (*Syncing) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type T ¶
type T struct { From string To string Gas int GasPrice *big.Int Value *big.Int Data string Nonce int }
T - input transaction object
func (T) MarshalJSON ¶
MarshalJSON implements the json.Unmarshaler interface.
type Transaction ¶
type Transaction struct { Hash string Nonce int BlockHash string BlockNumber *int TransactionIndex *int From string To string Value big.Int Gas int GasPrice big.Int Input string }
Transaction - transaction object
func (*Transaction) UnmarshalJSON ¶
func (t *Transaction) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface.
type TransactionReceipt ¶
type TransactionReceipt struct { TransactionHash string TransactionIndex int BlockHash string BlockNumber int CumulativeGasUsed int GasUsed int ContractAddress string Logs []Log LogsBloom string Root string Status string }
TransactionReceipt - transaction receipt object
func (*TransactionReceipt) UnmarshalJSON ¶
func (t *TransactionReceipt) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface.