Skip to content

Commit

Permalink
[docs] Faucet update (#20958)
Browse files Browse the repository at this point in the history
## Description 

Describe the changes or additions included in this PR.

## Test plan 

How did you test the new or updated feature?

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] gRPC:
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:

---------

Co-authored-by: stefan-mysten <[email protected]>
  • Loading branch information
ronny-mysten and stefan-mysten authored Jan 23, 2025
1 parent ad70a80 commit 59ce28f
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 3 deletions.
6 changes: 6 additions & 0 deletions docs/content/guides/developer/app-examples/e2e-counter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ To begin, create a new folder on your system titled `react-e2e-counter` to hold

:::

:::tip

{@include: ../../../snippets/faucet-online.mdx}

:::

## Smart contracts {#smart-contracts}

In this part of the guide, you write the Move contracts that create, increment, and reset counters.
Expand Down
5 changes: 5 additions & 0 deletions docs/content/guides/developer/app-examples/trustless-swap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ Before getting started, make sure you have:
- [Installed the latest version of Sui](../getting-started/sui-install.mdx).
- [Configured a valid network environment](../../../references/cli/client.mdx#set-current-environment), as the guide has you deploy the module on Testnet.
- [Acquired Devnet or Testnet](../getting-started/get-coins.mdx) tokens for development purposes.
:::tip

{@include: ../../../snippets/faucet-online.mdx}

:::
- Read the basics of [shared versus owned objects](../sui-101/shared-owned.mdx).

## Directory structure
Expand Down
4 changes: 4 additions & 0 deletions docs/content/guides/developer/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ After you have Sui installed on your system, you can begin to connect with a net
- [Connect to a Local Network](./getting-started/local-network.mdx)
- [Get Sui Address](./getting-started/get-address.mdx)
- [Get SUI Coins](./getting-started/get-coins.mdx)
:::tip
{@include: ../../snippets/faucet-online.mdx}
:::


## GraphQL queries

Expand Down
25 changes: 23 additions & 2 deletions docs/content/guides/developer/getting-started/get-coins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,34 @@
title: Get SUI Tokens
---

Sui faucet is a helpful tool where Sui developers can get free test SUI tokens to deploy and interact with their programs on Sui's Devnet and Testnet networks. There is no faucet for Sui Mainnet.
Sui faucet is a helpful tool where Sui developers can get free test SUI tokens to deploy and interact with their programs on Sui's Devnet and Testnet networks. There is no faucet for Sui Mainnet...

## Prerequisites

To request tokens from the faucet, you must own a wallet address that can receive the SUI tokens. See the [Get Sui Address](./get-address.mdx) topic if you don't already have an address or need to create a new one.

## Request test tokens via the CLI
## Request test tokens through the online faucet {#online-faucet}

https://faucet.sui.io/: Visit the online faucet to request SUI tokens.

How to use:

1. Connect your wallet or paste your wallet address in the address field.
1. Use the network dropdown to select the correct network.
1. Click the **Request SUI** button.

To request more SUI, refresh your browser and click the Request SUI button again. The requests are rate limited, however, so too many requests results in a waiting period before you are able to request more tokens.

### Return unused Testnet SUI

The Testnet faucet drains from a finite pool of SUI. If the pool empties, it disrupts faucet service for the rest of the community. To help ensure this doesn't happen, you can use the online faucet to return your unused SUI to the pool.

There are two ways to return unused Testnet SUI:

- Connect your wallet to the online faucet, and click the **Return tokens to faucet** button. Approve the transaction using your wallet and your Testnet SUI are returned to the pool.
- If you prefer not to connect your wallet, click the **Copy** button to the right of the return address and send the tokens via a separate transaction.

## Request test tokens through the CLI

If you are using the Devnet or Testnet networks, or you spun up a local network, you can use the [Sui CLI](../../../references/cli/client.mdx) to request tokens for your address. The `sui client faucet` uses the active network and active address that is currently set in the Sui CLI by default, but you can specify custom data through the following two arguments:

Expand Down
1 change: 1 addition & 0 deletions docs/content/snippets/faucet-online.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://faucet.sui.io/: Visit the online faucet to request SUI tokens. You can refresh your browser to perform multiple requests, but the requests are rate-limited per IP address.
2 changes: 1 addition & 1 deletion docs/content/snippets/publish-to-devnet-with-coins.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Before being able to publish your package to Testnet, you need Testnet SUI tokens. To get some, join the [Sui Discord](https://discord.gg/Sui), complete the verification steps, enter the `#testnet-faucet` channel and type `!faucet <WALLET ADDRESS>`. For other ways to get SUI in your Testnet account, see [Get SUI Tokens](/guides/developer/getting-started/get-coins).
Before being able to publish your package to Testnet, you need Testnet SUI tokens. To get some, visit the online faucet at https://faucet.sui.io/. For other ways to get SUI in your Testnet account, see [Get SUI Tokens](/guides/developer/getting-started/get-coins).

Now that you have an account with some Testnet SUI, you can deploy your contracts. To publish your package, use the following command in the same terminal or console:

Expand Down

0 comments on commit 59ce28f

Please sign in to comment.