GasPriceSuggestion

Documentation for eth_defi.gas.GasPriceSuggestion Python class.

class GasPriceSuggestion

Bases: object

Gas price details.

Capture the necessary information for the gas price to used during the transaction building.

  • EIP-1559 London hard fork chains (Ethereumm mainnet)

  • Legacy EVM: Polygon, BNB Chain

Attributes summary

base_fee

legacy_gas_price

max_fee_per_gas

max_priority_fee_per_gas

Methods summary

__init__(method[, legacy_gas_price, ...])

get_tx_gas_params()

Get gas params as they are applied to ContractFunction.build_transaction()

pformat()

Pretty format for logging.

__init__(method, legacy_gas_price=None, base_fee=None, max_priority_fee_per_gas=None, max_fee_per_gas=None)
Parameters
Return type

None

get_tx_gas_params()

Get gas params as they are applied to ContractFunction.build_transaction()

Return type

dict

pformat()

Pretty format for logging.

Return type

str