> For the complete documentation index, see [llms.txt](https://docs.bosagora.org/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bosagora.org/en/getting-started/deploy-smart-contract/using-remix.md).

# Using Remix

Deploys a ERC20 smart contract with a message, and renders it in the front-end. You can interact with the smart contract easily!

This dApp implements a "Hello World" style application that echoes a message passed to the contract to the front end. This tutorial is intended to be followed using the online IDE available at [Remix IDE](https://remix.ethereum.org/).

#### Setting Up [Remix IDE](https://remix.ethereum.org/)

* Remix is an online IDE to develop smart contracts.
* You need to choose Solidity Compiler and Deploy and Run Transactions.
* Go to File Explorers, And Create a new file, Name it ERC20Token.sol
* Copy/Paste the Smart contract below into the newly created file `ERC20Token.sol`

#### Writing the Smart Contract

* Create a new contract ERC20Token.sol and copy the contract code from the ERC20 token template [here](file:///Users/henry/dev/docs-biznet/source/en/biznet/develop/ERC20Token.template)
* Modify "TOKEN\_NAME", "TOKEN\_SYMBOL", "DECIMALS" and "TOTAL\_SUPPLY" according to your requirements.

<figure><img src="https://414935379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhLwN1P77iqN0Pusrnl0l%2Fuploads%2Fr5PPx6w8jUbkfEyvtiHd%2Fremix_01.png?alt=media&amp;token=ac0289ab-e769-44c8-ba9f-cd91d2a45044" alt=""><figcaption></figcaption></figure>

In the first line, `pragma solidity ^0.8.0` specifies that the source code is for a Solidity version greater than 0.8.0. [Pragmas](https://solidity.readthedocs.io/en/latest/layout-of-source-files.html#pragma) are common instructions for compilers about how to treat the source code (e.g., pragma once).

A contract in the sense of Solidity is a collection of code (its functions) and data (its state) that resides at a specific address on the Ethereum blockchain. Learn more about the [constructor](https://solidity.readthedocs.io/en/latest/contracts.html#constructor) and [memory](https://solidity.readthedocs.io/en/latest/introduction-to-smart-contracts.html#storage-memory-and-the-stack) in the docs.

#### Compile Smart Contract

* Step1: Click the button to switch to compile page
* Step2: Select the "ERC20Token" contract
* Step3: Enable "Auto compile" and "optimization"
* Step4: Click "ABI" to copy contract ABI and save it.

#### Deploy Smart Contract Using TestNet

Now, We have to deploy our smart contract on BizNet Network. For that, we have to connect to web3 world, We will be using Metamask.

* Copy your address from Metamask
* Head over to Faucet - <https://faucet.bosagora.org/request/boa/your-address> and request test BOA
* Now, let's Deploy the Smart Contract on Testnet
* Select "Injected Web3" in the ENVIRONMENT dropdown and your contract

<figure><img src="https://414935379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhLwN1P77iqN0Pusrnl0l%2Fuploads%2FBVNMj6nBwBhYAsOzqdaY%2Fremix_02.png?alt=media&amp;token=9f098d18-6484-4d0e-994f-076fd027dc2f" alt=""><figcaption></figcaption></figure>

* Metamask accepts the Connection Request!

<figure><img src="https://414935379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhLwN1P77iqN0Pusrnl0l%2Fuploads%2FRQVDQr5cThYoj2sYkagX%2Fremix_04.png?alt=media&amp;token=6bc828c6-e9ba-4689-be7a-d731dfaaebb5" alt=""><figcaption></figcaption></figure>

<figure><img src="https://414935379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhLwN1P77iqN0Pusrnl0l%2Fuploads%2FEeiRNa7O8TFqvvOjxgsk%2Fremix_05.png?alt=media&amp;token=1ff6b257-64ad-47a0-911a-7e25dff283eb" alt=""><figcaption></figcaption></figure>

* From the CONTRACT dropdown menu, select the ERC20Token.sol you created earlier.

<br>

<figure><img src="https://414935379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhLwN1P77iqN0Pusrnl0l%2Fuploads%2Fj7yPdM915x2aQCVBT8ps%2Fremix_03.png?alt=media&amp;token=c214a00b-4ae9-4bf2-ab57-69d17856ab12" alt=""><figcaption></figcaption></figure>

* Click the Deploy button in Remix and accept another Metamask popup that requires transaction confirmation once connected!

**Congratulations!** You have successfully deployed an ERC20 Contract. Now you can interact with the Smart Contract. Check the deployment status here: [https://testnet-scan.bosagora.org](https://testnet-scan.bosagora.org/)<br>
