Skip to content

Commit 707977e

Browse files
committed
use tips-core
1 parent 2ea9cc9 commit 707977e

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
@@ -34,4 +34,3 @@ op-revm.workspace = true
3434
revm-context-interface.workspace = true
3535
alloy-signer-local.workspace = true
3636
reth-optimism-evm.workspace = true
37-
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,46 +9,13 @@ 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};
14-
use tips_core::{Bundle, BundleHash, BundleWithMetadata, CancelBundle};
13+
use tips_core::{Bundle, BundleHash, BundleWithMetadata, CancelBundle, MeterBundleResponse};
1514
use tracing::{info, warn};
1615

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

0 commit comments

Comments
 (0)