dex-interactor - multiple wallets/contracts#2320
Merged
andrei-marinica merged 7 commits intomasterfrom Mar 25, 2026
Merged
Conversation
|
Contract comparison - from b41757e to 001a424
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the forwarder-blind dex interactor to support operating across multiple wallets and multiple forwarder contract instances, and introduces a standalone ShardId type in chain/core to cleanly represent shard indices.
Changes:
- Add support for registering multiple wallets (via PEM paths) and batching deploy/wrap/swap/drain operations across them.
- Persist multiple deployed forwarder addresses in
state.tomland update drain logic to use each contract’s on-chain owner if that owner wallet is registered. - Extract
ShardIdinto its own module and update shard computation/tests to use the newtype API.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| framework/snippets/src/interactor/interactor_sender.rs | Adds get_registered_owner() helper to map contract owner → registered wallet. |
| framework/snippets/src/interactor/interactor_base.rs | Adds is_registered_wallet() helper for wallet lookup. |
| contracts/feature-tests/composability/forwarder-blind/dex-interactor/state.toml | Switches state format from single contract address to an array. |
| contracts/feature-tests/composability/forwarder-blind/dex-interactor/src/state.rs | Stores multiple contract addresses and customizes persistence output. |
| contracts/feature-tests/composability/forwarder-blind/dex-interactor/src/interact.rs | Refactors interactor flows to run across multiple wallets/contracts; updates drain logic. |
| contracts/feature-tests/composability/forwarder-blind/dex-interactor/src/config.rs | Adds wallet_pem_paths and contract_addresses to config. |
| contracts/feature-tests/composability/forwarder-blind/dex-interactor/config.toml | Documents and provides example lists for wallet PEMs and contract addresses. |
| chain/core/src/types/shard_id.rs | Introduces ShardId newtype with serde/display support. |
| chain/core/src/types/shard_config.rs | Uses new ShardId module and updates tests/accessors accordingly. |
| chain/core/src/types.rs | Exposes the new shard_id module and re-exports ShardId. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
contracts/feature-tests/composability/forwarder-blind/dex-interactor/src/interact.rs
Show resolved
Hide resolved
contracts/feature-tests/composability/forwarder-blind/dex-interactor/src/state.rs
Outdated
Show resolved
Hide resolved
contracts/feature-tests/composability/forwarder-blind/dex-interactor/src/interact.rs
Show resolved
Hide resolved
contracts/feature-tests/composability/forwarder-blind/dex-interactor/src/config.rs
Outdated
Show resolved
Hide resolved
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.
No description provided.