Skip to main content

Get Test Tokens

This guide explains how to fund your wallet with $AGUNG tokens (testnet tokens) using two methods: through the Substrate side or the EVM side.

Funding Your Wallet

You have two ways to fund your wallet:

  1. Substrate: Request $AGUNG tokens from the faucet bot on Discord.
  2. EVM: Transfer tokens from a Substrate SS58 wallet address to an EVM-compatible H160 wallet address.

Funding via Substrate

Prerequisites

Before you begin, ensure you have the following:

  1. Substrate (SS58) address: You can use wallets like Polkadot.js or Talisman.
  2. Discord account: If you don't have one, you can create it here.
  3. Join the Peaq server: Access the server via this invite link.

Getting $AGUNG

Obtaining the tokens is simple. Follow these steps:

  1. Join the Discord channel and navigate to the #get-roles channel.

  2. Click on the 🏗️ (crane) emoji to claim your role as a developer. This will unlock the #agung-faucet channel.

  3. In the #agung-faucet channel, send a formatted message with your wallet address. The bot will then send 1.0 $AGUNG to your wallet.

    Message format:

    !send <your-wallet-address-here>

    Example:

    !send 5HZ89ZMLw1QTFKtE4iegxQUoB452418J4vSXYuebjcNcKNVm
  4. After sending the message, you should see a success message from the bot:

    token-earn-1

Confirming $AGUNG Receipt

Once the test tokens have been sent to your wallet, confirm that they have been received:

  1. Go to the accounts tab in the Agung Block Explorer.

  2. Connect your wallet(s) to the page to see your Agung balance, as shown below:

    agung-token-allocation

Connecting Tokens to Local Environment

After confirming that your wallet has received $AGUNG, you need to connect your wallet's seed phrase to the SDK for write operations. To securely store your seed phrase, follow these steps:

  1. Download the Dotenv secret resource manager for safe local storage.

  2. Create a .env file in your root repository and add a variable (e.g., MNEMONIC) with your seed phrase:

    Example .env file:

    MNEMONIC="YOUR SECRET SEED PHRASE"
  3. Import into your local JavaScript file:

    import dotenv from 'dotenv';

    dotenv.config();
    const MNEMONIC = process.env.MNEMONIC;

Now you have a global variable that can be used as the seed to fund write transactions using the SDK, and to fund the deployment of EVM Contracts or WASM contracts.


Funding via EVM

This section provides an explanation on how to send Peaq/Krest/Agung tokens from a Substrate SS58 wallet address to an EVM-compatible H160 wallet address.

Create an Ethereum Wallet

  1. Get Metamask from the Metamask Wallet Extension.
  2. Add the Agung network to Metamask using the following configuration (or refer to Krest/Peaq):

Convert Substrate Wallet to an ETH Wallet

To convert your H160 Ethereum address to an SS58 Substrate address for token transfer, follow these steps:

  1. Copy your ETH address (Public Key).

  2. Use the address converter website to calculate your deposit address for Substrate.

  3. Change the address scheme to "H160".

  4. Leave the "Change address prefix" at "42".

  5. Enter your ETH address (Public Key) into the "Input address" field.

    evm-wallet-1

  6. Copy the lower address, which represents your deposit address.

    evm-wallet-2

Now you have an SS58 Substrate address that is tied to your Ethereum wallet. The next step is to transfer the tokens from the Agung supplied wallet to this newly generated address.

Transfer Tokens

  1. Go to the Polkadot.js Agung accounts page.

  2. Click on the send button.

    evm-wallet-3

  3. Paste your EVM converted address into the "Send to address" field and hit enter.

    evm-wallet-4

  4. Input the amount of Agung to transfer and click "Make Transfer".

    evm-wallet-5

  5. Authorize the transaction by signing and submitting.

    evm-wallet-6

  6. Enter your Substrate wallet password to complete the transaction.

    evm-wallet-7

  7. Go to Metamask to ensure your tokens have been sent correctly.

    evm-wallet-8


Congratulations! You have successfully funded your wallet using either the Substrate or EVM method. Now you have the funds to deploy your EVM contracts to the Agung test network.