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:
- Substrate: Request $AGUNG tokens from the faucet bot on Discord.
- 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:
- Substrate (SS58) address: You can use wallets like Polkadot.js or Talisman.
- Discord account: If you don't have one, you can create it here.
- Join the Peaq server: Access the server via this invite link.
Getting $AGUNG
Obtaining the tokens is simple. Follow these steps:
Join the Discord channel and navigate to the #get-roles channel.
Click on the 🏗️ (crane) emoji to claim your role as a developer. This will unlock the #agung-faucet channel.
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
After sending the message, you should see a success message from the bot:
Confirming $AGUNG Receipt
Once the test tokens have been sent to your wallet, confirm that they have been received:
Go to the accounts tab in the Agung Block Explorer.
Connect your wallet(s) to the page to see your Agung balance, as shown below:
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:
Download the Dotenv secret resource manager for safe local storage.
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"
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
- Get Metamask from the Metamask Wallet Extension.
- Add the Agung network to Metamask using the following configuration (or refer to Krest/Peaq):
- Network name: Agung
- RPC URL: https://rpcpc1-qa.agung.peaq.network
- Chain ID: 9990
- Currency symbol: AGNG
Convert Substrate Wallet to an ETH Wallet
To convert your H160 Ethereum address to an SS58 Substrate address for token transfer, follow these steps:
Copy your ETH address (Public Key).
Use the address converter website to calculate your deposit address for Substrate.
Change the address scheme to "H160".
Leave the "Change address prefix" at "42".
Enter your ETH address (Public Key) into the "Input address" field.
Copy the lower address, which represents your deposit address.
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
Go to the Polkadot.js Agung accounts page.
Click on the send button.
Paste your EVM converted address into the "Send to address" field and hit enter.
Input the amount of Agung to transfer and click "Make Transfer".
Authorize the transaction by signing and submitting.
Enter your Substrate wallet password to complete the transaction.
Go to Metamask to ensure your tokens have been sent correctly.
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.