> ## Documentation Index
> Fetch the complete documentation index at: https://docs.peaq.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# ERC-20

peaq inherits the [ERC-20 Native Token precompile](https://github.com/peaqnetwork/peaq-network-node/blob/dev/precompiles/balances-erc20/ERC20.sol) to interact with the peaq token as is it
were a native ERC-20. This prevents the need to have wrapped representations of the same token and allows for easy interaction with the token without the need to deploy another smart contract.
This guide will show you how to interact with peaq's testnet token, agung, through this precompile using Remix. The same can be done on peaq mainnet.

## Prerequisites

* Basic understanding of blockchain, EVM, and ERC-20 concepts.
* Using the Remix IDE with MetaMask configured to interact with a peaq network.
* You have token funds available in the wallet connected to the a peaq network.

## Instructions

### 1. Setup Remix IDE

* Open the [Remix website](https://remix.ethereum.org/).
* Create a new blank workspace for the precompiles.

### 2. Create a New File

* In your Remix workspace, create a new file named `IERC-20.sol`.
* Copy the content of the ERC-20 precompile file from the peaq network node precompile page and paste it into the `IERC-20.sol` file. The precompile is found at
  the [peaq node source code.](https://github.com/peaqnetwork/peaq-network-node/blob/dev/precompiles/balances-erc20/ERC20.sol)

### 3. Compile the Contract

* Compile the `IERC-20.sol` file by clicking on the **Solidity Compiler** tab and selecting the appropriate compiler version.
* Ensure the compilation is successful and generates the ABI file needed for interacting with the smart contract.

### 4. Deploy and Interact with the Contract

1. Under the **Deploy and Run Transactions** tab, select **Injected Provider - MetaMask** as the environment.
2. Ensure your chain ID matches the selected network (peaq/agung).
3. Choose the account with sufficient token funds.
4. Set the contract address to `0x0000000000000000000000000000000000000809` (found at the top of the copied file).
5. Click **At Address** to load the deployed contract into the interface.

### 5. Interact with the Functions

<img src="https://mintcdn.com/peaq/bfUMfJGiNN2sOYvn/assets/img/erc-20-precompile-1.png?fit=max&auto=format&n=bfUMfJGiNN2sOYvn&q=85&s=7c50a9a1cc84a219c1d3dd90c2ffbf2f" alt="erc-20-precompile-1" width="532" height="978" data-path="assets/img/erc-20-precompile-1.png" />

The contract that you are able to interact with will show up on the bottom the the sidebar.
Here lie all the functions that are present in the interface. For detailed information about the functions it provides please see the [EIP-20 Token Standard](https://eips.ethereum.org/EIPS/eip-20).
