How unlock Water
Summary
- The contract
0x90c79A307836C31889Ced9050B34F9290fB860A2
uses the WRC-20 standard with added functions. - After deploying the contract, you received 1 Water in your balance; this is necessary for you to be able to execute the "Unlock" function.
- Execute the "Unlock" function to get the initial amount, and the remainder you will receive in WWater tokens, which will be unlocked according to the rules.
- Import the WWater token into MetaMask to see how many available and frozen tokens you have in total.
- Execute the "Withdraw" function when you want to convert WWater tokens into Water coins.
- Use the "waitingBalanceOf" function to see how many WWater tokens you have frozen.
- Use the "availableBalanceOf" function to see how many WWater tokens you can use.
Preparation for work
Install and config Metamask
MetaMask is a browser extension that allows interaction with applications. We use MetaMask to execute transactions and interact with smart contracts on the Ethereum mainnet directly from our browser.
- Install Metamask https://docs.waterfall.network/getting-started/metamask/
-
Click to select with networks
-
Click on button "Add network"
- Go to the creation page and click Add network
-
Add MainNet settings in Metamask by specifying the following parameters:
- Network Name: Waterfall
- RPC URL: https://rpc.waterfall.network/
- Chain ID: 181
- Currency symbol: WATER
- Block Explorer URL: https://explorer.waterfall.network
-
Click on the Save button
Import token contract
A token is typically used within a network for internal operations like delegation or transfers. A coin is a common unit of payment or exchange within cryptocurrency. Adding the contract to MetaMask will simplify token transfers and display of balances.
- Go to the wallet to which the contract was written and click on "Import tokens"
- Insert
0x90c79A307836C31889Ced9050B34F9290fB860A2
in field and namedWWATER
- Approve
Step by step on how to get tokens to MetaMask
To execute unlock and token withdrawal request, the contract must be deployed using the interface.
- Follow the link https://remix.ethereum.org/
- Click on the File Explorer
- Create workspace
- Choose blank
- Name workspace name "Smart Contract"
- Click OK
- Download
This file and upload it to your space - Click on the file (its important, to choose it)
- in the left side menu, select Run & Deploy Contract
- In Environment drop down menu selecet - Inject Provider MetaMask
-
Enter the * Contract -
0x90c79A307836C31889Ced9050B34F9290fB860A2
-
Click on button at address
-
Click Ok
14 . Deploy successful, scroll down to the contract
How to connect Metamask
- Open the Metamask tab
- Enter your account password
- Go to the wallet to which the contract was written
- find your account in the drop-down menu
Initial unlock
To activate unlock and receive the initial WATER, you need to confirm the unlock.
- Before unlock you have 1 Water and 0 WWater
- Click on the arrow to see the contract menu.
- Select the account from which you want to top up and select a query "unLock" in the side menu.
- Press the button "unLock" and approve transaction in Metamask
- Then you can check Water and WWater balance in Metamask
Withdraw
To convert tokens to coins, you need to authorize under your account and use the request Withdraw
- Select the account from which you want to top up and select a query "Withdraw" in the side menu.
- Enter the amount(in wei 1 WATER is 10ˆ18) in the field "AMOUNT"
- Press the button transact
You can check your balance via MetaMask
or by requesting
Note that tokens cannot be withdrawn if:
- You have insufficient balance or lack coins to pay for gas.
- The withdrawTime for delegation has not yet begun (consider a delay of 5-10 minutes from the timer's end).
- The contract is currently in a paused state.