Skip to content

Commit

Permalink
Added a section about swapping native tokens for ZETA (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev authored Aug 30, 2023
1 parent 753ca8e commit b89d905
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 6 deletions.
45 changes: 39 additions & 6 deletions docs/reference/get-testnet-zeta.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,42 +34,75 @@ provided below.
The easiest way to get testnet ZETA is to use the ZetaChain CLI faucet. You can
install the CLI by following the instructions (you may need `sudo` priveleges):

```bash
```
npm install -g @zetachain/faucet-cli@athens3
```

Once installed, you can use the faucet to get ZETA tokens on any EVM-compatible
network. For example, to get ZETA on the Goerli testnet, you can run:

```bash
```
zetafaucet --drip --address 0x4bB9089ee3B86e97b171838205483362966f9dE8 --chain goerli_testnet
```

You will be prompted to authenticate with your Github account to use the faucet.
You will be prompted to authenticate with your GitHub account to use the faucet.

Please note that using this faucet you can get only ZETA tokens, not the native
gas assets of the respective networks. If you need more gas assets, you can use
the other faucets listed below.

### Swapping Native Gas Assets for ZETA

If you already have some native gas assets on the respective testnet networks,
you can swap them for ZETA tokens using Uniswap on Goerli and Mumbai and Pancake
Swap on BSC testnet.

For example, to swap gETH for ZETA do the following:

- Go to [Uniswap](https://app.uniswap.org/#/swap)
- Press "Connect" to connect your wallet
- Switch to the **Goerli testnet** in your wallet (please, make sure you're on
the testnet network before proceeding)
- Select ETH as the input token
- Press "Select token"
- Add ZETA token by pasting the `zetaToken` contract address from the
[testnet addresses](/reference/testnet) page into the input field
- Enter amount and press "Swap"

![Uniswap](/img/docs/uniswap.jpg)

Optionally, import `zetaToken` contract address into your wallet to see your
ZETA balance.

After receiving ZETA tokens on Goerli, you can either switch to another testnet
network (like Mumbai or BSC testnet) to swap ZETA there, or use the built-in
[`send-zeta`](/developers/tokens) command to transfer ZETA between connected
networks.

### Using a Hardhat template

If you're using [a Hardhat template](https://github.com/zeta-chain/template),
you can get ZETA tokens by running the following command:

```bash
npx hardhat faucet --chain goerli
```
npx hardhat faucet --chain goerli_testnet
```

Under the hood this command uses the ZetaChain CLI faucet.

### Using the Faucet on Discord

You can also get testnet ZETA on the
[ZetaChain Discord server](https://discord.com/invite/zetachain). To do so,
please follow the instructions provided in the `#zeta-faucet-athens-3` channel.

## Getting Additional Testnet Gas Assets

If you need more gas assets for the respective testnet networks to transact
with, you can try the following faucets:

- [Paradigm Faucet](https://faucet.paradigm.xyz) (Goerli, Polygon Mumbai, etc.)
- [Goerli Proof of Work Faucet](https://goerli-faucet.pk910.de/) (Goerli)
- [Goerli Authenticated Faucet](https://goerli-faucet.mudit.blog/) (Goerli)
- [Polygon Faucet](https://faucet.polygon.technology/) (Polygon Mumbai)
- [Binance Smart Chain Faucet](https://testnet.binance.org/faucet-smart) (BSC
Testnet)
Expand Down
Binary file added static/img/docs/uniswap.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b89d905

Please sign in to comment.