Stake your NFTs


Stake your NFTs to earn WATT token

How to stake like a pro, using the contracts!

All interactions here use Polygon’s explorer, polygonscan.com

Make sure your wallet is connected to Polygon mainnet.  You can go to the Free Mint page to add the network, or look at the bottom of the explorer pages for this button:

Note: You need MetaMask or any wallet compatible with Polygon and WalletConnect. You also need some (<0.01) MATIC for transaction fees. Look at “How do I send funds to Polygon” in our F.A.Q.

To interact direct with both NFT and staking contracts require you to connect (Connect to Web3) your wallet upon performing the steps in this guide.
Click Connect to Web3:

You have to do this step in both NFT and staking contracts.

Be aware gas fees can fluctuate when network load is high.
Setting to aggressive in MetaMask works fairly well in most cases.

IOS:
1. Can connect only through chrome , not from safari
2. to connect web3 , need to connect MM through wallet connect not by direct MM connect.
3. After tapping write , need to open MM and give confirmation , the page will not lead directly to MM wallet. 

If you haven’t done it already, mint the free NFT from the NFT contract, field4.freemint. Put 1 in both fields. 

Click Write and confirm in wallet.

Note: The contract only allow you to mint if you don’t have the free PC NFT. If this step fails you likely have it already.

In order to stake your NFTs the staking contract must have permission to control them.

Set approval in the NFT contract, field 10.setApprovalForAll

Put this in the fields:

 Operator: 0xcbfcA68D10B2ec60a0FB2Bc58F7F0Bfd32CD5275
approved:  true

Click Write and confirm in wallet.

 

You can check if the stake contract is approved for your NFTs by going to read section of NFT contract, field 6.isApprovedForAll. Put your address in first and stake contract in second field.

Click Query and you’ll see the bool is either true or false.

In order to stake a NFT, go to staking contract, field 10.stake.

To stake the free PC NFT put 1 in both fields.

To stake other NFTs, put ID in first field, amount in second field.

field 10.stake

Click Write and confirm in wallet.

If you have multiple NFTs to stake you can use field 11.stakeBatch.

Put the comma separated Id’s in first field, and amounts in second field. 

Click Write and confirm in wallet.

Tip: The easiest way to know how many of each NFT you have is to search “mining game” in your Opensea profile. The NFT ID is the last number in each NFT url, hover them and you see it.

In the staking contract, go to Read Contract:

Insert your Polygon address in the field 3. getActivityLogs and hit Query.
You should now see something like this:

What you see here is as follows:
  DepositID (above your address)
  Deposit Owner (your address)
  TokenID
  Amount
  Is Withdrawn (false if staking)
  Deposit Time (Unix Timestamp)
  Time Locked in seconds
  Rewards Earned (in WEI)
  Rewards Withdrawn (in WEI)

If you have several deposits this list is repeated. 

To see your pending WATT rewards, put the DepositID from above into 6.getRewardsAmount and hit Query.
Rewards are shown in WEI, so you must remove 18 zeroes to see the reward in WATT.  he number is linked to a converter, click it and you’ll see WATT amount on the MATIC line. 
Example: 
47422222222222191872 WEI --> 47.422222222222191872 WATT

 

Also check How much do my NFT earn in staking?

To unstake a single deposit Id you go to field 14.unstake in staking contract.

field 14.unstake

Put depositId which you find in step 5. Check your stakes.

Click Write and confirm in wallet.

If you have several deposit Id’s staked you can also unstake all at once, using field 15.unstakeAll.

Click Write and confirm in wallet.

NOTE: You cannot unstake during the Time Locked period.

To withdraw rewards you go to point 17.withdrawRewards in staking contract.

Put depositId which you find in step 5. Check your stakes.

Click Write and confirm in wallet.

You should now see a WATT token transaction in explorer.

You can add WATT to MetaMask here: mining.game/watt

PS: The contract show rewards in WEI, which is the smallest unit. WATT have 18 decimals. Click the rewards number and it will take you to a converter. The line showing MATIC is your reward in WATT. 

Note: The function 16.withDrawAllRewards may work, but our experience is most of the times it use too much blockspace, and return a message in your wallet “We were not able to estimate gas. There might be an error in the contract and this transaction may fail.”

This error relates to the state of Polygon network being busy. In this case the solution is to use 17.withdrawRewards.

To revoke the staking contract’s access to your NFTs go to the NFT contract, field 10.setApprovalForAll

Put this in the fields:

 Operator: 0xcbfcA68D10B2ec60a0FB2Bc58F7F0Bfd32CD5275
approved:  false

Click Write and confirm in wallet.

Most reported problems are solved by one or more of these:

  1. Check that you really did previous step
  2. Refresh and reconnect contract page
  3. Adjust gas fees in Metamask. Look for a small Edit option, set gas to aggressive or adjust it to be around 0.005 matic.
  4. You already staked the NFT

If you get a really high gas and a warning in Metamask saying the tx will likely fail, it is usually caused by a forgotten step. This do not apply to using withDrawAllRewards or unstakeAll functions, which are known to fail due to memory limits on the blockchain.