Skip to content

Commit

Permalink
feat(rpc-type-eth) convert vec TxReq to bundle (#1091)
Browse files Browse the repository at this point in the history
* Update call.rs

* clippy
  • Loading branch information
DoTheBestToGetTheBest authored Jul 23, 2024
1 parent 7d67e9c commit 135590e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/rpc-types-eth/src/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ pub struct Bundle {
pub block_override: Option<BlockOverrides>,
}

impl From<Vec<TransactionRequest>> for Bundle {
/// Converts a `TransactionRequest` into a `Bundle`.
fn from(tx_request: Vec<TransactionRequest>) -> 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")]
Expand Down

0 comments on commit 135590e

Please sign in to comment.