blockscout / frontend

Front-end application for Blockscout
https://blockscout.com
GNU General Public License v3.0
160 stars 439 forks source link

Celo: Epoch rewards tab on Address view #2261

Open NikitaSavik opened 3 weeks ago

tgladilina commented 2 weeks ago

@fedor-ivn

page in Figma

Image Image

Need copy for tooltips

fedor-ivn commented 2 weeks ago

Implement Epoch rewards tab on the Address view page.

Background

This tab deals with election rewards associated with the address of interest. When the user opens the Epoch rewards tab, it should display the paginated table containing info about:

  1. Epoch block, in which the address was rewarded.
  2. Address of an account, which is associated with the reward.
  3. Amount of the reward and the currency in which the reward is paid.

API

The data is obtained through /api/v2/addresses/{address_hash}/election-rewards endpoint which returns the paginated list of rewards.

Example: https://celo-alfajores.blockscout.com/api/v2/addresses/0xAe1ec841923811219b98ACeB1db297AADE2F46F3/election-rewards

UI customisations

Page in Figma.

Note that tags under Reward type should have different tooltips:

Reward type Tooltip
group Reward given to a validator group. The address being viewed is the group's address; the associated address is the validator's address on whose behalf the reward was paid.
validator Reward given to a validator. The address being viewed is the validator's address; the associated address is the validator group's address.
delegated-payment Reward portion delegated by a validator to another address. The address being viewed is the beneficiary receiving the reward; the associated address is the validator who set the delegation.
voter Reward given to a voter. The address being viewed is the voter's address; the associated address is the group address.