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,47 +9,14 @@ 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 } ;
1413use tips_audit:: { BundleEvent , BundleEventPublisher } ;
15- use tips_core:: { Bundle , BundleHash , BundleWithMetadata , CancelBundle } ;
14+ use tips_core:: { Bundle , BundleHash , BundleWithMetadata , CancelBundle , MeterBundleResponse } ;
1615use tracing:: { info, warn} ;
1716
1817use crate :: queue:: QueuePublisher ;
1918use crate :: validation:: { AccountInfoLookup , L1BlockInfoLookup , validate_bundle, validate_tx} ;
2019
21- #[ derive( Debug , Clone , Serialize , Deserialize ) ]
22- #[ serde( rename_all = "camelCase" ) ]
23- pub struct TransactionResult {
24- pub coinbase_diff : String ,
25- pub eth_sent_to_coinbase : String ,
26- pub from_address : Address ,
27- pub gas_fees : String ,
28- pub gas_price : String ,
29- pub gas_used : u64 ,
30- pub to_address : Option < Address > ,
31- pub tx_hash : TxHash ,
32- pub value : String ,
33- /// Resource metering: execution time for this tx in microseconds
34- pub execution_time_us : u128 ,
35- }
36-
37- /// Response for base_meterBundle
38- #[ derive( Debug , Clone , Serialize , Deserialize ) ]
39- #[ serde( rename_all = "camelCase" ) ]
40- pub struct MeterBundleResponse {
41- pub bundle_gas_price : String ,
42- pub bundle_hash : B256 ,
43- pub coinbase_diff : String ,
44- pub eth_sent_to_coinbase : String ,
45- pub gas_fees : String ,
46- pub results : Vec < TransactionResult > ,
47- pub state_block_number : u64 ,
48- pub total_gas_used : u64 ,
49- /// Resource metering: total execution time in microseconds
50- pub total_execution_time_us : u128 ,
51- }
52-
5320#[ rpc( server, namespace = "eth" ) ]
5421pub trait IngressApi {
5522 /// `eth_sendBundle` can be used to send your bundles to the builder.
0 commit comments