Skip to content

Repository files navigation

stellar-registry-cli

Apache 2.0 licensed

Command-line interface for publishing, deploying, and installing smart contracts through the Stellar Registry — an on-chain contract that manages Wasm publication and named contract deployments on the Stellar blockchain.

The CLI installs as a plugin under the stellar CLI, exposed as stellar registry.

Related repositories

Installation

cargo install --locked stellar-registry-cli

We recommend cargo-binstall for prebuilt binaries:

cargo binstall --locked stellar-registry-cli

Quick start

# Publish a compiled contract to the registry
stellar registry publish --wasm target/stellar/local/my_contract.wasm --wasm-name my-contract

# Deploy a published wasm as a named instance (constructor args after `--`)
stellar registry deploy \
  --contract-name my-contract-instance \
  --wasm-name my-contract \
  -- \
  --param1 value1

# Install the deployed contract locally as a stellar-cli alias
stellar registry install my-contract-instance

Use --help on any command for full usage. See the crate README at crates/stellar-registry-cli for the detailed command reference, configuration, and the mainnet workflow.

Crates

Crate Purpose
stellar-registry-cli The stellar registry CLI plugin
stellar-registry-build Library for interacting with the registry at build time
stellar-registry-macro Macro crate defining procedural macros import_contract!, import_contract_client!, and import_asset. Proc-macro crates are special and need to only export proc-macros.
stellar-registry For use in Stellar smart contracts. Re-exports the import_contract!, import_contract_client!, and import_asset! macros from stellar-registry-macro. Might export more behavior later.
stellar-registry-name Defines standard name parsing/formatting used by stellar-registry-macro and stellar-registry-cli.
stellar-registry-test Unpublished testing tools used throughout this monorepo as a dev-dependency

What is the Contract Registry?

The registry is an on-chain smart contract that lets you:

  • Publish and verify contract Wasm binaries with semantic versioning
  • Deploy published contracts as named instances
  • Manage multiple versions of the same contract
  • Reuse deployed contracts across dApps

It separates Wasm publication (reusable code), contract deployment (instances), and local installation (CLI aliases). The contracts themselves live in stellar-registry/contracts.

Documentation

License

Licensed under the Apache-2.0 License — see LICENSE for details.

About

Stellar CLI plugin for publishing and deploying contracts via the on-chain registry

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages