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

Commit

Permalink
Commit yarn format:mdx updates
Browse files Browse the repository at this point in the history
  • Loading branch information
elizabethengelman committed Mar 4, 2024
1 parent 7753326 commit e572203
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 26 deletions.
6 changes: 5 additions & 1 deletion docs/getting-started/deploy-to-testnet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ In the background, the CLI is making RPC calls. For information on that checkout

:::

Here we're setting the `to` argument to `RPC`. This again makes use of command expansion `$(…)`; see the note about that in the [Configure an Identity](setup.mdx#configure-an-identity) section of Setup.
:::tip Command Expansion `$(…)`

This uses [command expansion](https://www.gnu.org/software/bash/manual/html_node/Command-Substitution.html), which only works with bash-compatible shells. If you are using Windows or some other shell, you will need to copy the output of `soroban config…` and paste it into the `curl` command, or figure out how command expansion works in your shell.

:::

```bash
soroban contract invoke \
Expand Down
34 changes: 9 additions & 25 deletions docs/getting-started/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,13 @@ To build and develop contracts you need only a couple prerequisites:

## Install Rust

If you use macOS, Linux, or another Unix-like OS, the simplest method to install
a Rust toolchain is to install `rustup`. Install `rustup` with the following
command.
If you use macOS, Linux, or another Unix-like OS, the simplest method to install a Rust toolchain is to install `rustup`. Install `rustup` with the following command.

```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

If you use Windows, or need an alternative method of installing Rust, check out:
https://www.rust-lang.org/tools/install
If you use Windows, or need an alternative method of installing Rust, check out: https://www.rust-lang.org/tools/install

## Install the target

Expand All @@ -52,9 +49,7 @@ rustup target add wasm32-unknown-unknown

## Configure an Editor

Many editors have support for Rust. Visit the following link to find out how to
configure your editor:
https://www.rust-lang.org/tools
Many editors have support for Rust. Visit the following link to find out how to configure your editor: https://www.rust-lang.org/tools

A popular editor is Visual Studio Code:

Expand All @@ -68,8 +63,7 @@ A popular editor is Visual Studio Code:

## Install the Soroban CLI

The Soroban CLI can execute Soroban contracts in the same environment the
contract will execute on network, however in a local sandbox.
The Soroban CLI can execute Soroban contracts in the same environment the contract will execute on network, however in a local sandbox.

Install the Soroban CLI using `cargo install`.

Expand All @@ -79,8 +73,7 @@ cargo install --locked --version 20.3.0 soroban-cli

:::info

Report issues and share feedback about the Soroban CLI
[here](https://github.com/stellar/soroban-cli/issues/new/choose).
Report issues and share feedback about the Soroban CLI [here](https://github.com/stellar/soroban-cli/issues/new/choose).

:::

Expand Down Expand Up @@ -157,8 +150,7 @@ soroban network add --global testnet \
--network-passphrase "Test SDF Network ; September 2015"
```

Note the `--global` flag. This creates a file in your home folder's `~/.config/soroban/network/testnet.toml` with the settings you specified. This
means that you can use the `--network testnet` flag in any Soroban CLI command to use this network from any directory or filepath on your system.
Note the `--global` flag. This creates a file in your home folder's `~/.config/soroban/network/testnet.toml` with the settings you specified. This means that you can use the `--network testnet` flag in any Soroban CLI command to use this network from any directory or filepath on your system.

If you want project-specific network configurations, you can omit the `--global` flag, and the networks will be added to your working directory's `.soroban/network` folder instead.

Expand All @@ -169,9 +161,7 @@ When you deploy a smart contract to a network, you need to specify an identity t
Let's configure an identity called `alice`. You can use any name you want, but it might be nice to have some named identities that you can use for testing, such as [`alice`, `bob`, and `carol`](https://en.wikipedia.org/wiki/Alice_and_Bob).

```bash
soroban keys generate --global alice \
--rpc-url https://soroban-testnet.stellar.org:443 \
--network-passphrase "Test SDF Network ; September 2015"
soroban keys generate --global alice --network testnet
```

You can see the public key of `alice` with:
Expand All @@ -184,17 +174,11 @@ Like the Network configs, the `--global` means that the identity gets stored in

All this did so far is generate a public/private keypair on your local machine. No network requests were made, and `alice` has no funds on Testnet. This means that you can't make any transactions with `alice` yet.

To get `alice` some Testnet tokens, you'll need to use [Friendbot](https://developers.stellar.org/docs/fundamentals-and-concepts/testnet-and-pubnet#friendbot). All Stellar and Soroban test networks have a Friendbot that you can use to get some test tokens. The public Friendbot instance for Testnet lives at `https://friendbot.stellar.org`. Use it:
To get `alice` some Testnet tokens, you'll need to use [Friendbot](https://developers.stellar.org/docs/fundamentals-and-concepts/testnet-and-pubnet#friendbot). All Stellar and Soroban test networks have a Friendbot that you can use to get some test tokens. The public Friendbot instance for Testnet lives at `https://friendbot.stellar.org`. The cli includes a `fund` subcommand to fund your address with Friendbot:

```bash
curl "https://friendbot.stellar.org/?addr=$(soroban keys address alice)"
soroban keys fund alice --network testnet
```

:::tip Command Expansion `$(…)`

This uses [command expansion](https://www.gnu.org/software/bash/manual/html_node/Command-Substitution.html), which only works with bash-compatible shells. If you are using Windows or some other shell, you will need to copy the output of `soroban config…` and paste it into the `curl` command, or figure out how command expansion works in your shell.

:::

[Rust]: https://www.rust-lang.org/
[Soroban CLI]: setup.mdx#install-the-soroban-cli

0 comments on commit e572203

Please sign in to comment.