This post was written by Neil on Jan 19, 2023
We’re going to use the Flare Explorer to wrap our tokens, check our balance, and delegate to a Data Provider.
First, you’re going to need to have your tokens wrapped. If you already have wrapped tokens, you can go straight to the delegating step.
In the top right hand corner, enter WNat and select the contract 0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d.
From the menu bar, in the middle of the screen, select the last tab “Write Contract”.
You’ll be writing to the blockchain, so please make sure your wallet is connected by clicking the “Connect Wallet” button.
Scroll down to method 8. deposit -> and enter the amount of FLR you wish to wrap. Please be sure to leave a few FLR unwrapped for gas for this operation and subsequent delegate, claim and unwrap operations.
When you’ve enterered the desired amount, hit the “Write” button and you’ll be prompted to sign the transaction.
While in the same WNat contract, select the “Read Contract” option, which appears to the left of the previously selected “Write Contract” link.
This time, you’re going to want to use method 2. balanceOf.
Enter your wallet address and select Query. This isn’t performing a transaction so you won’t need to sign it. The result will be displayed directly below and will look something like this:
[ balanceOf method Response ]
(uint256) : 1 000 000 000 000 000 000
Note: One WFLR is written with 18 zeroes, e.g. 1 000 000 000 000 000 000.
Still using the WNat contract, select the “Write Contract” link.
Please make sure your wallet is connected, if it is it will say “Connected” above the Method 1 dialog, if it isn’t, please hit the “Connect Wallet” button now.
Scroll down to method 6. delegate -> and enter the Signal Providers address and the amount in “bips” you wish to delegate.
Example, 0x4990320858AE3528B645C60059281a66C3488888 (FTSO AU) and 10000 (100%)
Confirm the transaction and you’re all set.
Highly recommeded if this is your first time using the Flare Explorer to delegate.
Once again, in the WNat contract, select the “Read Contract” option.
Scroll down to 9. delegatesOf and enter your wallet address.
If you delegated 100% to FTSO AU you will see the following:
[ delegatesOf method Response ]
_delegateAddresses (address) : [0x4990320858AE3528B645C60059281a66C3488888]
_bips (uint256) : [(10000)]
_count (uint256) : 1
_delegationMode (uint256) : 1
This time we’ll use the FtsoManager contract. Start typing name and select FtsoManager or copy and paste 0x2F5107461D1BF7D4D6d3b2b577621b2071343166 into the box in the top right hand corner of the Flare Explorer.
From the Read tab in the centre of the screen, scroll down to 13. getCurrentRewardEpoch. The number after (uint256): denotes the current reward epoch.
If you want to know what vote power you had locked for any given epoch you can do so in the same FtsoManager contract, by scrolling down to 23. getRewardEpochVotePowerBlock and enter the epoch number you wish to know.
You’ll see results similar to this returned.
[ getRewardEpochVotePowerBlock method Response ]
_votepowerBlock (uint256) : 4338020
Copy the votepowerBlock, in this instance 4338020.
Now, back to the Wnat contract, and the Read tab, scroll down to 3. balanceOfAt and enter your wallet address in the first box and the block numnber in the second. Hit query and this will confirm the vote power you have locked for each epoch.
In the FtsoRewardManager contract, again … either type that in the top right hand corner of the Flare Explorer or enter the contract address 0x9EDCa806834e89cC928EF4951cE0506Be8416309 and from the Read tab, scroll down to 22. getStateOfRewards and enter your wallet address in the first box and the current epoch in the second, then hit query.
You’ll be presented with results like this.
[ getStateOfRewards method Response ]
_dataProviders (address) : [0x4990320858ae3528b645c60059281a66c3488888]
_rewardAmounts (uint256) : [( 37592989514740849851)]
_claimed (bool) : [( false)]
_claimable (bool) : false
The dataProviders address shows who you’re delegated with and the rewardAmounts shows the FLR accruing. You’ll need to move the decimal place 18 to the left so 37592989514740849851 becomes 37.592989514740849851
That’s it, you’ve now successfully wrapped, checked your balance and delegated using the Flare Explorer. Also, you’ve confirmed the reward epoch we’re in, the vote power you had locked for any given epoch and been able to see rewards accruing for the current epoch.