From d3f469096a399d32f87374b5b283f5cbcf143e37 Mon Sep 17 00:00:00 2001 From: Clay-Mysten <100217682+Clay-Mysten@users.noreply.github.com> Date: Tue, 16 Aug 2022 08:50:50 -0700 Subject: [PATCH] Consolidate and promote Devnet to Build section, move down CLI Client to Contribute (#4009) --- crates/sui-sdk/README.md | 2 +- doc/src/build/cli-client.md | 33 ++++----------------------------- doc/src/explore/devnet.md | 32 +++++++++++++++++++++++++++++--- doc/src/navconfig.json | 12 ++++++------ 4 files changed, 40 insertions(+), 39 deletions(-) diff --git a/crates/sui-sdk/README.md b/crates/sui-sdk/README.md index 0524d34539e68..0560cb6934194 100644 --- a/crates/sui-sdk/README.md +++ b/crates/sui-sdk/README.md @@ -8,7 +8,7 @@ This directory contains examples of interacting with a Move language smart contr #### 1. Prepare the environment 1. Install `sui` and `rpc-server` binaries following the [Sui installation](https://github.com/MystenLabs/sui/blob/main/doc/src/build/install.md#binaries) docs. - 1. [Connect to Sui Devnet](https://github.com/MystenLabs/sui/blob/main/doc/src/build/cli-client.md#connect-to-devnet). + 1. [Connect to Sui Devnet](https://github.com/MystenLabs/sui/blob/main/doc/src/explore/devnet.md). 1. [Make sure you have two addresses with gas](https://github.com/MystenLabs/sui/blob/main/doc/src/build/cli-client.md#adding-accounts-to-the-client) by using the `new-address` command to create new addresses: ```shell sui client new-address diff --git a/doc/src/build/cli-client.md b/doc/src/build/cli-client.md index 818caf5514572..a43a30579b1ac 100644 --- a/doc/src/build/cli-client.md +++ b/doc/src/build/cli-client.md @@ -8,39 +8,14 @@ command line interface. In this document, we describe how to set up the Sui client and execute commands through its command line interface, *Sui CLI*. +Note, this is an advanced option and an alternative to simply connecting to our public +[Devnet](../explore/devnet.md). Use Devnet to build upon Sui. Use the Sui CLI here to +[contribute](../contribute/index.md) to Sui itself. + ## Set up Follow the instructions to [install Sui binaries](install.md#binaries). -## Connect to Devnet -We are hosting a public [Devnet](../explore/devnet.md) for the community to -experiment with our tech and help to shape the future of the Sui network. To -connect the Sui client to the Devnet, run the following command: -```shell -$ sui client -``` -The Sui CLI will print the following line if the client is starting up the -first time. -```shell -Config file ["/Users/dir/.sui/sui_config/client.yaml"] doesn't exist, do you want to connect to a Sui RPC server [y/n]? -``` -Type 'y' and then press 'Enter'. You should see the following output: -```shell -Sui RPC server Url (Default to Sui Devnet if not specified) : -``` -The Sui client will prompt for the RPC server URL; press 'Enter' and it will default to Devnet. -Or enter a custom URL if you want to connect to a server hosted elsewhere. - -If you have used the Sui client before with a local network, follow the next section to -[manually change the RPC server URL](#manually-change-the-rpc-server-url) to Devnet. - -### Manually change the RPC server URL -If you have used the Sui client before, you will have an existing `client.yaml` configuration -file. Change the configured RPC server URL to Devnet by using: -```shell -$ sui client switch --gateway https://gateway.devnet.sui.io:443 -``` - ## Genesis The `genesis` command creates four validators and five user accounts diff --git a/doc/src/explore/devnet.md b/doc/src/explore/devnet.md index 2b666247cd863..268bce0fd66ae 100644 --- a/doc/src/explore/devnet.md +++ b/doc/src/explore/devnet.md @@ -1,8 +1,13 @@ --- -title: Experiment with Sui Devnet +title: Connect to Sui Devnet --- -Welcome to the beginnings of the Sui Devnet. It exists now to gain operational experience with the Sui software in a public setting. The Sui Devnet currently consists of: +Welcome to the Sui Devnet. We are hosting a public Devnet for the community to experiment with our tech and help to shape the future of the Sui network. It exists to gain operational experience with the Sui software in a public setting prior to our Mainnet launch. + +To instead [contribute](../contribute/index.md) to Sui itself, you may experiment with the advanced [Sui CLI client](../build/cli-client.md) at the command line. + + +The Sui Devnet currently consists of: * A four-validator network with all nodes operated by Mysten Labs. Clients send transactions and read requests via this endpoint: gateway.devnet.sui.io:443 using [JSON-RPC](../build/json-rpc.md) * A public network [Sui Explorer](https://github.com/MystenLabs/sui/tree/main/explorer/client#readme) for browsing transaction history: https://explorer.devnet.sui.io @@ -43,7 +48,28 @@ In addition, to conduct advanced work such as publishing a Move module or making ### Set up Sui CLI client, connect to gateway -Now [set up your Sui CLI client and connect to Devnet](../build/cli-client.md#connect-to-devnet) in a single step. Note you can [manually change the Gateway URL](../build/cli-client.md#manually-change-the-rpc-server-url) if you have already configured a Sui CLI client. +Now set up your Sui CLI client and connect to Devnet. Note you can manually change the Gateway URL if you have already configured a Sui CLI client. + + To connect the Sui client to the Devnet, run the following command: +```shell +$ sui client +``` +The Sui CLI will print the following line if the client is starting up for the first time: +```shell +Config file ["/Users/dir/.sui/sui_config/client.yaml"] doesn't exist, do you want to connect to a Sui RPC server [y/n]? +``` +Type `y` and then press `Enter`. You should see the following output: +```shell +Sui RPC server Url (Default to Sui Devnet if not specified) : +``` +The Sui client will prompt for the RPC server URL; press 'Enter' and it will default to Devnet. +Or enter a custom URL to connect to a server hosted elsewhere. + +If you have used the Sui client before with a local network, you will have an existing `client.yaml` configuration +file needing update. Change the configured RPC server URL to Devnet by using: +```shell +$ sui client switch --gateway https://gateway.devnet.sui.io:443 +``` > **Tip:** If you run into issues, reset the Sui configuration by removing its directory, by default located at `~/.sui/sui_config`. Then reinstall [Sui binaries](../build/install.md#binaries). diff --git a/doc/src/navconfig.json b/doc/src/navconfig.json index 4286904b07434..c476e822b4e4c 100644 --- a/doc/src/navconfig.json +++ b/doc/src/navconfig.json @@ -113,8 +113,8 @@ "fileName": "build/install" }, { - "label": "Use Sui CLI to Start Network", - "fileName": "build/cli-client" + "label": "Connect to Sui Devnet", + "fileName": "explore/devnet" }, { "label": "Create Smart Contracts with Move", @@ -209,10 +209,6 @@ "label": "Wallet in Browser", "fileName": "explore/wallet-browser" }, - { - "label": "Devnet", - "fileName": "explore/devnet" - }, { "label": "Tutorial", "fileName": "explore/tutorials" @@ -239,6 +235,10 @@ "label": "Frequently Asked Questions", "fileName": "contribute/faq" }, + { + "label": "Sui CLI and Local Network", + "fileName": "build/cli-client" + }, { "label": "Logging", "fileName": "contribute/observability"