Skip to content

stellar contract deploy --id is invalid in CLI v23+ — affects ~8 example contract tutorials #2211

@kaankacar

Description

@kaankacar

What version are you using?

Stellar CLI v23.2.1 (output of stellar version)

What did you do?

Followed the example contracts tutorials as a new developer. Multiple tutorials (Storage, Cross Contract Calls, Workspace, and others) instruct running:

stellar contract deploy \
  --wasm target/wasm32v1-none/release/soroban_cross_contract_a_contract.wasm \
  --id a

Documentation URL: https://developers.stellar.org/docs/build/smart-contracts/example-contracts

What did you expect to see?

A successful contract deployment with the contract registered under ID a.

What did you see instead?

error: unexpected argument '--id' found

Note: --id is a valid flag on stellar contract invoke (to specify the contract to call), but it does not exist on stellar contract deploy. The deploy command uses --alias instead. The tutorials conflate the two, using --id on deploy where --alias is required.

Fix: Replace all --id <name> with --alias <name> on deploy commands, and add --source-account and --network flags:

stellar contract deploy \
  --wasm target/wasm32v1-none/release/soroban_cross_contract_a_contract.wasm \
  --alias a \
  --source-account alice \
  --network testnet

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdev-rel

Type

No type

Projects

Status

To Do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions