stellar-registry-cli
Command line interface for managing smart contract deployments through the Stellar Registry system. This tool enables deploying and installing contracts that have been published to the Stellar Registry.
Installation
Install directly from the repository:
Commands
Deploy
Deploy a published contract with optional initialization parameters:
Options:
--contract-name: Name to give this contract instance--wasm-name: Name of the published contract to deployCONSTRUCTOR_ARGS: Optional arguments if contract implements__constructorto deploy and initialize the contract
Install
Install a deployed as an alias to be used by stellar-cli:
Options:
CONTRACT_NAME: Name of the deployed contract to install
Configuration
stellar-cli provides a way to use a default config for accounts and networks:
The CLI can be configured through environment variables:
STELLAR_REGISTRY_CONTRACT_ID: Override the default registry contract IDSTELLAR_NETWORK: Network to use (e.g., "testnet", "mainnet")STELLAR_RPC_URL: Custom RPC endpoint (default: https://soroban-testnet.stellar.org:443)STELLAR_NETWORK_PASSPHRASE: Network passphrase (default: Test SDF Network ; September 2015)STELLAR_ACCOUNT: Source account to use
These variables can also be in a .env file in the current working directory.
Example Usage
- Deploy a token contract:
- Install the deployed contract:
Then can interact with it the contract with stellar-cli:
Transitioning to Mainnet
Once you are satisfied with your contract you can publish and deploy on Mainnet.
The first step is adding Mainnet to your stellar-cli. See the reccommend list of RPC provides here
Then you must add it with the following command:
Then make it your default
or if using a bash like shell to set it for just the current session:
or if while in the current directory:
Publishing and then deploying
Publishing and deploying are exactly the same!
See Also
- Registry Guide - Detailed guide on using the registry system
- Environment Configuration - Configuration details for different networks