From 87e6fe5ea4d2b0d3a63e070441175f4013a315f1 Mon Sep 17 00:00:00 2001 From: Jane Wang Date: Tue, 25 Jun 2024 12:13:17 -0400 Subject: [PATCH] Add info about latest release of stellar cli --- .../migrate/evm/solidity-and-rust-basics.mdx | 18 +++++----- docs/reference/software-versions.mdx | 36 +++++++++++++++++-- .../example-contracts/logging.mdx | 2 +- .../guides/dapps/initialization.mdx | 2 +- 4 files changed, 44 insertions(+), 14 deletions(-) diff --git a/docs/learn/migrate/evm/solidity-and-rust-basics.mdx b/docs/learn/migrate/evm/solidity-and-rust-basics.mdx index 64d32fa249..2764fa3f57 100644 --- a/docs/learn/migrate/evm/solidity-and-rust-basics.mdx +++ b/docs/learn/migrate/evm/solidity-and-rust-basics.mdx @@ -213,7 +213,7 @@ pub enum Enum { In this section, we will provide a concise introduction to some fundamental concepts in Rust: `Modules`, `Macros`, `Structs`, `Traits`, and `Attribute Macros`. -These concepts are essential for understanding and writing efficient Rust code, and they will assist you on your journey as a Soroban developer. +These concepts are essential for understanding and writing efficient Rust code, and they will assist you on your journey as a smart contract developer. #### 1. Modules @@ -296,7 +296,7 @@ fn my_function() { } ``` -During your Soroban developer journey, you will frequently encounter the attribute macro [`#[contractimpl]`](https://docs.rs/soroban-sdk/latest/soroban_sdk/index.html) which exports publicly accessible functions to the Soroban environment. +During your smart contract developer journey, you will frequently encounter the attribute macro [`#[contractimpl]`](https://docs.rs/soroban-sdk/latest/soroban_sdk/index.html) which exports publicly accessible functions to the Soroban environment. Functions that are publicly accessible in the implementation are invocable by other contracts, or directly by transactions, when deployed. @@ -541,7 +541,7 @@ env.storage().instance().get(&COUNTER).unwrap_or(0) This is a repeat of the code we saw earlier, which retrieves the value associated with the key `COUNTER` from the contract storage. If there is no value set for the key `COUNTER`, a default value of 0 is used. Finally, the `unwrap()` method is called to extract the actual value from the `Ok` wrapper, which is then returned to the caller of the function. -Now that we have written our smart contract, it's time to explore how we can interact with it using the [Soroban-CLI](../../../tools/developer-tools.mdx#cli), one of many robust [Developer Tools](../../../tools/developer-tools.mdx) available. This powerful command-line tool allows us to interact with the Soroban Virtual Machine from a local machine, providing us with an efficient and flexible way to manage our smart contract. +Now that we have written our smart contract, it's time to explore how we can interact with it using the [Stellar CLI](../../../tools/developer-tools.mdx#cli), one of many robust [Developer Tools](../../../tools/developer-tools.mdx) available. This powerful command-line tool allows us to interact with the Soroban Virtual Machine from a local machine, providing us with an efficient and flexible way to manage our smart contract. ### Interacting with the Rust Smart Counter @@ -597,19 +597,19 @@ debug-assertions = true > _Note_: For a detailed explanation of the `Cargo.toml` configuration used in this tutorial, check out the [Hello World Example](../../../smart-contracts/getting-started/hello-world.mdx). -Next, build the project using the `soroban contract build` command. +Next, build the project using the `stellar contract build` command. ```bash cd increment -soroban contract build +stellar contract build ``` The compiled contract will be located in the `target/wasm32-unknown-unknown/release` directory. -To interact with the contract, we can use the `soroban contract invoke` command from the `soroban-cli` tool. Here's an example of invoking the `increment` function on a contract with ID 1: +To interact with the contract, we can use the `stellar contract invoke` command from the `stellar-cli` tool. Here's an example of invoking the `increment` function on a contract with ID 1: ```bash -soroban contract invoke \ +stellar contract invoke \ --wasm target/wasm32-unknown-unknown/release/increment.wasm \ --id 1 \ -- \ @@ -622,12 +622,12 @@ The output should be the current value of the counter, which in this case is: 1 ``` -You can use the same `soroban contract invoke` command to increment the counter multiple times. +You can use the same `stellar contract invoke` command to increment the counter multiple times. To get the current value of the counter, you can use the following command: ```bash -soroban contract invoke \ +stellar contract invoke \ --wasm target/wasm32-unknown-unknown/release/increment.wasm \ --id 1 \ -- \ diff --git a/docs/reference/software-versions.mdx b/docs/reference/software-versions.mdx index a0777daa16..5d1c78e02f 100644 --- a/docs/reference/software-versions.mdx +++ b/docs/reference/software-versions.mdx @@ -23,12 +23,12 @@ Release candidates are software releases that are also released to the [Testnet] | Soroban Environment | `v21.0.2` | | Stellar Core | `v21.0.0` | | Soroban Rust SDK | `21.0.1-preview.3` | -| Soroban CLI | `v21.0.0-rc.1` | -| Soroban RPC | `v21.2.0` | +| Stellar CLI | `v21.0.0` | +| Soroban RPC | `v21.3.0` | | Stellar Horizon | `v2.30.0` | | Stellar Quickstart | `https://hub.docker.com/layers/stellar/quickstart/v426-latest-amd64/images/sha256-274395daab6fa8033b9213f152d56699358917fb01d7c7e95392a37fc00c9d01` | | Stellar JS Stellar Base | `v12.0.0-rc1` | -| Stellar JS Stellar SDK | `v12.0.0-rc.3` | +| Stellar JS Stellar SDK | `v12.1.0` | | Freighter | | | Laboratory | | | Soroban React Payment dapp | `TBD` | @@ -56,6 +56,36 @@ Key protocol-related changes: - Support for secp256r1 signature verification - Support for extending TTL of contract instance and code separate from each other +#### Stellar CLI (Previously Soroban CLI) + +Note: Soroban CLI has been renamed to Stellar CLI. + +- Add stellar-cli crate alongside soroban-cli +- Rename to stellar-cli +- Install stellar and soroban CLIs when installing either +- Update completions to use stellar instead of soroban +- Update other references to stellar-cli +- Add support for contract id alias name when deploying and invoking contracts +- Extract alias logic into its own implementation +- Embed examples contract list into source and remove from build script +- Add cache sub commands and allow for proper transaction data logging +- Update TS Bindings stellar-sdk dep to 12rc2 +- Add no-build option for fee::Args +- Do not auto add test account to keys +- Output TransactionEnvelope instead of Transaction for --build-only +- Ledger signing +- Use safe unwrapping in option unwrap +- Exclude host only functions from client +- Add container log tailing cmd +- Update network container start command to use updated enable flags +- Add libudev-dev as dep +- Bump versions of dependencies +- Update to newest soroban-rpc and copy over old signing logic +- Remove deprecated lab token command +- Remove deprecated config command +- Remove lab xdr command +- Add xdr command to root + ## Protocol 21 (Testnet only, May 20, 2024) ### Software diff --git a/docs/smart-contracts/example-contracts/logging.mdx b/docs/smart-contracts/example-contracts/logging.mdx index 77cc99cf5f..1a9c74dff6 100644 --- a/docs/smart-contracts/example-contracts/logging.mdx +++ b/docs/smart-contracts/example-contracts/logging.mdx @@ -22,7 +22,7 @@ The [logging example] demonstrates how to log for the purpose of debugging. [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)][oigp] -Logs in contracts are only visible in tests, or when executing contracts using [`soroban-cli`]. Logs are only compiled into the contract if the `debug-assertions` Rust compiler option is enabled. +Logs in contracts are only visible in tests, or when executing contracts using [`stellar-cli`]. Logs are only compiled into the contract if the `debug-assertions` Rust compiler option is enabled. [oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v20.0.0 [logging example]: https://github.com/stellar/soroban-examples/tree/v20.0.0/hello_world diff --git a/docs/smart-contracts/guides/dapps/initialization.mdx b/docs/smart-contracts/guides/dapps/initialization.mdx index e9db91d2ca..61326ec6ca 100644 --- a/docs/smart-contracts/guides/dapps/initialization.mdx +++ b/docs/smart-contracts/guides/dapps/initialization.mdx @@ -86,7 +86,7 @@ This command will mint 100 tokens to the designated user's account. By following these steps, you ensure that the Soroban token smart contracts are correctly deployed and initialized, setting the stage for the Dapp to effectively interact with the token. -For a deeper dive into Stellar CLI commands, check out the [Stellar CLI repo](https://github.com/stellar/stellar-cli/tree/main/cmd/soroban-cli/src/commands). +For a deeper dive into Stellar CLI commands, check out the [Stellar CLI repo](https://github.com/stellar/stellar-cli/blob/main/FULL_HELP_DOCS.md). ## Automating Initialization with Scripts