Skip to content

Commit

Permalink
fix: types inside mev_calls.rs (#1435)
Browse files Browse the repository at this point in the history
* fix: update types inside bundle

* chore: review fixes

* address review comments

* Add revert and exec_error in response
  • Loading branch information
SkandaBhat authored Oct 15, 2024
1 parent 56bfd0f commit ff07988
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions crates/rpc-types-mev/src/mev_calls.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::common::{Privacy, ProtocolVersion, Validity};

use alloy_eips::BlockId;
use alloy_primitives::{Address, Bytes, Log, TxHash};
use alloy_primitives::{Address, Bytes, Log, TxHash, U256};
use serde::{Deserialize, Serialize};

/// A bundle of transactions to send to the matchmaker.
Expand Down Expand Up @@ -144,20 +144,23 @@ pub struct SimBundleResponse {
#[serde(with = "alloy_serde::quantity")]
pub state_block: u64,
/// The gas price of the simulated block.
#[serde(with = "alloy_serde::quantity")]
pub mev_gas_price: u64,
pub mev_gas_price: U256,
/// The profit of the simulated block.
#[serde(with = "alloy_serde::quantity")]
pub profit: u64,
pub profit: U256,
/// The refundable value of the simulated block.
#[serde(with = "alloy_serde::quantity")]
pub refundable_value: u64,
pub refundable_value: U256,
/// The gas used by the simulated block.
#[serde(with = "alloy_serde::quantity")]
pub gas_used: u64,
/// Logs returned by `mev_simBundle`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub logs: Option<Vec<SimBundleLogs>>,
/// Error message if the bundle execution failed.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub exec_error: Option<String>,
/// Contains the return data if the transaction reverted
#[serde(skip_serializing_if = "Option::is_none")]
pub revert: Option<Bytes>,
}

/// Logs returned by `mev_simBundle`.
Expand Down

0 comments on commit ff07988

Please sign in to comment.