11use alloy_consensus:: transaction:: Recovered ;
22use alloy_consensus:: { Transaction , transaction:: SignerRecoverable } ;
3- use alloy_primitives:: { Address , B256 , Bytes , TxHash } ;
3+ use alloy_primitives:: { B256 , Bytes } ;
44use alloy_provider:: { Provider , RootProvider , network:: eip2718:: Decodable2718 } ;
55use jsonrpsee:: {
66 core:: { RpcResult , async_trait} ,
@@ -9,46 +9,13 @@ use jsonrpsee::{
99use op_alloy_consensus:: OpTxEnvelope ;
1010use op_alloy_network:: Optimism ;
1111use reth_rpc_eth_types:: EthApiError ;
12- use serde:: { Deserialize , Serialize } ;
1312use std:: time:: { SystemTime , UNIX_EPOCH } ;
14- use tips_core:: { Bundle , BundleHash , BundleWithMetadata , CancelBundle } ;
13+ use tips_core:: { Bundle , BundleHash , BundleWithMetadata , CancelBundle , MeterBundleResponse } ;
1514use tracing:: { info, warn} ;
1615
1716use crate :: queue:: QueuePublisher ;
1817use crate :: validation:: { AccountInfoLookup , L1BlockInfoLookup , validate_bundle, validate_tx} ;
1918
20- #[ derive( Debug , Clone , Serialize , Deserialize ) ]
21- #[ serde( rename_all = "camelCase" ) ]
22- pub struct TransactionResult {
23- pub coinbase_diff : String ,
24- pub eth_sent_to_coinbase : String ,
25- pub from_address : Address ,
26- pub gas_fees : String ,
27- pub gas_price : String ,
28- pub gas_used : u64 ,
29- pub to_address : Option < Address > ,
30- pub tx_hash : TxHash ,
31- pub value : String ,
32- /// Resource metering: execution time for this tx in microseconds
33- pub execution_time_us : u128 ,
34- }
35-
36- /// Response for base_meterBundle
37- #[ derive( Debug , Clone , Serialize , Deserialize ) ]
38- #[ serde( rename_all = "camelCase" ) ]
39- pub struct MeterBundleResponse {
40- pub bundle_gas_price : String ,
41- pub bundle_hash : B256 ,
42- pub coinbase_diff : String ,
43- pub eth_sent_to_coinbase : String ,
44- pub gas_fees : String ,
45- pub results : Vec < TransactionResult > ,
46- pub state_block_number : u64 ,
47- pub total_gas_used : u64 ,
48- /// Resource metering: total execution time in microseconds
49- pub total_execution_time_us : u128 ,
50- }
51-
5219#[ rpc( server, namespace = "eth" ) ]
5320pub trait IngressApi {
5421 /// `eth_sendBundle` can be used to send your bundles to the builder.
0 commit comments