diff --git a/Cargo.lock b/Cargo.lock index f0be65292e..8ac94007dd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -112,9 +112,9 @@ dependencies = [ [[package]] name = "alloy-consensus" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad704069c12f68d0c742d0cad7e0a03882b42767350584627fbf8a47b1bf1846" +checksum = "8b6440213a22df93a87ed512d2f668e7dc1d62a05642d107f82d61edc9e12370" dependencies = [ "alloy-eips", "alloy-primitives", @@ -140,9 +140,9 @@ dependencies = [ [[package]] name = "alloy-consensus-any" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc374f640a5062224d7708402728e3d6879a514ba10f377da62e7dfb14c673e6" +checksum = "15d0bea09287942405c4f9d2a4f22d1e07611c2dbd9d5bf94b75366340f9e6e0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -155,9 +155,9 @@ dependencies = [ [[package]] name = "alloy-contract" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c493b2812943f7b58191063a8d13ea97c76099900869c08231e8eba3bf2f92" +checksum = "d69af404f1d00ddb42f2419788fa87746a4cd13bab271916d7726fda6c792d94" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -240,9 +240,9 @@ dependencies = [ [[package]] name = "alloy-eips" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e867b5fd52ed0372a95016f3a37cbff95a9d5409230fbaef2d8ea00e8618098" +checksum = "4bd2c7ae05abcab4483ce821f12f285e01c0b33804e6883dd9ca1569a87ee2be" dependencies = [ "alloy-eip2124", "alloy-eip2930", @@ -288,9 +288,9 @@ dependencies = [ [[package]] name = "alloy-genesis" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b90be17e9760a6ba6d13cebdb049cea405ebc8bf57d90664ed708cc5bc348342" +checksum = "fc47eaae86488b07ea8e20236184944072a78784a1f4993f8ec17b3aa5d08c21" dependencies = [ "alloy-eips", "alloy-primitives", @@ -329,9 +329,9 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcab4c51fb1273e3b0f59078e0cdf8aa99f697925b09f0d2055c18be46b4d48c" +checksum = "003f46c54f22854a32b9cc7972660a476968008ad505427eabab49225309ec40" dependencies = [ "alloy-primitives", "alloy-sol-types", @@ -344,9 +344,9 @@ dependencies = [ [[package]] name = "alloy-network" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196d7fd3f5d414f7bbd5886a628b7c42bd98d1b126f9a7cff69dbfd72007b39c" +checksum = "4f4029954d9406a40979f3a3b46950928a0fdcfe3ea8a9b0c17490d57e8aa0e3" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -370,9 +370,9 @@ dependencies = [ [[package]] name = "alloy-network-primitives" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d3ae2777e900a7a47ad9e3b8ab58eff3d93628265e73bbdee09acf90bf68f75" +checksum = "7805124ad69e57bbae7731c9c344571700b2a18d351bda9e0eba521c991d1bcb" dependencies = [ "alloy-consensus", "alloy-eips", @@ -444,9 +444,9 @@ dependencies = [ [[package]] name = "alloy-provider" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9bf40c9b2a90c7677f9c39bccd9f06af457f35362439c0497a706f16557703" +checksum = "d369e12c92870d069e0c9dc5350377067af8a056e29e3badf8446099d7e00889" dependencies = [ "alloy-chains", "alloy-consensus", @@ -489,9 +489,9 @@ dependencies = [ [[package]] name = "alloy-pubsub" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acfdbe41e2ef1a7e79b5ea115baa750f9381ac9088fb600f4cedc731cf04a151" +checksum = "f77d20cdbb68a614c7a86b3ffef607b37d087bb47a03c58f4c3f8f99bc3ace3b" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -533,9 +533,9 @@ dependencies = [ [[package]] name = "alloy-rpc-client" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c2630fde9ff6033a780635e1af6ef40e92d74a9cacb8af3defc1b15cfebca5" +checksum = "31c89883fe6b7381744cbe80fef638ac488ead4f1956a4278956a1362c71cd2e" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -559,9 +559,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad098153a12382c22a597e865530033f5e644473742d6c733562d448125e02a2" +checksum = "64e279e6d40ee40fe8f76753b678d8d5d260cb276dc6c8a8026099b16d2b43f4" dependencies = [ "alloy-primitives", "alloy-rpc-types-engine", @@ -572,9 +572,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-admin" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7604c415f725bd776d46dae44912c276cc3d8af37f37811e5675389791aa0c6" +checksum = "2bcf50ccb65d29b8599f8f5e23dcac685f1d79459654c830cba381345760e901" dependencies = [ "alloy-genesis", "alloy-primitives", @@ -584,9 +584,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-anvil" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "214d9d1033c173ab8fa32edd8a4655cd784447c820b0b66cd0d5167e049567d6" +checksum = "5e176c26fdd87893b6afeb5d92099d8f7e7a1fe11d6f4fe0883d6e33ac5f31ba" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -596,9 +596,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-any" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50b8429b5b62d21bf3691eb1ae12aaae9bb496894d5a114e3cc73e27e6800ec8" +checksum = "b43c1622aac2508d528743fd4cfdac1dea92d5a8fa894038488ff7edd0af0b32" dependencies = [ "alloy-consensus-any", "alloy-rpc-types-eth", @@ -607,9 +607,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-beacon" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f67f8269e8b5193a5328dd3ef4d60f93524071e53a993776e290581a59aa15fa" +checksum = "1786681640d4c60f22b6b8376b0f3fa200360bf1c3c2cb913e6c97f51928eb1b" dependencies = [ "alloy-eips", "alloy-primitives", @@ -627,9 +627,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-debug" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01731601ea631bd825c652a225701ab466c09457f446b8d8129368a095389c5d" +checksum = "1b2ca3a434a6d49910a7e8e51797eb25db42ef8a5578c52d877fcb26d0afe7bc" dependencies = [ "alloy-primitives", "derive_more", @@ -639,9 +639,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-engine" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9981491bb98e76099983f516ec7de550db0597031f5828c994961eb4bb993cce" +checksum = "d9c4c53a8b0905d931e7921774a1830609713bd3e8222347963172b03a3ecc68" dependencies = [ "alloy-consensus", "alloy-eips", @@ -660,9 +660,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-eth" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29031a6bf46177d65efce661f7ab37829ca09dd341bc40afb5194e97600655cc" +checksum = "ed5fafb741c19b3cca4cdd04fa215c89413491f9695a3e928dee2ae5657f607e" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -682,9 +682,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-mev" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5c5c78bdd2c72c47e66ab977af420fb4a10279707d4edbd2575693c47aa54a2" +checksum = "49a97bfc6d9b411c85bb08e1174ddd3e5d61b10d3bd13f529d6609f733cb2f6f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -697,9 +697,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-trace" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b842f5aac6676ff4b2e328262d03bdf49807eaec3fe3a4735c45c97388518b" +checksum = "c55324323aa634b01bdecb2d47462a8dce05f5505b14a6e5db361eef16eda476" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -711,9 +711,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-txpool" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fa12c608873beeb7afa392944dce8829fa8a50c487f266863bb2dd6b743c4a2" +checksum = "96b1aa28effb6854be356ce92ed64cea3b323acd04c3f8bfb5126e2839698043" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -723,9 +723,9 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01e856112bfa0d9adc85bd7c13db03fad0e71d1d6fb4c2010e475b6718108236" +checksum = "a6f180c399ca7c1e2fe17ea58343910cad0090878a696ff5a50241aee12fc529" dependencies = [ "alloy-primitives", "arbitrary", @@ -735,9 +735,9 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a4f629da632d5279bbc5731634f0f5c9484ad9c4cad0cd974d9669dc1f46d6" +checksum = "ecc39ad2c0a3d2da8891f4081565780703a593f090f768f884049aa3aa929cbc" dependencies = [ "alloy-primitives", "async-trait", @@ -750,9 +750,9 @@ dependencies = [ [[package]] name = "alloy-signer-local" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c8950810dc43660c0f22883659c4218e090a5c75dce33fa4ca787715997b7b" +checksum = "930e17cb1e46446a193a593a3bfff8d0ecee4e510b802575ebe300ae2e43ef75" dependencies = [ "alloy-consensus", "alloy-network", @@ -839,9 +839,9 @@ dependencies = [ [[package]] name = "alloy-transport" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe215a2f9b51d5f1aa5c8cf22c8be8cdb354934de09c9a4e37aefb79b77552fd" +checksum = "cae82426d98f8bc18f53c5223862907cac30ab8fc5e4cd2bb50808e6d3ab43d8" dependencies = [ "alloy-json-rpc", "auto_impl", @@ -862,9 +862,9 @@ dependencies = [ [[package]] name = "alloy-transport-http" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1b37b1a30d23deb3a8746e882c70b384c574d355bc2bbea9ea918b0c31366e" +checksum = "90aa6825760905898c106aba9c804b131816a15041523e80b6d4fe7af6380ada" dependencies = [ "alloy-json-rpc", "alloy-transport", @@ -877,9 +877,9 @@ dependencies = [ [[package]] name = "alloy-transport-ipc" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52c81a4deeaa0d4b022095db17b286188d731e29ea141d4ec765e166732972e4" +checksum = "6ace83a4a6bb896e5894c3479042e6ba78aa5271dde599aa8c36a021d49cc8cc" dependencies = [ "alloy-json-rpc", "alloy-pubsub", @@ -897,9 +897,9 @@ dependencies = [ [[package]] name = "alloy-transport-ws" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9d6f5f304e8943afede2680e5fc7008780d4fc49387eafd53192ad95e20091" +checksum = "86c9ab4c199e3a8f3520b60ba81aa67bb21fed9ed0d8304e0569094d0758a56f" dependencies = [ "alloy-pubsub", "alloy-transport", @@ -935,9 +935,9 @@ dependencies = [ [[package]] name = "alloy-tx-macros" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ccf423f6de62e8ce1d6c7a11fb7508ae3536d02e0d68aaeb05c8669337d0937" +checksum = "ae109e33814b49fc0a62f2528993aa8a2dd346c26959b151f05441dc0b9da292" dependencies = [ "darling 0.21.3", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index b08a54c0e2..eb63e8977b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -489,33 +489,33 @@ alloy-trie = { version = "0.9.1", default-features = false } alloy-hardforks = "0.4.4" -alloy-consensus = { version = "1.0.41", default-features = false } -alloy-contract = { version = "1.0.41", default-features = false } -alloy-eips = { version = "1.0.41", default-features = false } -alloy-genesis = { version = "1.0.41", default-features = false } -alloy-json-rpc = { version = "1.0.41", default-features = false } -alloy-network = { version = "1.0.41", default-features = false } -alloy-network-primitives = { version = "1.0.41", default-features = false } -alloy-provider = { version = "1.0.41", features = ["reqwest", "debug-api"], default-features = false } -alloy-pubsub = { version = "1.0.41", default-features = false } -alloy-rpc-client = { version = "1.0.41", default-features = false } -alloy-rpc-types = { version = "1.0.41", features = ["eth"], default-features = false } -alloy-rpc-types-admin = { version = "1.0.41", default-features = false } -alloy-rpc-types-anvil = { version = "1.0.41", default-features = false } -alloy-rpc-types-beacon = { version = "1.0.41", default-features = false } -alloy-rpc-types-debug = { version = "1.0.41", default-features = false } -alloy-rpc-types-engine = { version = "1.0.41", default-features = false } -alloy-rpc-types-eth = { version = "1.0.41", default-features = false } -alloy-rpc-types-mev = { version = "1.0.41", default-features = false } -alloy-rpc-types-trace = { version = "1.0.41", default-features = false } -alloy-rpc-types-txpool = { version = "1.0.41", default-features = false } -alloy-serde = { version = "1.0.41", default-features = false } -alloy-signer = { version = "1.0.41", default-features = false } -alloy-signer-local = { version = "1.0.41", default-features = false } -alloy-transport = { version = "1.0.41" } -alloy-transport-http = { version = "1.0.41", features = ["reqwest-rustls-tls"], default-features = false } -alloy-transport-ipc = { version = "1.0.41", default-features = false } -alloy-transport-ws = { version = "1.0.41", default-features = false } +alloy-consensus = { version = "1.1.2", default-features = false } +alloy-contract = { version = "1.1.2", default-features = false } +alloy-eips = { version = "1.1.2", default-features = false } +alloy-genesis = { version = "1.1.2", default-features = false } +alloy-json-rpc = { version = "1.1.2", default-features = false } +alloy-network = { version = "1.1.2", default-features = false } +alloy-network-primitives = { version = "1.1.2", default-features = false } +alloy-provider = { version = "1.1.2", features = ["reqwest", "debug-api"], default-features = false } +alloy-pubsub = { version = "1.1.2", default-features = false } +alloy-rpc-client = { version = "1.1.2", default-features = false } +alloy-rpc-types = { version = "1.1.2", features = ["eth"], default-features = false } +alloy-rpc-types-admin = { version = "1.1.2", default-features = false } +alloy-rpc-types-anvil = { version = "1.1.2", default-features = false } +alloy-rpc-types-beacon = { version = "1.1.2", default-features = false } +alloy-rpc-types-debug = { version = "1.1.2", default-features = false } +alloy-rpc-types-engine = { version = "1.1.2", default-features = false } +alloy-rpc-types-eth = { version = "1.1.2", default-features = false } +alloy-rpc-types-mev = { version = "1.1.2", default-features = false } +alloy-rpc-types-trace = { version = "1.1.2", default-features = false } +alloy-rpc-types-txpool = { version = "1.1.2", default-features = false } +alloy-serde = { version = "1.1.2", default-features = false } +alloy-signer = { version = "1.1.2", default-features = false } +alloy-signer-local = { version = "1.1.2", default-features = false } +alloy-transport = { version = "1.1.2" } +alloy-transport-http = { version = "1.1.2", features = ["reqwest-rustls-tls"], default-features = false } +alloy-transport-ipc = { version = "1.1.2", default-features = false } +alloy-transport-ws = { version = "1.1.2", default-features = false } # op alloy-op-evm = { version = "0.24.1", default-features = false } diff --git a/crates/rpc/rpc-eth-api/src/core.rs b/crates/rpc/rpc-eth-api/src/core.rs index 4e0afbf6ab..9d8af4b803 100644 --- a/crates/rpc/rpc-eth-api/src/core.rs +++ b/crates/rpc/rpc-eth-api/src/core.rs @@ -18,7 +18,7 @@ use alloy_serde::JsonStorageKey; use jsonrpsee::{core::RpcResult, proc_macros::rpc}; use reth_primitives_traits::TxTy; use reth_rpc_convert::RpcTxReq; -use reth_rpc_eth_types::FillTransactionResult; +use reth_rpc_eth_types::FillTransaction; use reth_rpc_server_types::{result::internal_rpc_err, ToRpcResult}; use tracing::trace; @@ -242,7 +242,7 @@ pub trait EthApi< /// Fills the defaults on a given unsigned transaction. #[method(name = "fillTransaction")] - async fn fill_transaction(&self, request: TxReq) -> RpcResult>; + async fn fill_transaction(&self, request: TxReq) -> RpcResult>; /// Simulate arbitrary number of transactions at an arbitrary blockchain index, with the /// optionality of state overrides @@ -703,7 +703,7 @@ where async fn fill_transaction( &self, request: RpcTxReq, - ) -> RpcResult>> { + ) -> RpcResult>> { trace!(target: "rpc::eth", ?request, "Serving eth_fillTransaction"); Ok(EthTransactions::fill_transaction(self, request).await?) } diff --git a/crates/rpc/rpc-eth-api/src/helpers/transaction.rs b/crates/rpc/rpc-eth-api/src/helpers/transaction.rs index 2b1f3d0533..2f6c3674ed 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/transaction.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/transaction.rs @@ -24,7 +24,7 @@ use reth_rpc_convert::{transaction::RpcConvert, RpcTxReq}; use reth_rpc_eth_types::{ utils::{binary_search, recover_raw_transaction}, EthApiError::{self, TransactionConfirmationTimeout}, - FillTransactionResult, SignError, TransactionSource, + FillTransaction, SignError, TransactionSource, }; use reth_storage_api::{ BlockNumReader, BlockReaderIdExt, ProviderBlock, ProviderReceipt, ProviderTx, ReceiptProvider, @@ -450,7 +450,7 @@ pub trait EthTransactions: LoadTransaction { fn fill_transaction( &self, mut request: RpcTxReq, - ) -> impl Future>, Self::Error>> + Send + ) -> impl Future>, Self::Error>> + Send where Self: EthApiSpec + LoadBlock + EstimateCall + LoadFee, { @@ -511,7 +511,7 @@ pub trait EthTransactions: LoadTransaction { let raw = tx.encoded_2718().into(); - Ok(FillTransactionResult { raw, tx }) + Ok(FillTransaction { raw, tx }) } } diff --git a/crates/rpc/rpc-eth-types/src/lib.rs b/crates/rpc/rpc-eth-types/src/lib.rs index 7378ad9962..8d829aebf4 100644 --- a/crates/rpc/rpc-eth-types/src/lib.rs +++ b/crates/rpc/rpc-eth-types/src/lib.rs @@ -23,6 +23,7 @@ pub mod transaction; pub mod tx_forward; pub mod utils; +pub use alloy_rpc_types_eth::FillTransaction; pub use builder::config::{EthConfig, EthFilterConfig}; pub use cache::{ config::EthStateCacheConfig, db::StateCacheDb, multi_consumer::MultiConsumerLruCache, @@ -35,5 +36,5 @@ pub use gas_oracle::{ }; pub use id_provider::EthSubscriptionIdProvider; pub use pending_block::{PendingBlock, PendingBlockEnv, PendingBlockEnvOrigin}; -pub use transaction::{FillTransactionResult, TransactionSource}; +pub use transaction::TransactionSource; pub use tx_forward::ForwardConfig; diff --git a/crates/rpc/rpc-eth-types/src/transaction.rs b/crates/rpc/rpc-eth-types/src/transaction.rs index 3d099f0118..de3323d61e 100644 --- a/crates/rpc/rpc-eth-types/src/transaction.rs +++ b/crates/rpc/rpc-eth-types/src/transaction.rs @@ -2,21 +2,11 @@ //! //! Transaction wrapper that labels transaction with its origin. -use alloy_primitives::{Bytes, B256}; +use alloy_primitives::B256; use alloy_rpc_types_eth::TransactionInfo; use reth_ethereum_primitives::TransactionSigned; use reth_primitives_traits::{NodePrimitives, Recovered, SignedTransaction}; use reth_rpc_convert::{RpcConvert, RpcTransaction}; -use serde::{Deserialize, Serialize}; - -/// Response type for `eth_fillTransaction` RPC method. -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct FillTransactionResult { - /// RLP-encoded transaction bytes - pub raw: Bytes, - /// Filled transaction object - pub tx: T, -} /// Represents from where a transaction was fetched. #[derive(Debug, Clone, Eq, PartialEq)]