Skip to content

stellar contract install|deploy build the current project and install/deploy all built #2047

@leighmcculloch

Description

@leighmcculloch

What problem does your feature solve?

Currently, deploying a Soroban contract requires two separate commands:

stellar contract build && stellar contract deploy --wasm target/wasm32v1-none/release/contract.wasm

This is repetitive and error-prone. Users must remember the full path to the built wasm file, and if they forget to build before deploying, they may deploy stale code. This adds friction to the development workflow.

What would you like to see?

When stellar contract deploy is run inside a directory containing a Cargo.toml (i.e., a Soroban contract project), the CLI should:

  1. Automatically detect that it's in a contract project directory
  2. Run the build step (stellar contract build) if no --wasm argument is provided
  3. Locate the resulting wasm file and deploy it

This would simplify the workflow to just:

stellar contract deploy

The CLI already knows how to build contracts via stellar contract build, so this would leverage existing functionality to provide a more streamlined experience.

What alternatives are there?

  • Status quo: Continue requiring explicit stellar contract build && stellar contract deploy --wasm <path>
  • Shell alias/script: Users can create their own wrapper scripts, but this adds setup overhead and isn't portable
  • Makefile/just recipes: Similar to above, requires additional project setup

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions