feat(evm): allow gas bumping on contract.NewWrite#1057
Conversation
🦋 Changeset detectedLatest commit: d23ef79 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Pull request overview
This PR extends the chain/evm/operations2/contract write operation flow so that contract writes created via contract.NewWrite can participate in gas-boosting retry behavior (similar to deploys), enabling “bump gas and retry” semantics for operations-gen generated write operations.
Changes:
- Updated
contract.NewWriteto apply gas limit/price overrides (when executing directly) viadeployTransactOpts(...). - Added
RetryWriteWithGasBoostexecute option to bumpFunctionInputgas fields on gas-related retryable errors (skipping ZkSync VM chains). - Expanded
FunctionInputto includeGasLimit/GasPricefields, and added tests for the new retry helper.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| chain/evm/operations2/contract/write.go | Applies gas overrides to write transact opts when execution is allowed. |
| chain/evm/operations2/contract/gas_boost.go | Adds RetryWriteWithGasBoost helper for gas-bumping retries on writes. |
| chain/evm/operations2/contract/gas_boost_test.go | Adds unit tests validating retry + gas limit bump behavior for writes. |
| chain/evm/operations2/contract/function.go | Extends write/read input struct with optional gas override fields. |
| .changeset/fast-rules-sneeze.md | Declares a minor release entry for the new feature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a37b493 to
dcd1601
Compare
contract.NewWrite is used by operations-gen in the generated code, we also want to support gas bumping here
dcd1601 to
d23ef79
Compare
|




contract.NewWrite is used by operations-gen in the generated code, we also want to support gas bumping here