# METL User Guide v0.1.0 - Fuji Only Implementation
## Logging In
The METL Admin App requires wallet access and for the user to be on Avalanche's FUJI C-Chain Test Net.
If the user has not yet connected to the METL Admin App, this screen (with metamask request if using metamask) will appear:

Note how the current Metamask network is the xDai network. The Network flag below the 'CONNECT WALLET' button indicates the network is unsupported.
After connecting your wallet to the app, the "Connect Wallet" button will change to a "Log In" button.

Logging in while the Network Flag reads "No Supported network detected" or "Avalanche network detected" will currently fail.
This is because the smart contract is currently (November 13, 2021, 10:07 Pacific Time) only deployed to Avalanche's Fuji Test Net.
After connecting to the Fuji Testnet, the network flag will reflect that the user is using the Fuji Testnet:

And the user can now attempt to log in.
### About FUJI
You may need to manually add FUJI to your Metamask.
The instructions for that are available here: https://docs.avax.network/build/tutorials/smart-contracts/deploy-a-smart-contract-on-avalanche-using-remix-and-metamask#step-1-setting-up-metamask
You may also need test AVAX for interacting with the test net. That is available here: https://faucet.avax-test.network/
### LOGIN Process
When the user clicks 'LOG IN', the App will check against the deployed smart contract if the user's current address has a ROLE in the smart contract in the following order:
- Admin
- Burner
- Freezer
- Minter
- Pauser
It's organized alphabetically. A different order is possible if requested.
If the app discovers that a user's wallet address exists in a role, the app redirects the user to the interface for that role.
**IMPORTANT**: If a user is assigned to both BURNER **AND** FREEZER, the user will be sent to the **BURNER** screen after logging in because it is checked **first.** To access additional screens, the user will have to **manually enter the URL** of the desired screen.
If the app does NOT find a role for the user, they are redirected to the `/no-role` screen:

## ADMIN INTERFACE
The admin interface has 7 screens. From Left-To-Right:
- Edit Minters
- Edit Burners
- Edit Freezers
- Edit Pausers
- Review Transactions
- Send Tokens
- Update Pools

### Review Transactions (above)
`/admin`
The first screen users are directed to is the "Review Transactions" screen.
This screen is not yet hooked up to a data source and displays nothing, currently, but when data is hooked up it will display transactions.
### Edit Minters
`/admin/edit-minters`

The Edit Minters screen allows the Admin to ADD and REMOVE addresses from the 'Minter Role'. Only addresses that have been ADDED to the MINTER role may MINT.
(Admins may also be minters.)
Currently, there is just a UI to ADD and REMOVE. In the future, when data is hooked up, the Admin will be able to enter a Name in the "Add Minter" field and store that along with the address.
Below the ADD and REMOVE form, there will be a data table detailing recent ADD and REMOVE transactions.
### Edit Burners
`/admin/edit-burners`

The Edit Burners screen allows the Admin to ADD and REMOVE addresses from the 'Burner Role'. Only addresses that have been ADDED to the BURNER role may BURN.
(Admins may also be burners.)
Currently, there is just a UI to ADD and REMOVE. In the future, when data is hooked up, the Admin will be able to enter a Name in the "Add Burner" field and store that along with the address.
Below the ADD and REMOVE form, there will be a data table detailing recent ADD and REMOVE transactions.
### Edit Freezers
`/admin/edit-freezers`

The Edit Freezers screen allows the Admin to ADD and REMOVE addresses from the 'Freezer Role'. Only addresses that have been ADDED to the FREEZER role may FREEZE.
(Admins may also be freezers.)
Currently, there is just a UI to ADD and REMOVE. In the future, when data is hooked up, the Admin will be able to enter a Name in the "Add Freezer" field and store that along with the address.
Below the ADD and REMOVE form, there will be a data table detailing recent ADD and REMOVE transactions.
### Edit Pausers
`/admin/edit-pausers`

The Edit Pausers screen allows the Admin to ADD and REMOVE addresses from the 'Pauser Role'. Only addresses that have been ADDED to the PAUSER role may PAUSE.
(Admins may also be pausers.)
Currently, there is just a UI to ADD and REMOVE. In the future, when data is hooked up, the Admin will be able to enter a Name in the "Add Pauser" field and store that along with the address.
Below the ADD and REMOVE form, there will be a data table detailing recent ADD and REMOVE transactions.
### Send Tokens
`/admin/send-tokens`

Send tokens currently just redirects the ADMIN to the current network's MULTISIG Provider (Gnosis on xDai and ETH, Pangolin on Fuji and Avalanche).
### Update Pools
`/admin/update-pool`

The Update Pool screen allows the Admin to Whitelist and De-Whitelist Addresses for Mint and Burn transactions.
ONLY ADDRESSES THAT HAVE BEEN WHITELISTED ARE VALID TARGETS FOR MINTS AND BURNS.
(There is no requirement for the Whitelist to be a multi-sig, but the intention is ONLY Multisigs will be Whitelisted. For Testing, you may add your own address as a Whitelist on Fuji.)
Currently, there is just a UI to ADD (Whitelist) and REMOVE (DeWhitelist). In the future, when data is hooked up, the Admin will be able to enter a Name in the "Add Pool" field and store that along with the address.
Below the ADD and REMOVE form, there will be a data table detailing recent ADD and REMOVE transactions.
## BURNER Interface
### Burn Tokens
`/burner/burn-tokens`

This is the main interface for Burners. The form takes an address and an amount (may be an integer or decimal to 16 places).
In a Version 2, we may query the Database of currently Whitelisted banks (or employ the subgraph to maintain this list) so Burners can select the correct bank from a dropdown.
### Review Transactions
`/burner/review-transactions`

Similarly to the Admin's Review transactions, this data is not yet hooked up.
When hooked up, I intend for this to display a list of confirmed and stored BURN transactions so Burners don't accidentally perform multiple burns to the same account.
## MINTER Interface
### Mint Tokens
`/minter/mint-tokens`

This is the main interface for Minters. The form takes an address and an amount (may be an integer or decimal to 16 places).
In a Version 2, we may query the Database of currently Whitelisted banks (or employ the subgraph to maintain this list) so Minters can select the correct bank from a dropdown.
### Review Transactions
`/minter/review-transactions`

Similarly to the Admin's Review transactions, this data is not yet hooked up.
When hooked up, I intend for this to display a list of confirmed and stored MINT transactions so Minters don't accidentally perform multiple burns to the same account.
## FREEZER Interface
### Freeze Transactions
`/freezer/freeze-transactions`

The Freezer has just 1 screen, freeze-transactions.
The Freeze Transactions screen allows the Freezer to Freeze and Unfreeze Addresses for all Transfer actions (Mint, Burn, Transfer).
Currently, there is just a UI to Freeze and Unfreeze.
Below the FREEZE and UNFREEZE form, there will be a data table detailing recent FREEZE and UNFREEZE transactions.
## PAUSER Interface
### Pause Transactions
`/pauser/pause-transactions`

The Pauser has just 1 screen, pause-transactions.
The Pause Transactions screen allows the Pauser to Pause and Unpause the network for all Transfer actions (Mint, Burn, Transfer).
NOTE: Pausing the network does not block ROLE updates. The network can be Paused and suspicious or malicious wallets can be FROZEN before unpausing the network.
The button updates on page load to reflect the current state of the chain. If the network is currently PAUSED, the button will read "UNPAUSE" and on click will unfreeze the network (if the function initator has the correct wallet address).