estimate_gas_fees
Documentation for eth_defi.gas.estimate_gas_fees function.
- estimate_gas_fees(web3, method=None, gas_price_buffer_multiplier=1.12)
Get a good gas price for a transaction.
Applies a safety buffer to
maxFeePerGasto absorb base fee fluctuations between estimation and transaction submission. SeeGAS_PRICE_BUFFER_MULTIPLIERfor details.- Parameters
web3 (web3.main.Web3) – Web3 instance connected to a node.
method – Force a specific gas pricing method. If
None, auto-detect based on whether the chain supports EIP-1559.gas_price_buffer_multiplier (float) – Multiplier applied to
maxFeePerGasto absorb base fee fluctuations. Defaults toGAS_PRICE_BUFFER_MULTIPLIER(1.12 = 12% buffer). Set to1.0to disable the buffer.
- Return type