This guide covers common issues when building, deploying, funding, and invoking the PocketPay Savings Vault contract on Stellar testnet.
The commands in this repository use the older soroban CLI style. Newer
Stellar documentation may show the stellar CLI for Soroban smart contracts.
Follow the command style used in this repository unless maintainers update the
README and deployment instructions.
This guide does not cover every possible deployment error, but it should help with the issues contributors most often hit while getting started.
Run these checks before deploying:
rustup --version
rustc --version
cargo --version
rustup target list --installed
soroban --version
soroban network ls
soroban keys ls
cargo build --target wasm32-unknown-unknown --releaseConfirm that:
wasm32-unknown-unknownis installed.soroban --versionworks.testnetis listed insoroban network ls.- Your deployer identity is listed in
soroban keys ls. - The release WASM exists at
target/wasm32-unknown-unknown/release/savings_vault.wasm.
If you use a newer Stellar CLI locally, these commands may also be useful:
stellar --version
stellar network ls
stellar keys lscargo build --target wasm32-unknown-unknown --release fails with an error
about a missing standard library, missing target, or can't find crate for core.
Rust is installed, but the WebAssembly target used by this repository is not installed for your active Rust toolchain.
Install the target used by this repository, then rebuild:
rustup target add wasm32-unknown-unknown
cargo build --target wasm32-unknown-unknown --releaseCheck installed targets with:
rustup target list --installedThis repository currently builds with wasm32-unknown-unknown. Newer Stellar
smart contract setup guides may use:
rustup target add wasm32v1-noneDo not replace the repository's existing build target unless maintainers update the project build instructions.
Your terminal prints soroban: command not found, stellar: command not found,
or a Windows message that the command is not recognized.
The CLI is not installed, or Cargo's binary directory is not on your PATH.
Install the CLI used by this repository:
cargo install --locked soroban-cli
soroban --versionIf the install succeeds but the command is still not found, restart your terminal and check that Cargo's bin directory is on your path:
cargo --versionOn many systems, Cargo installs binaries under ~/.cargo/bin.
Newer Stellar documentation may show:
stellar --versionThat is useful for contributors using the newer CLI, but this repository's
README currently uses soroban commands.
A command copied from the README fails with an unknown flag, missing subcommand, or different argument format than expected.
Your installed CLI version does not match the command style in the README, or
you are mixing newer stellar examples with this repository's older soroban
commands.
Check your CLI versions:
soroban --version
stellar --versionUse the command family consistently. For this repository, start with the
soroban commands from the README:
soroban network ls
soroban keys ls
soroban contract deploy \
--wasm target/wasm32-unknown-unknown/release/savings_vault.wasm \
--source deployer \
--network testnetAvoid mixing soroban and stellar commands in the same deployment attempt
unless you know both CLIs are configured with the same network and identity.
Deployment or invocation fails because the source account cannot pay fees, or Friendbot returns an error when funding your testnet address.
The deployer identity is not funded, the wrong address was funded, Friendbot is temporarily unavailable, or Friendbot rate limits are being hit.
Check the deployer address:
soroban keys address deployerFund it with Friendbot in a browser:
https://friendbot.stellar.org/?addr=YOUR_ADDRESS
If your CLI supports funding directly, you can also try:
soroban keys fund deployer --network testnetFor newer CLI setups, the equivalent may be:
stellar keys fund deployer --network testnetFriendbot is only for testnet. If funding fails, wait a few minutes and try
again. Make sure you fund the public address returned by soroban keys address deployer, not a contract ID.
Deployment or invocation fails with RPC errors, network passphrase errors, connection failures, or messages suggesting the account does not exist even after funding.
The testnet network is missing, points to the wrong RPC URL, uses the wrong
passphrase, or your identity was funded on a different network than the one
used by the command.
List configured networks:
soroban network lsAdd the testnet configuration used by the README:
soroban network add \
--global testnet \
--rpc-url https://soroban-testnet.stellar.org:443 \
--network-passphrase "Test SDF Network ; September 2015"Then confirm your identity exists:
soroban keys ls
soroban keys address deployerIf you use the newer stellar CLI, inspect its network config separately:
stellar network ls
stellar keys lsNetwork and key configuration may not be shared between older and newer CLI tools.
The contract does not compile, or the expected WASM file is not generated.
Common causes include a missing WASM target, running the command outside the repository root, stale build output, or Rust dependency/toolchain issues.
From the repository root, run:
rustup target add wasm32-unknown-unknown
cargo build --target wasm32-unknown-unknown --releaseYou can also use the project task runner:
make build-releaseCheck the expected output path:
target/wasm32-unknown-unknown/release/savings_vault.wasm
Run cargo test separately to check contract behavior. Tests run natively and
do not require a WASM build:
cargo testsoroban contract deploy fails, cannot find the WASM file, reports an invalid
source account, or fails with insufficient balance or network errors.
The release WASM has not been built, the deployer identity is missing or unfunded, the wrong network is selected, or the command is being run from the wrong directory.
Build the WASM and verify your deployer:
cargo build --target wasm32-unknown-unknown --release
soroban keys ls
soroban keys address deployer
soroban keys fund deployer --network testnetDeploy using the README command style:
soroban contract deploy \
--wasm target/wasm32-unknown-unknown/release/savings_vault.wasm \
--source deployer \
--network testnetSave the returned contract ID. You need that exact value for later
soroban contract invoke commands.
soroban contract invoke fails with an invalid contract ID, authorization
error, insufficient balance, missing argument, wrong argument type, or contract
panic.
The command may use the wrong contract ID, the source identity may not match the address argument requiring authorization, the identity may be unfunded, or the function arguments may not match the contract function signature.
Confirm your identity and network:
soroban keys ls
soroban keys address deployer
soroban network lsInitialize with the contract ID returned by deploy:
soroban contract invoke \
--id YOUR_CONTRACT_ID \
--source deployer \
--network testnet \
-- \
initialize \
--admin deployerCall functions using the argument names from the README:
soroban contract invoke \
--id YOUR_CONTRACT_ID \
--source deployer \
--network testnet \
-- \
deposit \
--user deployer \
--amount 1000soroban contract invoke \
--id YOUR_CONTRACT_ID \
--source deployer \
--network testnet \
-- \
get_balance \
--user deployerIf the account may be unfunded, fund it again:
soroban keys fund deployer --network testnetYOUR_CONTRACT_ID is not your public key and not the WASM hash. It is the
contract ID returned by the deploy command. Also, initialize can only be run
once for a deployed contract.
Commands fail because line continuations are not recognized, make or sh is
missing, paths are not found, or the terminal says scripts are disabled.
The README examples use Unix-style shell formatting. Windows PowerShell, Command Prompt, Git Bash, and WSL handle paths and multi-line commands differently.
Use Git Bash or WSL for the README commands when possible. If using PowerShell, run commands on one line when backslash continuations fail:
soroban contract deploy --wasm target/wasm32-unknown-unknown/release/savings_vault.wasm --source deployer --network testnetIf make build-release is unavailable, use Cargo directly:
cargo build --target wasm32-unknown-unknown --releaseCheck the WASM path from the repository root:
target/wasm32-unknown-unknown/release/savings_vault.wasm
PowerShell uses backticks for line continuation, not backslashes. Copying the README's multi-line Bash commands into PowerShell may require converting them to one-line commands.
You have checked the target, CLI, network, funding, WASM path, and invocation arguments, but deployment or invocation still fails.
The problem may be a CLI version change, a temporary testnet/RPC issue, a contract-specific panic, or a documentation gap.
Collect the exact command and error output before asking for help:
rustup --version
rustc --version
cargo --version
soroban --version
soroban network ls
soroban keys ls
cargo build --target wasm32-unknown-unknown --releaseInclude:
- Your operating system and terminal.
- The exact command you ran.
- The full error message.
- Whether you are using
sorobanorstellar. - The network name you used, such as
testnet.
Do not share secret keys or seed phrases. Public addresses and contract IDs are safe to include in issue comments.