therealFlauwy / 1UP

Community Voting Platform For Steem
GNU General Public License v3.0
6 stars 11 forks source link

Add UP token support #51

Closed syvb closed 6 years ago

syvb commented 6 years ago

This adds the UP wallet. UP tokens are created by @steem-1up sending custom_json operations with an id of 1up. Moderators can make posts containing !1upsend 123.456, and @steem-1up will automatically detect and broadcast the token creation, as soon as an admin upvotes the moderator's comment (with any weight) or approves it from an admin UI on the website. Note that the admin UI may miss a post if the state cache is cleared, or if the server isn't running when the post is made. However, voting the moderator's post should always work.

On the admin page, it requires the posting key of @steem-1up, to broadcast the custom_json op.

Additionally, I added a script to pay out to delegators, based on postpromoter's script, as delegators.js. Run it for details of how to use it. Note that delegation payouts are rounded to have 5 decimal places. This shouldn't make much of a difference to payouts. It will send 200000 UP total tokens to delegators, based on how much they have delegated. (if you've delegated 50SP out of 100SP total, you will get 100k UP tokens).

Screenshots

Admin page

Admin page

User wallet page

Wallet page

Top UP holders (lists all of them)

Top holders