Skip to content

fix: read-only commands don't require a source account - #112

Merged
pselle merged 2 commits into
mainfrom
fix/read-only-no-source
Nov 9, 2026
Merged

pselle merged 2 commits into
mainfrom
fix/read-only-no-source

Conversation

@pselle

@pselle pselle commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Closes #111.

Each read-only command uses clap's mut_arg to make --source-account optional. When no source is given, the command simulates as the all-zeros public key, since simulation doesn't need a funded account. Commands that send transactions still require a source.

I checked fetch-contract-id, current-version, fetch-hash and download on testnet with an empty config and no STELLAR_ACCOUNT. publish still errors without a source. The integration tests weren't run, because they need a local quickstart.

fetch-contract-id, fetch-hash, current-version, download,
fetch-account-id, fetch-account-owner and create-alias only simulate
reads, which work with any public key. Make --source-account optional
for them, so import_contract! builds in CI without an identity.

Closes #111

Co-Authored-By: Claude <noreply@anthropic.com>
@pselle pselle self-assigned this Nov 6, 2026
Replace ReadArgs with a clap mut_arg on each read-only command, so they
keep global::Args and call sites stay `&self.config`.

Co-Authored-By: Claude <noreply@anthropic.com>
@pselle
pselle marked this pull request as ready for review November 6, 2026 17:08
@pselle
pselle requested a review from willemneal November 6, 2026 17:09
@pselle
pselle merged commit 8902daf into main Nov 9, 2026
5 checks passed
@pselle
pselle deleted the fix/read-only-no-source branch November 9, 2026 16:29
@aha-release-plz aha-release-plz Bot mentioned this pull request Nov 9, 2026
pselle pushed a commit that referenced this pull request Nov 9, 2026
## 🤖 New release

* `stellar-registry-macro`: 0.1.3 -> 0.1.4
* `stellar-registry`: 0.1.3 -> 0.1.4 (✓ API compatible changes)
* `stellar-registry-build`: 0.2.0 -> 0.3.0 (⚠ API breaking changes)
* `stellar-registry-cli`: 0.3.0 -> 0.3.1 (✓ API compatible changes)

### ⚠ `stellar-registry-build` breaking changes

```text
--- failure enum_variant_added: enum variant added on exhaustive enum ---

Description:
A publicly-visible enum without #[non_exhaustive] has a new variant.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#enum-variant-new
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.51.0/src/lints/enum_variant_added.ron

Failed in:
  variant Error:NoLocalRegistry in /tmp/.tmpx1tFqO/cli/crates/stellar-registry-build/src/error.rs:35
  variant Error:NoLocalRegistry in /tmp/.tmpx1tFqO/cli/crates/stellar-registry-build/src/error.rs:35
```

<details><summary><i><b>Changelog</b></i></summary><p>

## `stellar-registry-macro`

<blockquote>

##
[0.1.4](stellar-registry-macro-v0.1.3...stellar-registry-macro-v0.1.4)
- 2026-11-09

### Added

- support Stellar Asset Contracts in register_import!
([#82](#82))
- add register_import! for testing import_contract! callers
([#77](#77))
</blockquote>

## `stellar-registry`

<blockquote>

##
[0.1.4](stellar-registry-v0.1.3...stellar-registry-v0.1.4)
- 2026-11-09

### Added

- support Stellar Asset Contracts in register_import!
([#82](#82))
- add register_import! for testing import_contract! callers
([#77](#77))
</blockquote>

## `stellar-registry-build`

<blockquote>

##
[0.3.0](stellar-registry-build-v0.2.0...stellar-registry-build-v0.3.0)
- 2026-11-09

### Added

- add register_import! for testing import_contract! callers
([#77](#77))
</blockquote>

## `stellar-registry-cli`

<blockquote>

##
[0.3.1](stellar-registry-cli-v0.3.0...stellar-registry-cli-v0.3.1)
- 2026-11-09

### Added

- add register_import! for testing import_contract! callers
([#77](#77))

### Fixed

- read-only commands don't require a source account
([#112](#112))

### Other

- *(deps)* bump shlex from 1.3.0 to 2.0.1
([#105](#105))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: aha-release-plz[bot] <211513279+aha-release-plz[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Read-only commands require --source-account

2 participants