# Burn ERC-20 Token

It is possible to proceed an ERC-20 Token burning test using Remix.

There are two ways to burn ERC-20 Token.

* **Sending to a Dead Wallet Address**
* **Burning by the Administrator**

{% hint style="info" %}
All examples are based on WEMIX3.0 Testnet.
{% endhint %}

## **1 . Sending to a Dead Wallet Address**

First, let's proceed with the burning process by sending the ERC-20 Token to the Dead Wallet address.&#x20;

[Write ERC-20 Contract ](https://docs.wemix.com/en/tutorial/erc-20-token/write-erc-20-contract)and [Check ERC-20 Token](https://docs.wemix.com/en/tutorial/erc-20-token/check-erc-20-token) should proceed first.

### Sending to a Dead Wallet Address

Once adding the Token is completed after deploying ERC-20 Contract, select the added ERC-20 Token and proceed with 'Send' to the Dead Wallet address.

<figure><img src="https://content.gitbook.com/content/Hf9f4FuSvei1yoMuW1wT/blobs/NpMUejLkHRRSTeEyczhc/1%E1%84%86%E1%85%A6%E1%84%90%E1%85%A1%E1%84%86%E1%85%A1%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%20Send%20Token_WT.png" alt=""><figcaption><p>Send Token_WT at MetaMask</p></figcaption></figure>

Select 'Send' in the figure above. After then enter the Dead Wallet address and the quantity of Token you want to burn.

{% hint style="info" %}
**Dead Wallet Address**

0x000000000000000000000000000000000000dEaD
{% endhint %}

The figure below is the example of buring 10,000,000 WT Tokens to the Dead Wallet address.

<figure><img src="https://content.gitbook.com/content/Hf9f4FuSvei1yoMuW1wT/blobs/EgREnCCh0AB7ENdf20S2/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202023-02-21%20%E1%84%8B%E1%85%A9%E1%84%92%E1%85%AE%205.38.52.png" alt=""><figcaption><p>example of burning ERC-20</p></figcaption></figure>

When you select 'Next' after entering Token amount that you want to burn, a MetaMask pop-up appears and a screen showing the default 'Gas Fee' based on Ethereum appears.

<figure><img src="https://content.gitbook.com/content/Hf9f4FuSvei1yoMuW1wT/blobs/nUj4CBsfYyYbXjhgVCCr/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202023-02-21%20%E1%84%8B%E1%85%A9%E1%84%92%E1%85%AE%205.39.04.png" alt=""><figcaption><p>MetaMask, default 'Gas fee'</p></figcaption></figure>

WEMIX has a different fee policy than Ethereum, so press the 'Site suggested' button to change t the Gas Fee.

Selecting 'Advanced' on the screen below allows the user to set 'Max priority fee (GWEI)' and 'Max fee (GWEI)' manually.

<figure><img src="https://content.gitbook.com/content/Hf9f4FuSvei1yoMuW1wT/blobs/Rb7lqqDcE9JfVMBzwA9Z/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202023-02-21%20%E1%84%8B%E1%85%A9%E1%84%92%E1%85%AE%205.39.08.png" alt=""><figcaption><p>MetaMask default 'Gas Fee' setting entry screen</p></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/Hf9f4FuSvei1yoMuW1wT/blobs/lcKRSnkvMYoJlzU53mhu/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202023-02-21%20%E1%84%8B%E1%85%A9%E1%84%92%E1%85%AE%205.39.13.png" alt=""><figcaption><p>'Gas Fee' setting</p></figcaption></figure>

Currently, WEMIX is using a fixed 'Max priority fee (GWEI)' and the value is 100.&#x20;

Max fee is a user-defined value and the minimum value is MaxPriorityFee+BASE\_FEE.&#x20;

BASE\_FEE in WEMIX is variable according to EIP-1559. Therefore, for a transaction to be successfully created, it is recommended to set it as follows.

1. Max base fee (GWEI) = 101
2. Max priority fee (GWEI) = 100&#x20;

Complete the Fee setup in the figure above and select 'Save' to be ready for burning Token as shown below.

<figure><img src="https://content.gitbook.com/content/Hf9f4FuSvei1yoMuW1wT/blobs/dexjpodt1fFf567oT1WJ/ERC-20%20%E1%84%8B%E1%85%A8%E1%84%89%E1%85%B5%20%E1%84%89%E1%85%A9%E1%84%80%E1%85%A1%E1%86%A8%20Confirm.png" alt=""><figcaption><p>Confirm ERC-20 Token burning </p></figcaption></figure>

Select 'Confirm' in the figure above to burn ERC-20 Token.

If a green check mark appears at the bottom of the Remix screen as shown below, the burning ERC-20 Token is completed normally.

<figure><img src="https://content.gitbook.com/content/Hf9f4FuSvei1yoMuW1wT/blobs/Zkn0OVpBUdWE360yjB8b/ERC-20%20%E1%84%8B%E1%85%A8%E1%84%89%E1%85%B5%20%E1%84%89%E1%85%A9%E1%84%80%E1%85%A1%E1%86%A8%20%E1%84%8B%E1%85%AA%E1%86%AB%E1%84%85%E1%85%AD.png" alt=""><figcaption><p>Complete ERC-20 Token burning</p></figcaption></figure>

If you select the ERC-20 Token that you created on the Token List page in [Testnet Explorer](https://explorer.test.wemix.com/)., you can confirm that the ERC-20 Token has been burned normally.

<figure><img src="https://content.gitbook.com/content/Hf9f4FuSvei1yoMuW1wT/blobs/9LGeqEezKsHT55iu8hoZ/WEMIX3.0%20Testnet%20Explorer_20token%20%E1%84%89%E1%85%A9%E1%84%80%E1%85%A1%E1%86%A8.png" alt=""><figcaption><p>WEMIX3.0 Testnet Explorer </p></figcaption></figure>

## **2 . Burning by the Administrator**

Second, we will proceed with the burning ERC-20 Token process by the Administrator in Remix.

[Write ERC-20 Contract ](https://docs.wemix.com/en/tutorial/erc-20-token/write-erc-20-contract)and [Check ERC-20 Token](https://docs.wemix.com/en/tutorial/erc-20-token/check-erc-20-token) should proceed first.

### Burning ERC-20 Token directly

You can see the contents of the deployed contract in the "Deployed Contracts" section of the screen where the ERC-20 Contract was deployed.&#x20;

Select 'burn' to enter account and amount. \
In account, enter the deployed address, and in account, enter the quantity you want to burn.

The figure below shows an example of burning 999 WBT Token after deploying WEMIX BurnToken Contract.

<figure><img src="https://content.gitbook.com/content/Hf9f4FuSvei1yoMuW1wT/blobs/wCOqH3TkVpIqihei3Nd2/ERC-20%20%E1%84%8B%E1%85%A8%E1%84%89%E1%85%B5%20%E1%84%89%E1%85%A9%E1%84%80%E1%85%A1%E1%86%A8.png" alt=""><figcaption><p>example of buring ERC-20</p></figcaption></figure>

When 'transact' is selected after entering the account and amount, a MetaMask pop-up appears as shown below, and a screen showing the default "Gas Fee" based on Ethereum appears.

<figure><img src="https://content.gitbook.com/content/Hf9f4FuSvei1yoMuW1wT/blobs/w4VABPCGmBgeSOxAjczM/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202023-02-22%20%E1%84%8B%E1%85%A9%E1%84%8C%E1%85%A5%E1%86%AB%209.58.15.png" alt=""><figcaption><p>MetaMask, default 'Gas fee'</p></figcaption></figure>

WEMIX has a different fee policy than Ethereum, so press the 'Site suggested' button to change t the Gas Fee.

Selecting 'Advanced' on the screen below allows the user to set 'Max priority fee (GWEI)' and 'Max fee (GWEI)' manually.

<figure><img src="https://content.gitbook.com/content/Hf9f4FuSvei1yoMuW1wT/blobs/riUj7QRIuxbbVjDDsoSq/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202023-02-22%20%E1%84%8B%E1%85%A9%E1%84%8C%E1%85%A5%E1%86%AB%209.58.20.png" alt=""><figcaption><p>MetaMask default 'Gas Fee' setting entry screen</p></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/Hf9f4FuSvei1yoMuW1wT/blobs/ITjq5odyIi5GEMSDZgDe/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202023-02-22%20%E1%84%8B%E1%85%A9%E1%84%8C%E1%85%A5%E1%86%AB%209.58.23.png" alt=""><figcaption><p>'Gas Fee' setting</p></figcaption></figure>

Currently, WEMIX is using a fixed 'Max priority fee (GWEI)' and the value is 100.&#x20;

Max fee is a user-defined value and the minimum value is MaxPriorityFee+BASE\_FEE.&#x20;

BASE\_FEE in WEMIX is variable according to EIP-1559. Therefore, for a transaction to be successfully created, it is recommended to set it as follows.

1. Max base fee (GWEI) = 101
2. Max priority fee (GWEI) = 100&#x20;

Complete the Fee setup in the figure above and select 'Save' to be ready for deployment as shown below.

<figure><img src="https://content.gitbook.com/content/Hf9f4FuSvei1yoMuW1wT/blobs/2P1bqsP3dfkNISTUTJed/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202023-02-22%20%E1%84%8B%E1%85%A9%E1%84%8C%E1%85%A5%E1%86%AB%209.58.29.png" alt=""><figcaption><p>Confirm Example ERC-20 burning</p></figcaption></figure>

Select 'Confirm' in the figure above to proceed with the contract deployment.&#x20;

If a green check mark appears at the bottom of the Remix screen as shown below, the deployment is completed normally.

<figure><img src="https://content.gitbook.com/content/Hf9f4FuSvei1yoMuW1wT/blobs/1xhEg0trqncWYMEUJlEZ/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202023-02-22%20%E1%84%8B%E1%85%A9%E1%84%8C%E1%85%A5%E1%86%AB%209.58.46.png" alt=""><figcaption><p>Complete Example ERC-20 burning</p></figcaption></figure>

If you select the ERC-20 Token that you created on the Token List page in [Testnet Explorer](https://explorer.test.wemix.com/), you can confirm that the ERC-20 Token has been burned normally.

<figure><img src="https://content.gitbook.com/content/Hf9f4FuSvei1yoMuW1wT/blobs/V4andqdihZb0UQRB3hox/WEMIX3.0%20Testnet%20Explorer%20_20token%20%E1%84%89%E1%85%A9%E1%84%80%E1%85%A1%E1%86%A82.png" alt=""><figcaption><p>WEMIX3.0 Testnet Explorer </p></figcaption></figure>
