Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
More updates to old CLI versions (#575)
Browse files Browse the repository at this point in the history
* docs: fixing a link to create a new issue for Soroban CLI

* docs: Updating the `soroban` usage for `v20.0.0-rc2`

* docs: updating link to auto-generated cli docs

* docs: Updating tutorials to point to `v20` tag of the examples repo

* docs: Updating "migrating from evm" article to use `v20.0.0-rc2` examples

* docs: changing to `v20.0.0-rc2` examples repo in getting started section
  • Loading branch information
ElliotFriend authored Sep 20, 2023
1 parent e16f778 commit 18ed14f
Show file tree
Hide file tree
Showing 25 changed files with 101 additions and 101 deletions.
10 changes: 5 additions & 5 deletions docs/TUTORIAL-TEMPLATE.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ Place each link definition at the bottom of the section it (first) is used In

:::

[oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v0.9.2
[example demonstrates]: https://github.com/stellar/soroban-examples/tree/v0.9.2/hello_world
[oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2
[example demonstrates]: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/hello_world
[other example]: getting-started/

## Run the Example

First go through the [Setup] process to get your development environment
configured, then clone the `v0.9.2` tag of `soroban-examples` repository:
configured, then clone the `v20.0.0-rc2` tag of `soroban-examples` repository:

```bash
git clone -b v0.9.2 https://github.com/stellar/soroban-examples
git clone -b v20.0.0-rc2 https://github.com/stellar/soroban-examples
```

Or, skip the development environment setup and open this example in
Expand Down Expand Up @@ -67,7 +67,7 @@ impl HelloContract {
mod test;
```

Ref: https://github.com/stellar/soroban-examples/tree/v0.9.2/hello_world
Ref: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/hello_world

## How it Works

Expand Down
4 changes: 2 additions & 2 deletions docs/advanced-tutorials/atomic-multi-swap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ Follow the comments in the code for more information.

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)][oigp]

[oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v0.9.2
[oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2
[Atomic Swap]: atomic-swap.mdx
[atomic swap batching example]: https://github.com/stellar/soroban-examples/tree/v0.9.2/atomic_multiswap
[atomic swap batching example]: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/atomic_multiswap
12 changes: 6 additions & 6 deletions docs/advanced-tutorials/atomic-swap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ Soroban token usage.

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)][oigp]

[oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v0.9.2
[atomic swap example]: https://github.com/stellar/soroban-examples/tree/v0.9.2/atomic_swap
[oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2
[atomic swap example]: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/atomic_swap

## Run the Example

First go through the [Setup] process to get your development environment
configured, then clone the `v0.9.2` tag of `soroban-examples` repository:
configured, then clone the `v20.0.0-rc2` tag of `soroban-examples` repository:

[Setup]: ../getting-started/setup.mdx

```
git clone -b v0.9.2 https://github.com/stellar/soroban-examples
git clone -b v20.0.0-rc2 https://github.com/stellar/soroban-examples
```

Or, skip the development environment setup and open this example in [Gitpod][oigp].
Expand Down Expand Up @@ -131,7 +131,7 @@ fn move_token(
}
```

Ref: https://github.com/stellar/soroban-examples/tree/v0.9.2/atomic_swap
Ref: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/atomic_swap

## How it Works

Expand Down Expand Up @@ -208,7 +208,7 @@ contract invocation.

Open the [`atomic_swap/src/test.rs`] file to follow along.

[`atomic_swap/src/test.rs`]: https://github.com/stellar/soroban-examples/tree/v0.9.2/atomic_swap/src/test.rs
[`atomic_swap/src/test.rs`]: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/atomic_swap/src/test.rs

Refer to another examples for the general information on the test setup.

Expand Down
10 changes: 5 additions & 5 deletions docs/advanced-tutorials/custom-account.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,19 @@ around them yet beyond the Soroban SDK support.
:::

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)][oigp]
[oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v0.9.2
[oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2

[custom account example]: https://github.com/stellar/soroban-examples/tree/v0.9.2/account
[custom account example]: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/account

## Run the Example

First go through the [Setup] process to get your development environment
configured, then clone the `v0.9.2` tag of `soroban-examples` repository:
configured, then clone the `v20.0.0-rc2` tag of `soroban-examples` repository:

[Setup]: ../getting-started/setup.mdx

```
git clone -b v0.9.2 https://github.com/stellar/soroban-examples
git clone -b v20.0.0-rc2 https://github.com/stellar/soroban-examples
```

Or, skip the development environment setup and open this example in [Gitpod][oigp].
Expand Down Expand Up @@ -319,7 +319,7 @@ function we don't exceed the spending limits.

Open the [`account/src/test.rs`] file to follow along.

[`account/src/test.rs`]: https://github.com/stellar/soroban-examples/tree/v0.9.2/account/src/test.rs
[`account/src/test.rs`]: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/account/src/test.rs

Refer to another examples for the general information on the test setup.

Expand Down
22 changes: 11 additions & 11 deletions docs/advanced-tutorials/fuzzing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,24 @@ with the [`proptest`] and [`proptest-arbitrary-interop`] crates. It builds on
the [timelock example].

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)][oigp]
[oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v0.9.2
[oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2

[fuzzing example]: https://github.com/stellar/soroban-examples/tree/v0.9.2/fuzzing
[fuzzing example]: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/fuzzing
[`cargo-fuzz`]: https://docs.rs/cargo-fuzz
[`arbitrary`]: https://docs.rs/arbitrary
[`proptest`]: https://docs.rs/proptest
[`proptest-arbitrary-interop`]: https://docs.rs/proptest-arbitrary-interop
[timelock example]: https://github.com/stellar/soroban-examples/tree/v0.9.2/timelock
[timelock example]: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/timelock

## Run the Example

First go through the [setup] process to get your development environment
configured, then clone the `v0.9.2` tag of `soroban-examples` repository:
configured, then clone the `v20.0.0-rc2` tag of `soroban-examples` repository:

[setup]: ../getting-started/setup.mdx

```bash
git clone -b v0.9.2 https://github.com/stellar/soroban-examples
git clone -b v20.0.0-rc2 https://github.com/stellar/soroban-examples
```

You will also need the `cargo-fuzz` tool, and to run `cargo-fuzz` you will need
Expand Down Expand Up @@ -142,7 +142,7 @@ fuzzing.
The example used for this tutorial is based on the [`timelock`] example program,
with some changes to demonstrate fuzzing.

[`timelock`]: https://github.com/stellar/soroban-examples/tree/v0.9.2/timelock
[`timelock`]: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/timelock

The contract, `ClaimableBalanceContract`, allows one party to deposit an
arbitrary quantity of a token to the contract, specifying additionally: the
Expand Down Expand Up @@ -225,8 +225,8 @@ Our `soroban-examples/fuzzing` directory looks like
There are special considerations to note in the configuration of both the
[contract's manifest] and the [fuzzing crate's manifest].

[contract's manifest]: https://github.com/stellar/soroban-examples/tree/v0.9.2/fuzzing/Cargo.toml
[fuzzing crate's manifest]: https://github.com/stellar/soroban-examples/tree/v0.9.2/fuzzing/fuzz/Cargo.toml
[contract's manifest]: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/fuzzing/Cargo.toml
[fuzzing crate's manifest]: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/fuzzing/fuzz/Cargo.toml

Within the contract's manifest one must specificy the crate type as both
"cdylib" and "rlib":
Expand Down Expand Up @@ -297,7 +297,7 @@ features = ["testutils"]
First let's look at [`fuzz_target_1.rs`]. This fuzz test does two things: it
first deposits an arbitrary amount, then it claims an arbitrary amount.

[`fuzz_target_1.rs`]: https://github.com/stellar/soroban-examples/tree/v0.9.2/fuzzing/fuzz/fuzz_targets/fuzz_target_1.rs
[`fuzz_target_1.rs`]: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/fuzzing/fuzz/fuzz_targets/fuzz_target_1.rs

Again, you can run this fuzzer from the `soroban-examples/fuzzing` directory
with the following command:
Expand Down Expand Up @@ -780,7 +780,7 @@ turn that feature on.
The [`fuzz_target_2.rs`] example, demonstrates the use of `SorobanArbitrary`,
the advancement of time, and more advanced fuzzing techniques.

[`fuzz_target_2.rs`]: https://github.com/stellar/soroban-examples/tree/v0.9.2/fuzzing/fuzz/fuzz_targets/fuzz_target_2.rs
[`fuzz_target_2.rs`]: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/fuzzing/fuzz/fuzz_targets/fuzz_target_2.rs

This fuzz test takes a much more complex input, where some of the values are
user-defined types exported from the contract under test. This test is
Expand Down Expand Up @@ -948,4 +948,4 @@ convert fuzz tests to property tests to help prevent regressions.
The [`proptest.rs`] file is a translation of `fuzz_target_1.rs` to a property
test.

[`proptest.rs`]: https://github.com/stellar/soroban-examples/tree/v0.9.2/fuzzing/src/proptest.rs
[`proptest.rs`]: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/fuzzing/src/proptest.rs
14 changes: 7 additions & 7 deletions docs/advanced-tutorials/liquidity-pool.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,17 @@ here.](https://developers.stellar.org/docs/encyclopedia/liquidity-on-stellar-sde

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)][oigp]

[oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v0.9.2
[liquidity pool example]: https://github.com/stellar/soroban-examples/tree/v0.9.2/liquidity_pool
[source code]: https://github.com/stellar/soroban-examples/blob/v0.9.2/liquidity_pool/src/lib.rs#L143
[oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2
[liquidity pool example]: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/liquidity_pool
[source code]: https://github.com/stellar/soroban-examples/blob/v20.0.0-rc2/liquidity_pool/src/lib.rs#L143

## Run the Example

First go through the [Setup] process to get your development environment
configured, then clone the `v0.9.2` tag of `soroban-examples` repository:
configured, then clone the `v20.0.0-rc2` tag of `soroban-examples` repository:

```bash
git clone -b v0.9.2 https://github.com/stellar/soroban-examples
git clone -b v20.0.0-rc2 https://github.com/stellar/soroban-examples
```

Or, skip the development environment setup and open this example in
Expand Down Expand Up @@ -473,7 +473,7 @@ pub fn create_contract(
</TabItem>
</Tabs>

Ref: https://github.com/stellar/soroban-examples/tree/v0.9.2/liquidity_pool
Ref: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/liquidity_pool

## How it Works

Expand Down Expand Up @@ -911,7 +911,7 @@ fn test() {
}
```

[`liquidity_pool/src/test.rs`]: https://github.com/stellar/soroban-examples/blob/v0.9.2/liquidity_pool/src/test.rs
[`liquidity_pool/src/test.rs`]: https://github.com/stellar/soroban-examples/blob/v20.0.0-rc2/liquidity_pool/src/test.rs

In any test the first thing that is always required is an `Env`, which is the
Soroban environment that the contract will run in.
Expand Down
6 changes: 3 additions & 3 deletions docs/advanced-tutorials/single-offer-sale.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ a seller to set up an offer to sell token A for token B to multiple buyers. The
comments in the [source code] explain how the contract should be used.

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)][oigp]
[oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v0.9.2
[oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2

[single offer sale example]: https://github.com/stellar/soroban-examples/tree/v0.9.2/single_offer
[source code]: https://github.com/stellar/soroban-examples/blob/v0.9.2/single_offer/src/lib.rs
[single offer sale example]: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/single_offer
[source code]: https://github.com/stellar/soroban-examples/blob/v20.0.0-rc2/single_offer/src/lib.rs
2 changes: 1 addition & 1 deletion docs/advanced-tutorials/stellar-asset-contract.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,4 @@ implementation.
This interface can be found in the [SDK]. It extends the common
[token interface](tokens.mdx).

[SDK]: https://github.com/stellar/rs-soroban-sdk/blob/v0.9.2/soroban-sdk/src/token.rs
[SDK]: https://github.com/stellar/rs-soroban-sdk/blob/v20.0.0-rc2/soroban-sdk/src/token.rs
4 changes: 2 additions & 2 deletions docs/advanced-tutorials/timelock.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ greatly simplified claimable balance similar to the [claimable balance] feature
available on Stellar.

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)][oigp]
[oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v0.9.2
[oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2

The contract accepts deposits of an amount of a token, and allows other users
to claim it before or after a time point.

[timelock example]: https://github.com/stellar/soroban-examples/tree/v0.9.2/timelock
[timelock example]: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/timelock
[claimable balance]: https://developers.stellar.org/docs/glossary/claimable-balance
10 changes: 5 additions & 5 deletions docs/advanced-tutorials/tokens.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ the [Token Interface].

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)][oigp]

[oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v0.9.2
[token example]: https://github.com/stellar/soroban-examples/tree/v0.9.2/token
[oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2
[token example]: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/token
[Token Interface]: ../reference/interfaces/token-interface.mdx

## Run the Example

First go through the [Setup] process to get your development environment
configured, then clone the `v0.9.2` tag of `soroban-examples` repository:
configured, then clone the `v20.0.0-rc2` tag of `soroban-examples` repository:

```bash
git clone -b v0.9.2 https://github.com/stellar/soroban-examples
git clone -b v20.0.0-rc2 https://github.com/stellar/soroban-examples
```

Or, skip the development environment setup and open this example in
Expand Down Expand Up @@ -530,7 +530,7 @@ pub enum DataKey {
</TabItem>
</Tabs>

Ref: https://github.com/stellar/soroban-examples/tree/v0.9.2/token
Ref: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/token

## How it Works

Expand Down
10 changes: 5 additions & 5 deletions docs/basic-tutorials/alloc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ description: Use the allocator feature in a smart contract.

The [allocator example] demonstrates how to utilize the allocator feature when writing a contract.

[allocator example]: https://github.com/stellar/soroban-examples/tree/v0.9.2/alloc
[allocator example]: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/alloc

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)][oigp]
[oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v0.9.2
[oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2

The `soroban-sdk` crate provides a lightweight bump-pointer allocator which can be used to emulate heap memory allocation in a Wasm smart contract.

## Run the Example

First go through the [Setup] process to get your development environment configured, then clone the `v0.9.2` tag of `soroban-examples` repository:
First go through the [Setup] process to get your development environment configured, then clone the `v20.0.0-rc2` tag of `soroban-examples` repository:

[setup]: ../getting-started/setup.mdx

```
git clone -b v0.9.2 https://github.com/stellar/soroban-examples
git clone -b v20.0.0-rc2 https://github.com/stellar/soroban-examples
```

Or, skip the development environment setup and open this example in [Gitpod][oigp].
Expand Down Expand Up @@ -96,7 +96,7 @@ impl AllocContract {
}
```

Ref: https://github.com/stellar/soroban-examples/tree/v0.9.2/alloc
Ref: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/alloc

## How it Works

Expand Down
12 changes: 6 additions & 6 deletions docs/basic-tutorials/auth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ authorization using the Soroban Host-managed auth framework.
This example is an extension of the [storing data example].

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)][oigp]
[oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v0.9.2
[oigp]: https://gitpod.io/#https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2

[storing data example]: ../getting-started/storing-data.mdx
[auth example]: https://github.com/stellar/soroban-examples/tree/v0.9.2/auth
[auth example]: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/auth

## Run the Example

First go through the [Setup] process to get your development environment
configured, then clone the `v0.9.2` tag of `soroban-examples` repository:
configured, then clone the `v20.0.0-rc2` tag of `soroban-examples` repository:

[Setup]: ../getting-started/setup.mdx

```
git clone -b v0.9.2 https://github.com/stellar/soroban-examples
git clone -b v20.0.0-rc2 https://github.com/stellar/soroban-examples
```

Or, skip the development environment setup and open this example in [Gitpod][oigp].
Expand Down Expand Up @@ -113,7 +113,7 @@ impl IncrementContract {
}
```

Ref: https://github.com/stellar/soroban-examples/tree/v0.9.2/auth
Ref: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/auth

## How it Works

Expand Down Expand Up @@ -188,7 +188,7 @@ user.require_auth_for_args((value,).into_val(&env));

Open the [`auth/src/test.rs`] file to follow along.

[`auth/src/test.rs`]: https://github.com/stellar/soroban-examples/tree/v0.9.2/auth/src/test.rs
[`auth/src/test.rs`]: https://github.com/stellar/soroban-examples/tree/v20.0.0-rc2/auth/src/test.rs

```rust title="auth/src/test.rs"
fn test() {
Expand Down
Loading

0 comments on commit 18ed14f

Please sign in to comment.