# Use Remix and Metamask to test smart contract
## Install Metamask
- https://metamask.io/download/
- Faucet ETH testnet (Rinkeby testnet): https://faucet.metamask.io/
- Switch to Rinkeby testnet

- Switch account in Metamask


## Use Remix
Access to URL of Remix: https://remix.ethereum.org/
### Step 1: Create contract file
- Create new file in folder **contracts**

- Create file **MetareumXP.sol**

- Copy code to **MetareumXP.sol**

### Step 2: Compile smart contract
- Switch to **Solidity Compiler** tab

- Choose version Solidty fit with `pragma solidity` (In here is 0.8.7)
- Press button Compile MetareumXP.sol
- Compile success

### Step 3: Deploy smart contract to Rinkeby testnet
- Switch to "Deploy & run transactions" tab

- Switch *ENVIRONMENT* from **Remix VM(London)** to **Injected Provider - Metamask**

- Press button **Deploy** and Confirm transaction with Metamask (Balance ETH > 0)

- Deploy Successfully, Instance of contract will visible **Deployed Contracts*8 tab.

### Step 4: Test function in smart contract
### Check balance token
- Paste address to input parameter, press **balanceOf**

### Check name token
- Call **name** function

### Check symbol token
- Call **symbol** function

### Check total supply
- Call **totalSupply** function

### Transfer token (balanceOf > 0)
- Call function **transfer** or **transferFrom**

- Confim with Metamask

- New balance of sender

- New balance of receiver

### Mint token (only admin - address deploy contract)

- If address is not admin, transaction will fail

### Burn token

- New balance after burn
