... | ... | @@ -6,23 +6,27 @@ witness_id | voter_id |
|
|
INT | INT
|
|
|
```
|
|
|
`*_id` will be taken from `hive.accounts_view`, data gathered from `account_witness_vote_operation`
|
|
|
### witness_voters
|
|
|
```
|
|
|
voter_id | vests | account | proxied
|
|
|
INT | BIGINT | BIGINT | BIGINT
|
|
|
```
|
|
|
|
|
|
### account_proxies
|
|
|
```
|
|
|
voter_id | proxy_id
|
|
|
INT | INT
|
|
|
```
|
|
|
`*_id` same as `witness_votes`
|
|
|
This will be used to calculate `vests`, `account`, `proxied` during sql query. <br>
|
|
|
`*_id` same as `witness_votes` <br>
|
|
|
Data will be gathered from `account_witness_proxy_operation`. When account is unproxied, `proxy = ""` in operation json.<br>
|
|
|
This will be used to calculate `vests`, `account`, `proxied` during sql query as part of [response](https://gitlab.syncad.com/hive/haf_block_explorer/-/wikis/New-API-Calls#response-10)
|
|
|
```
|
|
|
"voters": [
|
|
|
{
|
|
|
"name": TEXT,
|
|
|
"vests": INT, # hive power instead but stored in vests
|
|
|
"account": INT, # how much hive acc has powered up, from transfer to vesting completed op
|
|
|
"proxied": INT # if acc is proxied through voter, voter gets acc's hp
|
|
|
},
|
|
|
...
|
|
|
],
|
|
|
|
|
|
```
|
|
|
`vests = account + proxied` is necessary for ordering voters list in UI <br>
|
|
|
`account`is amount of powered up hive (HP) in vests 'currency' <br>
|
|
|
*NOTE:* this will be displayed in HP in UI. HP value must be calculated with current rate.
|
|
|
*QUESTION:* is it a good idea to do math with data on frontend?
|
|
|
`proxied` is amount of HP 'delegated' to voter by proxied account. When account is proxied, it's `account = 0` and for proxy account, `proxied += account (of proxy)`
|
|
|
Data will be gathered from `account_witness_proxy_operation`. When account is unproxied, `proxy = ""` in operation json. |
|
|
`proxied` is amount of HP 'delegated' to voter by proxied account. When account is proxied, it's `account = 0` and for proxy account, `proxied += account (of proxy)`. |
|
|
\ No newline at end of file |