GasEstimate

Documentation for eth_defi.gmx.gas_monitor.GasEstimate Python class.

class GasEstimate

Bases: object

Gas estimation result with cost breakdown.

Parameters
  • raw_gas_limit – Raw estimate from web3.eth.estimate_gas()

  • gas_limit – Final estimate after buffer applied

  • safety_buffer – Buffer multiplier that was applied (e.g., 1.2)

  • gas_price_wei – Current gas price in wei

  • estimated_cost_wei – Estimated total cost in wei

  • estimated_cost_native – Estimated cost in native token units

  • native_price_usd – Current price of native token in USD (None if unavailable)

  • estimated_cost_usd – Estimated cost in USD (None if price unavailable)

Attributes summary

raw_gas_limit

gas_limit

safety_buffer

gas_price_wei

estimated_cost_wei

estimated_cost_native

native_price_usd

estimated_cost_usd

Methods summary

__init__(raw_gas_limit, gas_limit, ...)

__init__(raw_gas_limit, gas_limit, safety_buffer, gas_price_wei, estimated_cost_wei, estimated_cost_native, native_price_usd, estimated_cost_usd)
Parameters
  • raw_gas_limit (int) –

  • gas_limit (int) –

  • safety_buffer (float) –

  • gas_price_wei (int) –

  • estimated_cost_wei (int) –

  • estimated_cost_native (decimal.Decimal) –

  • native_price_usd (float | None) –

  • estimated_cost_usd (float | None) –

Return type

None