Skip to content

Commit

Permalink
Add info about latest release of stellar cli (#722)
Browse files Browse the repository at this point in the history
  • Loading branch information
janewang authored Jun 25, 2024
1 parent ba8c22d commit 6b63a92
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 14 deletions.
18 changes: 9 additions & 9 deletions docs/learn/migrate/evm/solidity-and-rust-basics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

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

Expand Down Expand Up @@ -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 \
-- \
Expand All @@ -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 \
-- \
Expand Down
36 changes: 33 additions & 3 deletions docs/reference/software-versions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/smart-contracts/example-contracts/logging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/smart-contracts/guides/dapps/initialization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 6b63a92

Please sign in to comment.