Interactor gas price, dex-interactor refactor#2321
Merged
andrei-marinica merged 2 commits intorc/v0.66from Mar 30, 2026
Merged
Conversation
|
Contract comparison - from 3c74a99 to b76fd8c
|
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the snippets interactor to allow an overridable gas price (instead of always using the network minimum), and refactors the forwarder-blind dex-interactor crate into clearer module/file names with a dedicated CLI/main entrypoint.
Changes:
- Introduce
gas_priceonInteractorBase(defaulting tonetwork_config.min_gas_price) and use it when building deploy/call transactions. - Refactor forwarder-blind dex-interactor into
dex_interactor.rs+dex_interactor_cli.rs+dex_interactor_main.rs, and updateCargo.tomlbin/lib paths. - Adjust dex-interactor to multiply the interactor gas price.
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| framework/snippets/src/interactor/interactor_scenario/interactor_sc_deploy.rs | Uses self.gas_price when building deploy transactions. |
| framework/snippets/src/interactor/interactor_scenario/interactor_sc_call.rs | Uses self.gas_price when building call transactions. |
| framework/snippets/src/interactor/interactor_base.rs | Adds gas_price field and initializes it from network config. |
| contracts/feature-tests/composability/forwarder-blind/dex-interactor/src/dex_interactor_main.rs | New tokio main that runs the dex-interactor CLI. |
| contracts/feature-tests/composability/forwarder-blind/dex-interactor/src/dex_interactor_cli.rs | New clap-based CLI definitions for dex-interactor commands. |
| contracts/feature-tests/composability/forwarder-blind/dex-interactor/src/dex_interactor.rs | Module rename/refactor and sets a higher gas price in ContractInteract::new. |
| contracts/feature-tests/composability/forwarder-blind/dex-interactor/Cargo.toml | Updates bin/lib entrypoints to the new file names. |
Comments suppressed due to low confidence (2)
contracts/feature-tests/composability/forwarder-blind/dex-interactor/src/dex_interactor.rs:118
ContractInteract::newno longer appliesconfig.use_chain_simulator(), sochain_type = simulatorinconfig.tomlwill be ignored and chain-simulator-specific operations (funding wallets, generating blocks, etc.) won’t run. Re-introduce settinguse_chain_simulatoron theInteractorbased onconfig.use_chain_simulator()before using the interactor.
contracts/feature-tests/composability/forwarder-blind/dex-interactor/src/dex_interactor.rs:118interactor.gas_price *= 25;introduces an unexplained magic multiplier. Consider making this a named constant and/or configurable viaconfig.toml/CLI (and document why it’s needed), so it’s clear what gas price policy the interactor is using.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Updates the snippets interactor to allow an overridable gas price (instead of always using the network minimum), and refactors the forwarder-blind dex-interactor crate into clearer module/file names with a dedicated CLI/main entrypoint.
Changes:
gas_priceonInteractorBase(defaulting tonetwork_config.min_gas_price) and use it when building deploy/call transactions.dex_interactor.rs+dex_interactor_cli.rs+dex_interactor_main.rs, and updateCargo.tomlbin/lib paths.