Closed bertmiller closed 9 months ago
Hi @bertmiller! Can you post the return type for completion?
CallBundle responds with the following:
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
}
Here is the type used in "Results":
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"`
}
Hey @onbjerg can I take this up?
@ameya-deshmukh please go for it,
we just want rust type bindings first, these should go under rpc-types
see for ref:
Thanks!
Hey @ameya-deshmukh did you ever get this over the line?
fyi @bertmiller we have bindings for mev and eth namespace here
https://github.com/paradigmxyz/mev-share-rs/blob/main/crates/mev-share-rpc-api/src/mev.rs
so we're missing an implementation for this
custom rpc handlers can be plugged into the cli like this
https://github.com/paradigmxyz/reth/blob/main/examples/additional-rpc-namespace-in-cli/src/main.rs
Hey @bertmiller @mattsse I'm actually looking into it, expect a PR soon!
Is this going to be implemented anytime soon? @ameya-deshmukh
Hey @LooterAI yes, I'm expecting to raise a PR by the weekend. Thanks :)
Hey @ameya-deshmukh , do you want to still finish this?
Hey @chirag-bgh yep. Will update on whether or not I can get a PR across this week. If not, please go ahead and pick it up :)
Hey @chirag-bgh I didn't find time to work on this. Please pick it up :)
we have this now --htp.api eth-call-bundle
Describe the feature
Requesting the eth_callBundle API, which is similar to eth_call but takes an ordered list of transactions as an input instead. Here are the args, using the geth type:
eth_callBundle applies the bundle of transactions (Txs) on top of the state at StateBlockNumberOrHash using block variables that are also passed in. It returns a variety of information about how much gas the bundle used and how much it paid the coinbase address.
Here is the implementation in mev-geth: https://github.com/flashbots/mev-geth/commit/63c86b4cb63906b0a06e00c20b027d384309634d#diff-c426ecd2f7d247753b9ea8c1cc003f21fa412661c1f967d203d4edf8163da344R2067
Additional context
No response