Please share community Curation trail name so that I can follow & support

Please share curation trail names

image
source

In my last post, I explained about, How I am rewarding - authors, curators, community moderators.

With this post, I want to get all the curation accounts from the community members. Once I get those, I'll update my curation trail to follow those accounts. I'll also ask other members to follow those trails.

These are the accounts which I'm already following on hive.vote.

CC section


Community mods & non programmers can skip following section if they want to.


How do I distribute rewards?

  • In last post, @manclar asked me to share code for distributing rewards.

Screenshot 2023-09-15 at 10.55.12 AM.png

What technology I use?

I use nodejs with pm2.

Step 1. Get notification & filter by mention.

  • First I read all the notifications
  • From notifications, I apply the mention filter
  • I filter the mention notifications by approvedAuthors.
  • E.g. of approved authors - @flaxz, @bhattg etc.
  • client is a dhive client.
  • account is a constant sagarkothari88 value.
async function getNotifications(client, account, approvedAuthors) {
  try {
    let data = [];
    while (data.length < 200) {
      let queryObject = {
        account: account,
        limit: 100,
      };
      if (data.length > 0) {
        queryObject["last_id"] = data[data.length - 1].id;
      }
      const tempData = await client.call("bridge", "account_notifications", queryObject);
      data = [...data, ...tempData];
    }
    return data.filter((notification) => {
      return (
        notification.type === "mention" &&
        approvedAuthors.some((author) => notification.msg.includes(author))
      );
    });
  } catch (e) {
    return false;
  }
}

Step 2. Transfer Hive Power

  • @client is a dhive client
  • @key is active-key
  • @receiver is the account-name who is going to get hive-power
  • @hp states the value, in most cases, it will be 0.05 or 0.1
  • @subject is the subject for the hive-power-transfer
  • @submitter is the name of the curator or a community moderator.
  • @account is the name of the account who is going to transfer hive-power.
async function hpTransfer(
  client,
  key,
  receiver,
  hp,
  subject,
  submitter,
  account
) {
  const op = [
    [
      "transfer_to_vesting",
      {
        from: account,
        to: receiver,
        amount: `${hp} HIVE`,
      },
    ],
  ];
  try {
    const result = await client.broadcast.sendOperations(op, key);
    return `## 💐 🎁 Gift 🎁 💐
- 🎁 I have [Sent ${hp} Hive Power](https://hiveblocks.com/tx/${result.id}) 
- 🤝 It is sent to you (@${receiver}) 
- 👉 @${submitter} suggested me to gift you for your post / comment ${subject}
`;
  } catch (e) {
    console.error(e);
    throw e;
  }
}

image
source

Support me

  • Do you like the work I do?
  • Do you want me to keep going?
  • Please Reblog
  • Please help me connect with more communities
  • Please vote me as Hive Witness
Please 🙏Support Me
Vote me as Hive WitnessDonate Hive Or HBD
H2
H3
H4
Upload from PC
Video gallery
3 columns
2 columns
1 column
41 Comments