From 135590eecfd82cf999d549e9440a70e370afe083 Mon Sep 17 00:00:00 2001 From: tesseract <146037313+DoTheBestToGetTheBest@users.noreply.github.com> Date: Tue, 23 Jul 2024 03:31:55 -0700 Subject: [PATCH] feat(rpc-type-eth) convert vec TxReq to bundle (#1091) * Update call.rs * clippy --- crates/rpc-types-eth/src/call.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/rpc-types-eth/src/call.rs b/crates/rpc-types-eth/src/call.rs index 09f47660e5b..4f4d65c3370 100644 --- a/crates/rpc-types-eth/src/call.rs +++ b/crates/rpc-types-eth/src/call.rs @@ -12,6 +12,13 @@ pub struct Bundle { pub block_override: Option, } +impl From> for Bundle { + /// Converts a `TransactionRequest` into a `Bundle`. + fn from(tx_request: Vec) -> Self { + Self { transactions: tx_request, block_override: None } + } +} + /// State context for callMany #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] #[serde(default, rename_all = "camelCase")]