Estimate curation reward for upvote in Steemsnippets
Components
- Add a new folder under steemsnippets/steemjs/ called
estimate_curation_reward
- In the new folder create a script
estimateCurationReward.js
and a correspondingpackage.json
Proposal
Consistent with the rest of the library the function should do only the following in a way that is easy to follow and or reuse...
- Take as parameters:
a post or comment url
an account name
a callback, where the return parameter is an object of the shape:
{ sbd: some_float, steem_power: some_other_float}
optional: a float estimating the expected payout for the post, if omitted calculations assume $1 or the current estimate on steemit per net upvotes .
- Take as parameters:
Fully document the function using jsdoc style
Mockups / Examples
estimateCurationReward(
'jjay',
'https://steemit.com/utopian-io/@tdre/serve-sketchy-placeholder-images-with-peek-a-boose',
function(estimate) {
console.log(
'Estimate (SBD/SP): ' + estimate.sbd + '/' + estimate.steem_power
);
}
);
Benefits
- This addition to steemsnippets would further development of tools which help users make informed decisions about how they use their influence on the Steem blockchain. For example, something like the following would become much easier for developers front-end and backend developers alike...
- It would also serve as a Rosetta stone for a fairly complicated calculation. Arithmetic clearly expressed through code becomes easier to discuss, compare, and test against.
Posted on Utopian.io - Rewarding Open Source Contributors
Good idea! I'll hack this together this week if I have some free time :)
Awesome! I'm pleased you like the suggestion :)
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Hey @tdre I am @utopian-io. I have just upvoted you!
Achievements
Suggestions
Get Noticed!
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Congratulations! This post has been upvoted from the communal account, @minnowsupport, by tdre from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews, and netuoso. The goal is to help Steemit grow by supporting Minnows. Please find us at the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.
If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP.
Be sure to leave at least 50SP undelegated on your account.