From afeb36540ee038e6fbdd0c5219de76bbe60c318e Mon Sep 17 00:00:00 2001 From: Nando Vieira Date: Thu, 20 Jun 2024 10:12:24 -0700 Subject: [PATCH] Fix typo and sample command. (#1388) * Fix typo. * Fix other places that were referencing `soroban`. * Replace more places that were using soroban. * Add updated docs. --------- Co-authored-by: Willem Wyndham --- FULL_HELP_DOCS.md | 24 +++++++++---------- cmd/soroban-cli/README.md | 8 +++---- .../src/commands/config/locator.rs | 8 ++----- .../src/commands/contract/asset.rs | 2 +- cmd/soroban-cli/src/commands/contract/mod.rs | 2 +- cmd/soroban-cli/src/commands/mod.rs | 4 ++-- .../src/commands/network/container.rs | 2 +- .../src/commands/network/container/start.rs | 2 +- cmd/soroban-cli/src/commands/network/mod.rs | 8 +++---- cmd/soroban-cli/src/commands/plugin.rs | 4 ++-- 10 files changed, 30 insertions(+), 34 deletions(-) diff --git a/FULL_HELP_DOCS.md b/FULL_HELP_DOCS.md index 5811a37ba..1070f4916 100644 --- a/FULL_HELP_DOCS.md +++ b/FULL_HELP_DOCS.md @@ -68,11 +68,11 @@ This document contains the help content for the `stellar` command-line program. Build, deploy, & interact with contracts; set identities to sign with; configure networks; generate keys; and more. Stellar Docs: https://developers.stellar.org -CLI Full Hep Docs: https://github.com/stellar/stellar-cli/tree/main/FULL_HELP_DOCS.md +CLI Full Help Docs: https://github.com/stellar/stellar-cli/tree/main/FULL_HELP_DOCS.md The easiest way to get started is to generate a new identity: - stellar config identity generate alice + stellar keys generate alice You can use identities with the `--source` flag in other commands later. @@ -190,14 +190,14 @@ Utilities to deploy a Stellar Asset Contract or get its id ###### **Subcommands:** -* `id` — Get Id of builtin Soroban Asset Contract. Deprecated, use `soroban contract id asset` instead +* `id` — Get Id of builtin Soroban Asset Contract. Deprecated, use `stellar contract id asset` instead * `deploy` — Deploy builtin Soroban Asset Contract ## `stellar contract asset id` -Get Id of builtin Soroban Asset Contract. Deprecated, use `soroban contract id asset` instead +Get Id of builtin Soroban Asset Contract. Deprecated, use `stellar contract id asset` instead **Usage:** `stellar contract asset id [OPTIONS] --asset --source-account ` @@ -640,7 +640,7 @@ Invoke a contract function Generates an "implicit CLI" for the specified contract on-the-fly using the contract's schema, which gets embedded into every Soroban contract. The "slop" in this command, everything after the `--`, gets passed to this implicit CLI. Get in-depth help for a given contract: -soroban contract invoke ... -- --help +stellar contract invoke ... -- --help **Usage:** `stellar contract invoke [OPTIONS] --id --source-account [-- ...]` @@ -1211,8 +1211,8 @@ Start and configure networks * `add` — Add a new network * `rm` — Remove a network * `ls` — List networks -* `start` — ⚠️ Deprecated: use `soroban container start` instead -* `stop` — ⚠️ Deprecated: use `soroban container stop` instead +* `start` — ⚠️ Deprecated: use `stellar container start` instead +* `stop` — ⚠️ Deprecated: use `stellar container stop` instead * `container` — Commands to start, stop and get logs for a quickstart container @@ -1281,13 +1281,13 @@ List networks ## `stellar network start` -⚠️ Deprecated: use `soroban container start` instead +⚠️ Deprecated: use `stellar container start` instead Start network Start a container running a Stellar node, RPC, API, and friendbot (faucet). -soroban network start [OPTIONS] +stellar network start [OPTIONS] By default, when starting a testnet container, without any optional arguments, it will run the equivalent of the following docker command: docker run --rm -p 8000:8000 --name stellar stellar/quickstart:testing --testnet --enable-soroban-rpc @@ -1314,9 +1314,9 @@ By default, when starting a testnet container, without any optional arguments, i ## `stellar network stop` -⚠️ Deprecated: use `soroban container stop` instead +⚠️ Deprecated: use `stellar container stop` instead -Stop a network started with `network start`. For example, if you ran `soroban network start local`, you can use `soroban network stop local` to stop it. +Stop a network started with `network start`. For example, if you ran `stellar network start local`, you can use `stellar network stop local` to stop it. **Usage:** `stellar network stop [OPTIONS] ` @@ -1372,7 +1372,7 @@ Start network Start a container running a Stellar node, RPC, API, and friendbot (faucet). -soroban network start [OPTIONS] +stellar network start [OPTIONS] By default, when starting a testnet container, without any optional arguments, it will run the equivalent of the following docker command: docker run --rm -p 8000:8000 --name stellar stellar/quickstart:testing --testnet --enable-soroban-rpc diff --git a/cmd/soroban-cli/README.md b/cmd/soroban-cli/README.md index 67860a43d..56fadbc71 100644 --- a/cmd/soroban-cli/README.md +++ b/cmd/soroban-cli/README.md @@ -7,13 +7,13 @@ Docs: https://developers.stellar.org ## Install ``` -cargo install --locked soroban-cli +cargo install --locked stellar-cli ``` To install with the `opt` feature, which includes a WASM optimization feature and wasm-opt built in: ``` -cargo install --locked soroban-cli --features opt +cargo install --locked stellar-cli --features opt ``` ## Usage @@ -23,6 +23,6 @@ Can invoke a contract method as a subcommand with different arguments. Anything ## Example ``` -soroban invoke --id --wasm -- --help -soroban invoke --id --network futurenet -- --help +stellar invoke --id --wasm -- --help +stellar invoke --id --network futurenet -- --help ``` diff --git a/cmd/soroban-cli/src/commands/config/locator.rs b/cmd/soroban-cli/src/commands/config/locator.rs index 680bcb536..09a6c2f73 100644 --- a/cmd/soroban-cli/src/commands/config/locator.rs +++ b/cmd/soroban-cli/src/commands/config/locator.rs @@ -22,13 +22,9 @@ pub enum Error { NoConfigEnvVar, #[error("Failed to create directory: {path:?}")] DirCreationFailed { path: PathBuf }, - #[error( - "Failed to read secret's file: {path}.\nProbably need to use `soroban config identity add`" - )] + #[error("Failed to read secret's file: {path}.\nProbably need to use `stellar keys add`")] SecretFileRead { path: PathBuf }, - #[error( - "Failed to read network file: {path};\nProbably need to use `soroban config network add`" - )] + #[error("Failed to read network file: {path};\nProbably need to use `stellar network add`")] NetworkFileRead { path: PathBuf }, #[error(transparent)] Toml(#[from] toml::de::Error), diff --git a/cmd/soroban-cli/src/commands/contract/asset.rs b/cmd/soroban-cli/src/commands/contract/asset.rs index ad7be0207..edf077a7c 100644 --- a/cmd/soroban-cli/src/commands/contract/asset.rs +++ b/cmd/soroban-cli/src/commands/contract/asset.rs @@ -2,7 +2,7 @@ use super::{deploy, id}; #[derive(Debug, clap::Subcommand)] pub enum Cmd { - /// Get Id of builtin Soroban Asset Contract. Deprecated, use `soroban contract id asset` instead + /// Get Id of builtin Soroban Asset Contract. Deprecated, use `stellar contract id asset` instead Id(id::asset::Cmd), /// Deploy builtin Soroban Asset Contract Deploy(deploy::asset::Cmd), diff --git a/cmd/soroban-cli/src/commands/contract/mod.rs b/cmd/soroban-cli/src/commands/contract/mod.rs index 66541a546..f83cad37f 100644 --- a/cmd/soroban-cli/src/commands/contract/mod.rs +++ b/cmd/soroban-cli/src/commands/contract/mod.rs @@ -57,7 +57,7 @@ pub enum Cmd { /// everything after the `--`, gets passed to this implicit CLI. Get in-depth help for a given /// contract: /// - /// soroban contract invoke ... -- --help + /// stellar contract invoke ... -- --help Invoke(invoke::Cmd), /// Optimize a WASM file diff --git a/cmd/soroban-cli/src/commands/mod.rs b/cmd/soroban-cli/src/commands/mod.rs index e220d8be1..6c8d5ed70 100644 --- a/cmd/soroban-cli/src/commands/mod.rs +++ b/cmd/soroban-cli/src/commands/mod.rs @@ -20,14 +20,14 @@ pub const HEADING_RPC: &str = "Options (RPC)"; const ABOUT: &str = "Build, deploy, & interact with contracts; set identities to sign with; configure networks; generate keys; and more. Stellar Docs: https://developers.stellar.org -CLI Full Hep Docs: https://github.com/stellar/stellar-cli/tree/main/FULL_HELP_DOCS.md"; +CLI Full Help Docs: https://github.com/stellar/stellar-cli/tree/main/FULL_HELP_DOCS.md"; // long_about is shown when someone uses `--help`; short help when using `-h` const LONG_ABOUT: &str = " The easiest way to get started is to generate a new identity: - stellar config identity generate alice + stellar keys generate alice You can use identities with the `--source` flag in other commands later. diff --git a/cmd/soroban-cli/src/commands/network/container.rs b/cmd/soroban-cli/src/commands/network/container.rs index 5ce74d07c..b4b3141d3 100644 --- a/cmd/soroban-cli/src/commands/network/container.rs +++ b/cmd/soroban-cli/src/commands/network/container.rs @@ -16,7 +16,7 @@ pub enum Cmd { /// /// Start a container running a Stellar node, RPC, API, and friendbot (faucet). /// - /// soroban network start [OPTIONS] + /// stellar network start [OPTIONS] /// /// By default, when starting a testnet container, without any optional arguments, it will run the equivalent of the following docker command: /// docker run --rm -p 8000:8000 --name stellar stellar/quickstart:testing --testnet --enable-soroban-rpc diff --git a/cmd/soroban-cli/src/commands/network/container/start.rs b/cmd/soroban-cli/src/commands/network/container/start.rs index 9d24cd960..b7f8d87a2 100644 --- a/cmd/soroban-cli/src/commands/network/container/start.rs +++ b/cmd/soroban-cli/src/commands/network/container/start.rs @@ -106,7 +106,7 @@ async fn run_docker_command(cmd: &Cmd) -> Result<(), Error> { .await?; println!("✅ Container started: {container_name}"); let stop_message = format!( - "ℹ️ To stop this container run: soroban network stop {network} {additional_flags}", + "ℹ️ To stop this container run: stellar network stop {network} {additional_flags}", network = &cmd.network, additional_flags = if cmd.docker_host.is_some() { format!("--docker-host {}", cmd.docker_host.as_ref().unwrap()) diff --git a/cmd/soroban-cli/src/commands/network/mod.rs b/cmd/soroban-cli/src/commands/network/mod.rs index 581b965a0..1184b5b95 100644 --- a/cmd/soroban-cli/src/commands/network/mod.rs +++ b/cmd/soroban-cli/src/commands/network/mod.rs @@ -27,20 +27,20 @@ pub enum Cmd { Rm(rm::Cmd), /// List networks Ls(ls::Cmd), - /// ⚠️ Deprecated: use `soroban container start` instead + /// ⚠️ Deprecated: use `stellar container start` instead /// /// Start network /// /// Start a container running a Stellar node, RPC, API, and friendbot (faucet). /// - /// soroban network start [OPTIONS] + /// stellar network start [OPTIONS] /// /// By default, when starting a testnet container, without any optional arguments, it will run the equivalent of the following docker command: /// docker run --rm -p 8000:8000 --name stellar stellar/quickstart:testing --testnet --enable-soroban-rpc Start(container::StartCmd), - /// ⚠️ Deprecated: use `soroban container stop` instead + /// ⚠️ Deprecated: use `stellar container stop` instead /// - /// Stop a network started with `network start`. For example, if you ran `soroban network start local`, you can use `soroban network stop local` to stop it. + /// Stop a network started with `network start`. For example, if you ran `stellar network start local`, you can use `stellar network stop local` to stop it. Stop(container::StopCmd), /// Commands to start, stop and get logs for a quickstart container diff --git a/cmd/soroban-cli/src/commands/plugin.rs b/cmd/soroban-cli/src/commands/plugin.rs index 27c191f08..2fa028d5c 100644 --- a/cmd/soroban-cli/src/commands/plugin.rs +++ b/cmd/soroban-cli/src/commands/plugin.rs @@ -7,14 +7,14 @@ use crate::{utils, Root}; #[derive(thiserror::Error, Debug)] pub enum Error { - #[error("Plugin not provided. Should be `soroban plugin` for a binary `soroban-plugin`")] + #[error("Plugin not provided. Should be `stellar plugin` for a binary `stellar-plugin`")] MissingSubcommand, #[error(transparent)] IO(#[from] std::io::Error), #[error( r#"error: no such command: `{0}` - {1}View all installed plugins with `soroban --list`"# + {1}View all installed plugins with `stellar --list`"# )] ExecutableNotFound(String, String), #[error(transparent)]