Skip to content

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.

  1. Install Metamask https://docs.waterfall.network/getting-started/metamask/
  2. Click to select with networks

  3. Click on button "Add network"

  4. Go to the creation page and click Add network
  5. 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
  6. 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.

  1. Go to the wallet to which the contract was written and click on "Import tokens" Screenshot 2024-07-15 at 16.00.30
  2. Insert 0x90c79A307836C31889Ced9050B34F9290fB860A2 in field and named WWATER Screenshot 2024-07-15 at 16.02.14
  3. Approve Screenshot 2024-07-15 at 16.02.21

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.

  1. Follow the link https://remix.ethereum.org/
  2. Click on the File Explorer
  3. Create workspace
  4. Choose blank
  5. Name workspace name "Smart Contract"
  6. Click OK
  7. Download
    This file and upload it to your space
  8. Click on the file (its important, to choose it)
  9. in the left side menu, select Run & Deploy Contract
  10. In Environment drop down menu selecet - Inject Provider MetaMask
  11. Enter the * Contract - 0x90c79A307836C31889Ced9050B34F9290fB860A2

  12. Click on button at address

  13. Click Ok 14 . Deploy successful, scroll down to the contract Screenshot 2024-07-12 at 17.20.37

How to connect Metamask

  1. Open the Metamask tab Screenshot 2024-07-14 at 18.33.40Screenshot 2024-07-12 at 17.39.17
  2. Enter your account password
  3. Go to the wallet to which the contract was written Screenshot 2024-07-12 at 17.39.31
  4. find your account in the drop-down menu Screenshot 2024-07-12 at 17.39.43

Initial unlock

To activate unlock and receive the initial WATER, you need to confirm the unlock.

  1. Before unlock you have 1 Water and 0 WWater ScreenShot_2024-07-16_11.14.47.PM@2x
  2. Click on the arrow to see the contract menu.
  3. Select the account from which you want to top up and select a query "unLock" in the side menu.
  4. Press the button "unLock" and approve transaction in Metamask
  5. Then you can check Water and WWater balance in Metamask ScreenShot_2024-07-16_11.17.18.PM@2x

Withdraw

To convert tokens to coins, you need to authorize under your account and use the request Withdraw

  1. Select the account from which you want to top up and select a query "Withdraw" in the side menu.
  2. Enter the amount(in wei 1 WATER is 10ˆ18) in the field "AMOUNT" Screenshot 2024-07-14 at 18.05.19
  3. Press the button transact

You can check your balance via MetaMask Screenshot 2024-07-15 at 15.28.48 or by requesting Screenshot 2024-07-15 at 14.23.41

Note that tokens cannot be withdrawn if:

  1. You have insufficient balance or lack coins to pay for gas.
  2. The withdrawTime for delegation has not yet begun (consider a delay of 5-10 minutes from the timer's end).
  3. The contract is currently in a paused state.