-
Notifications
You must be signed in to change notification settings - Fork 239
Open
Labels
Description
What version are you using?
Stellar CLI v23.2.1
What did you do?
Followed example contract tutorials (Storage, Events, Logging, Auth, Tokens). They instruct running:
stellar contract invoke \
--wasm target/wasm32v1-none/release/soroban_logging_contract.wasm \
--id 1 \
-- \
hello \
--value friendDocumentation URL: https://developers.stellar.org/docs/build/smart-contracts/example-contracts/logging (and others)
What did you expect to see?
The contract function executing and returning a result.
What did you see instead?
error: unexpected argument '--wasm' found
The --wasm flag was removed from stellar contract invoke in PR # 997 (in the stellar-cli repo, October 2023). The sandbox mode that allowed invoking directly from a WASM file no longer exists. Contracts must be deployed first, then invoked by contract ID.
Fix: Replace all invoke-with-wasm patterns with a two-step deploy-then-invoke workflow:
# Step 1: Deploy
stellar contract deploy \
--wasm target/wasm32v1-none/release/soroban_logging_contract.wasm \
--alias logging-contract \
--source-account alice \
--network testnet
# Step 2: Invoke
stellar contract invoke \
--id logging-contract \
--source-account alice \
--network testnet \
-- \
hello \
--value friendReactions are currently unavailable