Skip to content
Discussion options

You must be logged in to vote

The reason these parameters are passed to eth_estimateGas in Viem is to support EVM network execution nuances and conditional contract logic that depends on gas limits or transaction fee properties.

Here is the technical breakdown of why they are included and how to handle strict providers:


Why Gas & Fee Parameters Impact eth_estimateGas

  1. State Execution & Conditional Logic (gas)
    Contracts frequently contain logic like gasleft() or explicit checks on remaining gas. If a custom or bounded gas parameter is provided in the call, the node executes the EVM bytecode under that limit. Passing gas allows users to test whether an execution succeeds under a specific gas constraint.

  2. EIP-1559 and…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by arijoon
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants