Skip to content

Commit

Permalink
feat: move mev rpc types to alloy (#9108)
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias Seitz <[email protected]>
  • Loading branch information
0xqd and mattsse committed Jul 8, 2024
1 parent aaa27d6 commit 2c2098c
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 1,059 deletions.
14 changes: 14 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ alloy-rpc-types-txpool = { version = "0.1", default-features = false }
alloy-serde = { version = "0.1", default-features = false }
alloy-rpc-types-engine = { version = "0.1", default-features = false }
alloy-rpc-types-eth = { version = "0.1", default-features = false }
alloy-rpc-types-mev = { version = "0.1", default-features = false }
alloy-rpc-types-trace = { version = "0.1", default-features = false }
alloy-genesis = { version = "0.1", default-features = false }
alloy-node-bindings = { version = "0.1", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion crates/rpc/rpc-api/src/mev.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use jsonrpsee::proc_macros::rpc;
use reth_rpc_types::{
use reth_rpc_types::mev::{
SendBundleRequest, SendBundleResponse, SimBundleOverrides, SimBundleResponse,
};

Expand Down
2 changes: 1 addition & 1 deletion crates/rpc/rpc-eth-api/src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use jsonrpsee::proc_macros::rpc;
use reth_primitives::{Bytes, B256};
use reth_rpc_types::{
use reth_rpc_types::mev::{
CancelBundleRequest, CancelPrivateTransactionRequest, EthBundleHash, EthCallBundle,
EthCallBundleResponse, EthSendBundle, PrivateTransactionRequest,
};
Expand Down
7 changes: 4 additions & 3 deletions crates/rpc/rpc-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ workspace = true
# ethereum
alloy-primitives = { workspace = true, features = ["rand", "rlp", "serde"] }
alloy-rpc-types = { workspace = true, features = ["jsonrpsee-types"] }
alloy-rpc-types-admin.workspace = true
alloy-rpc-types-anvil.workspace = true
alloy-rpc-types-trace.workspace = true
alloy-rpc-types-beacon.workspace = true
alloy-rpc-types-admin.workspace = true
alloy-rpc-types-mev.workspace = true
alloy-rpc-types-trace.workspace = true
alloy-rpc-types-txpool.workspace = true
alloy-serde.workspace = true
alloy-rpc-types-engine = { workspace = true, features = ["jsonrpsee-types"] }

# misc
serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
jsonrpsee-types = { workspace = true, optional = true }

[dev-dependencies]
Expand All @@ -38,6 +38,7 @@ proptest-derive.workspace = true
rand.workspace = true
similar-asserts.workspace = true
bytes.workspace = true
serde_json.workspace = true

[features]
default = ["jsonrpsee-types"]
Expand Down
11 changes: 6 additions & 5 deletions crates/rpc/rpc-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#[allow(hidden_glob_reexports)]
mod eth;
mod mev;
mod peer;
mod rpc;

Expand All @@ -29,15 +28,18 @@ pub mod trace {
pub use alloy_rpc_types_trace::*;
}

// re-export admin
pub use alloy_rpc_types_admin as admin;

// Anvil specific rpc types coming from alloy.
pub use alloy_rpc_types_anvil as anvil;

// re-export mev
pub use alloy_rpc_types_mev as mev;

// re-export beacon
pub use alloy_rpc_types_beacon as beacon;

// re-export admin
pub use alloy_rpc_types_admin as admin;

// re-export txpool
pub use alloy_rpc_types_txpool as txpool;

Expand All @@ -51,6 +53,5 @@ pub use eth::{
transaction::{self, TransactionRequest, TypedTransactionRequest},
};

pub use mev::*;
pub use peer::*;
pub use rpc::*;
Loading

0 comments on commit 2c2098c

Please sign in to comment.