Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrFlashbotsApiDoesntHaveThatBlockYet = errors.New("flashbots API latest height < requested block height")
)
Functions ¶
This section is empty.
Types ¶
type BlockWithFailedTx ¶ added in v0.2.1
BlockWithFailedTx is used by the webserver, which returns the last 100 blocks with failed tx
type FailedTx ¶
type FailedTx struct {
Hash string
From string
To string
Block uint64
IsFlashbots bool // if false then it's a failed 0-gas tx but not from Flashbots
}
FailedTx contains information about a failed 0-gas or Flashbots tx
type FlashbotsApiBlock ¶
type FlashbotsApiBlock struct {
BlockNumber int64 `json:"block_number"`
Miner string `json:"miner"`
MinerReward string `json:"miner_reward"`
CoinbaseTransfers string `json:"coinbase_transfers"`
GasUsed int64 `json:"gas_used"`
GasPrice string `json:"gas_price"`
Transactions []FlashbotsApiTransaction `json:"transactions"`
}
type FlashbotsApiTransaction ¶
type FlashbotsApiTransaction struct {
Hash string `json:"transaction_hash"`
TxIndex int64 `json:"tx_index"`
BundleIndex int64 `json:"bundle_index"`
BlockNumber int64 `json:"block_number"`
EoaAddress string `json:"eoa_address"`
ToAddress string `json:"to_address"`
GasUsed int64 `json:"gas_used"`
GasPrice string `json:"gas_price"`
CoinbaseTransfer string `json:"coinbase_transfer"`
TotalMinerReward string `json:"total_miner_reward"`
}
type FlashbotsBlockApiResponse ¶
type FlashbotsBlockApiResponse struct {
LatestBlockNumber int64 `json:"latest_block_number"`
Blocks []FlashbotsApiBlock `json:"blocks"`
}
func GetFlashbotsBlock ¶
func GetFlashbotsBlock(blockNumber int64) (response FlashbotsBlockApiResponse, err error)
func IsFlashbotsTx ¶
func IsFlashbotsTx(block *types.Block, tx *types.Transaction) (isFlashbotsTx bool, response FlashbotsBlockApiResponse, err error)
func (*FlashbotsBlockApiResponse) GetTxMap ¶
func (r *FlashbotsBlockApiResponse) GetTxMap() map[string]FlashbotsApiTransaction
func (*FlashbotsBlockApiResponse) IsFlashbotsTx ¶ added in v0.2.0
func (r *FlashbotsBlockApiResponse) IsFlashbotsTx(hash string) bool
Click to show internal directories.
Click to hide internal directories.
