You are viewing a single comment's thread from:

RE: 2024-09-18 - HiFind - Are there Self Votes? Is there too much of cash out?

in HiveDevs2 months ago

Transfer Out

For calculating transfer out, execute following code.

const filter = [dhive.utils.operationOrders.transfer];
// replace account name with real account name.
// start can be -1 or something else if you are doing pagination
// limit can be set to 100 max
client.database.getAccountHistory('$accountName', $startId,$limit, dhive.utils.makeBitMaskFilter(filter));

Self Votes

  • For calculating self-votes, load most recent posts from author
  • Check upvotes of each post & see if user has voted or not
  • To get user's post, you can use following code
  • It loads last 100 posts of the user
// replace account name with real account name
client.hivemind.getAccountPosts({ account: '$accountName', sort: 'posts', start_author: null, start_permlink: null, limit: 100 });


via Inbox