Skip to content

Commit ba5501e

Browse files
committed
use tips-core
1 parent d11c6f1 commit ba5501e

File tree

4 files changed

+3
-38
lines changed

4 files changed

+3
-38
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ pub mod types;
55
#[cfg(any(test, feature = "test-utils"))]
66
pub mod test_utils;
77

8-
pub use types::{Bundle, BundleHash, BundleWithMetadata, CancelBundle};
8+
pub use types::{Bundle, BundleHash, BundleWithMetadata, CancelBundle, MeterBundleResponse};

crates/ingress-rpc/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,3 @@ op-revm.workspace = true
3535
revm-context-interface.workspace = true
3636
alloy-signer-local.workspace = true
3737
reth-optimism-evm.workspace = true
38-
serde.workspace = true

crates/ingress-rpc/src/service.rs

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use alloy_consensus::transaction::Recovered;
22
use alloy_consensus::{Transaction, transaction::SignerRecoverable};
3-
use alloy_primitives::{Address, B256, Bytes, TxHash};
3+
use alloy_primitives::{B256, Bytes};
44
use alloy_provider::{Provider, RootProvider, network::eip2718::Decodable2718};
55
use jsonrpsee::{
66
core::{RpcResult, async_trait},
@@ -9,47 +9,14 @@ use jsonrpsee::{
99
use op_alloy_consensus::OpTxEnvelope;
1010
use op_alloy_network::Optimism;
1111
use reth_rpc_eth_types::EthApiError;
12-
use serde::{Deserialize, Serialize};
1312
use std::time::{SystemTime, UNIX_EPOCH};
1413
use tips_audit::{BundleEvent, BundleEventPublisher};
15-
use tips_core::{Bundle, BundleHash, BundleWithMetadata, CancelBundle};
14+
use tips_core::{Bundle, BundleHash, BundleWithMetadata, CancelBundle, MeterBundleResponse};
1615
use tracing::{info, warn};
1716

1817
use crate::queue::QueuePublisher;
1918
use 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")]
5421
pub trait IngressApi {
5522
/// `eth_sendBundle` can be used to send your bundles to the builder.

0 commit comments

Comments
 (0)