HiveSQL new feature - Delegation state table available

Retrieving information about Hive Power delegations can be a bit tricky.

While the Hive API makes it easy to know to whom an account is delegating using condenser_api.get_vesting_delegations, the opposite is more difficult. As far as I know, there is no API call to know who has delegated to an account.

HiveSQL to the rescue - Episode 1

Fortunately, HiveSQL allows you to easily retrieve this information thanks to the TxDelegateVestingShares table which includes all creation, modification or removal of delegation operations carried out by users.

However, the main difficulty comes from the fact that you have to check the last delegate_vesting_share operation involving two accounts to get the state of the delegation between these accounts.

In addition, there is a very particular event that must also be taken into account: the hardfork 23 that happened when the Hive blockchain split from Steem.

Indeed, at this time, several accounts have not been airdropped with HIVE tokens, so their existing delegations were instantly removed.

However, there were no operations of type delegate_vesting_share relating to this. This was recorded in the blockchain with hardfork_hive virtual operations, stored in the VOHardforkHives table in HiveSQL

HiveSQL to the rescue - Episode 2

Due to all the technical reasons mentioned above, retrieving an accurate list of delegators or delegatees has become much more complex and resources consuming.

That's why I added a new non-consensus state table named Delegations to the HiveSQL database in order to allow its users to retrieve delegations data quickly and easily.

It contains the list of all active delegations with the following info:

ColumnDescription
delegatorThe account delegating Hive Power
delegatingThe account receiving Hive Power delegation
vestsThe amount of Vesting Shares delegated

Support

If you have any questions or remarks, support is provided on the HiveSQL Discord Channel.

Thank you.


Check out my apps and services


Vote for me as a witness

H2
H3
H4
3 columns
2 columns
1 column
6 Comments
Ecency