Repository navigation
fix(models): estimate every call of a batch in to_estimate_gas_request - #104
Open
mehmetkr-31 wants to merge 1 commit into
Open
mehmetkr-31 wants to merge 1 commit into
mehmetkr-31 wants to merge 1 commit into
Conversation
`to_estimate_gas_request` built the request from `calls[0]` alone, so a batch was estimated as if it had a single call. On moderato a three-call batch of pathUSD `balanceOf` calls estimates to 287,699 gas, but the helper returned 277,031, and the node rejects the batch at that limit with "intrinsic gas too low". Send a batch as `calls` so the node estimates all of them. Single-call requests keep their `to`/`data`/`value` shape. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TempoTransaction.to_estimate_gas_requestbuilt the request fromcalls[0]only, so a batch was estimated as a single call. The transactions guide recommends this helper for gas estimation.On moderato, a three-call batch of pathUSD
balanceOfcalls, estimated throughw3.eth.estimate_gas(tx.to_estimate_gas_request(...)):from,to,dataintrinsic gas too lowfrom,callsA batch is now sent as
calls, withvalueon every call (the node requires it) andto: nullfor a create. Single-call requests keep theirto/data/valueshape. The new single-call test passes against the old code too.Tested with
uv run pytest(283 passed, 37 integration tests skipped),ruff checkandruff format --check. The batch test fails without the change.🤖 Generated with Claude Code