Skip to content

Resolve identity aliases inside nested invoke arguments.#2552

Merged
fnando merged 10 commits into
mainfrom
nested-address-alias-resolution
May 5, 2026
Merged

Resolve identity aliases inside nested invoke arguments.#2552
fnando merged 10 commits into
mainfrom
nested-address-alias-resolution

Conversation

@fnando
Copy link
Copy Markdown
Member

@fnando fnando commented May 4, 2026

What

Resolve identity aliases inside nested invoke arguments.

Why

Close #2548

Known limitations

N/A

@fnando fnando self-assigned this May 4, 2026
@fnando fnando added this to DevX May 4, 2026
Copilot AI review requested due to automatic review settings May 4, 2026 22:57
@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX May 4, 2026
@fnando fnando moved this from Backlog (Not Ready) to Needs Review in DevX May 4, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Soroban contract argument parsing so identity aliases (e.g. mando) are resolved not only for top-level Address arguments, but also when Address/MuxedAddress values appear nested inside JSON-encoded custom types (structs, vectors, maps, tuples, unions), addressing issue #2548.

Changes:

  • Centralizes alias-to-strkey rewriting via a spec-driven JSON walker (resolve_aliases*) invoked from parse_argument_with_validation.
  • Keeps top-level “address arg” signer collection, while removing the previous top-level-only address resolution special-case.
  • Adds unit tests for the JSON walker and an integration test that validates alias resolution inside a nested custom type (Asset).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
cmd/soroban-cli/src/commands/contract/arg_parsing.rs Adds spec-guided alias resolution for nested Address/MuxedAddress positions during argument parsing, plus unit tests.
cmd/crates/soroban-test/tests/it/integration/custom_types.rs Adds an integration test asserting alias resolution works inside a nested custom type passed to invoke.

Comment thread cmd/soroban-cli/src/commands/contract/arg_parsing.rs Outdated
Comment thread cmd/soroban-cli/src/commands/contract/arg_parsing.rs
Comment thread cmd/soroban-cli/src/commands/contract/arg_parsing.rs
@fnando fnando enabled auto-merge (squash) May 5, 2026 17:53
@fnando fnando merged commit 2af8896 into main May 5, 2026
211 checks passed
@fnando fnando deleted the nested-address-alias-resolution branch May 5, 2026 17:53
@github-project-automation github-project-automation Bot moved this from Needs Review to Done in DevX May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Can't use address alias in structure when calling invoke

4 participants