Skip to content

Commit

Permalink
Fix typo and sample command. (#1388)
Browse files Browse the repository at this point in the history
* Fix typo.

* Fix other places that were referencing `soroban`.

* Replace more places that were using soroban.

* Add updated docs.

---------

Co-authored-by: Willem Wyndham <[email protected]>
  • Loading branch information
fnando and willemneal authored Jun 20, 2024
1 parent fb2cdaf commit afeb365
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 34 deletions.
24 changes: 12 additions & 12 deletions FULL_HELP_DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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 <ASSET> --source-account <SOURCE_ACCOUNT>`

Expand Down Expand Up @@ -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 <CONTRACT_ID> --source-account <SOURCE_ACCOUNT> [-- <CONTRACT_FN_AND_ARGS>...]`

Expand Down Expand Up @@ -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


Expand Down Expand Up @@ -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 <NETWORK> [OPTIONS]
stellar network start <NETWORK> [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

Expand All @@ -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] <NETWORK>`

Expand Down Expand Up @@ -1372,7 +1372,7 @@ Start network

Start a container running a Stellar node, RPC, API, and friendbot (faucet).

soroban network start <NETWORK> [OPTIONS]
stellar network start <NETWORK> [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

Expand Down
8 changes: 4 additions & 4 deletions cmd/soroban-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -23,6 +23,6 @@ Can invoke a contract method as a subcommand with different arguments. Anything
## Example

```
soroban invoke --id <CONTRACT_ID> --wasm <WASMFILE> -- --help
soroban invoke --id <CONTRACT_ID> --network futurenet -- --help
stellar invoke --id <CONTRACT_ID> --wasm <WASMFILE> -- --help
stellar invoke --id <CONTRACT_ID> --network futurenet -- --help
```
8 changes: 2 additions & 6 deletions cmd/soroban-cli/src/commands/config/locator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-cli/src/commands/contract/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-cli/src/commands/contract/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions cmd/soroban-cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-cli/src/commands/network/container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub enum Cmd {
///
/// Start a container running a Stellar node, RPC, API, and friendbot (faucet).
///
/// soroban network start <NETWORK> [OPTIONS]
/// stellar network start <NETWORK> [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
Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-cli/src/commands/network/container/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
8 changes: 4 additions & 4 deletions cmd/soroban-cli/src/commands/network/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 <NETWORK> [OPTIONS]
/// stellar network start <NETWORK> [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
Expand Down
4 changes: 2 additions & 2 deletions cmd/soroban-cli/src/commands/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit afeb365

Please sign in to comment.