pub struct GasAnalysis {
pub avg_gas_used: u64,
pub max_gas_used: u64,
pub min_gas_used: u64,
pub total_gas_cost_wei: String,
pub total_gas_cost_formatted: String,
pub tx_count: u64,
pub gas_by_function: Vec<GasByFunction>,
pub failed_tx_count: u64,
pub wasted_gas: u64,
}Expand description
Gas usage analysis for a contract or address.
Fields§
§avg_gas_used: u64Average gas used per transaction.
max_gas_used: u64Maximum gas used in a single transaction.
min_gas_used: u64Minimum gas used in a single transaction.
total_gas_cost_wei: StringTotal gas spent (sum of gas_used * gas_price).
total_gas_cost_formatted: StringTotal gas cost in ETH/native token.
tx_count: u64Number of transactions analyzed.
gas_by_function: Vec<GasByFunction>Gas usage by function selector (top callers).
failed_tx_count: u64Failed transaction count and wasted gas.
wasted_gas: u64Gas wasted on failed transactions.
Trait Implementations§
Source§impl Clone for GasAnalysis
impl Clone for GasAnalysis
Source§impl Debug for GasAnalysis
impl Debug for GasAnalysis
Source§impl<'de> Deserialize<'de> for GasAnalysis
impl<'de> Deserialize<'de> for GasAnalysis
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GasAnalysis
impl RefUnwindSafe for GasAnalysis
impl Send for GasAnalysis
impl Sync for GasAnalysis
impl Unpin for GasAnalysis
impl UnsafeUnpin for GasAnalysis
impl UnwindSafe for GasAnalysis
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more