Bundle
Bundle is a library with utilities to interact with the Flashbots bundle API described in https://docs.flashbots.net/flashbots-auction/advanced/rpc-endpoint#eth_sendbundle.
Functionsβ
sendBundleβ
Send a bundle to the Flashbots relay.
Input:
-
url
(string
): The URL of the Flashbots relay. -
bundle
(BundleObj): The bundle to send.
Output:
response
(bytes
): Raw bytes response from the Flashbots relay.
decodeBundleβ
Decode a bundle from a JSON string.
Input:
bundleJson
(string
): The JSON string of the bundle.
Output:
bundle
(BundleObj): The decoded bundle.
Structsβ
BundleObjβ
BundleObj is a struct that represents a bundle to be sent to the Flashbots relay.
blockNumber
(uint64
): The block number at which the bundle should be executed.minTimestamp
(uint64
): The minimum timestamp at which the bundle should be executed.maxTimestamp
(uint64
): The maximum timestamp at which the bundle should be executed.txns
(``): The transactions to be included in the bundle.