#27463·sui

sui client upgrade does not accept --named-addresses (unlike sui client publish)

Author: dwill6413Created Jul 27, 2026Updated Sep 26, 2026
LabelsStale

Summary

sui client publish accepts a --named-addresses flag to override placeholder addresses in Move.toml at build time. sui client upgrade does not accept the same flag, despite upgrading and publishing sharing the same underlying build/resolve step, and despite nothing in the CLI's documentation calling out this asymmetry.

Steps to Reproduce Issue

  1. Have a Move.toml with a placeholder named address, e.g. my_addr = "0x0", that the package's own source code depends on.
  2. Run:
bash
sui client upgrade --upgrade-capability <UPGRADE_CAP_ID> --gas-budget 200000000 \
    --named-addresses my_addr=<ADDRESS>

Expected Result

The upgrade builds with my_addr resolved to <ADDRESS>, the same way sui client publish --named-addresses my_addr=<ADDRESS> would resolve it at publish time.

Actual Result

error: unexpected argument '--named-addresses' found
  tip: to pass '--named-addresses' as a value, use '-- --named-addresses'
Usage: sui.exe client upgrade --upgrade-capability <UPGRADE_CAPABILITY> <--gas-budget <GAS_BUDGET>|--gas-price <GAS_PRICE>|--gas-sponsor <GAS_SPONSOR>> [package_path]

The printed usage string shows client upgrade's argument parser has no build-config passthrough options at all, unlike client publish.

Workaround used: edit the [addresses] table in Move.toml directly, run the upgrade, then revert the file afterward. Works, but is an easy way to accidentally publish a package with the wrong address baked in if the revert step is forgotten, and it contradicts the pattern documented for publish.

Suggested Fix

Either add --named-addresses (and ideally the rest of the build-config flag surface) to sui client upgrade so it matches sui client publish, or, if the asymmetry is intentional, document it explicitly in the CLI --help text and the upgrade guide.

System Information

  • OS: Windows (also expected to reproduce on Linux/macOS, since this is an argument-parsing gap, not a platform-specific issue)
  • Sui CLI: mainnet-v1.75.2