1UP-Date : UA Integration + 1UP-votes

2년 전

Following this post from @flauwy, I've been tasked to start the creation of the new 1UP.
As a reminder, @utopian-1UP was an Utopian bot front-runner in which members of the community would decide which are the best posts to vote for. the @utopian-1up would then vote for the best post every 2.4 hours, followed by hundreds of curators in the trail.

What s new?


Integration of the @steem-ua API

Thanks to @holger80 's help and the [official documentation](https://steem-ua.com/api-documentation/), we ve integrated the User Authority to our project. When a user is starting a session and get his identity verified through SteemConnect , we fetch the user's UA score as follow:
function getUA(steem,config,username){
  const enc_user=steem.memo.encode(config.memoKey,config.memoUA,"#"+config.bot);
  const request = {
         url:"https://steem-ua.com:5000/rpc",
         method: 'POST',
         body:JSON.stringify({
           jsonrpc: '2.0',
           method: "get_accounts",
           id:0,
           params: {"user": config.bot, "encrypted_user": enc_user, "accounts": [username]}
       })
     };
  return rp(request);
}



The first step was to encode our account s name using both our own private memo key and @steem-ua's public key, for authentication, since the API is private.

Once the result fetched and associated with the account information in the session, we can use the UA to determine is the user has the right to cast 1UP-votes (see next section).

1UP-votes

1UP votes can be casted directly from the community post page, by clicking on the 1UP button.

It will send the vote to the cloud, and it will be processed before being saved to see if the user is allowed to cast this 1UP-vote.
It will perform the following tests :

  • Voter s UA is higher than the threshold (2 for now, TBC)
  • Voter still has votes (max 10 per day)
  • Voter vote for this author for the first time today
  • Voter is not voting for himself
  • This post hasn t been voted by the trail yet

If one of these tests fail, an error will be sent back to the user, otherwise, the number votes will be incremented.

Future work

  • Vote on the best post of the period

Live Demo

As a demonstration speaks more than lots of words, I ve put back online the old Utopian1UP website. You can try by yourself and create a community and link a trail to it for testing purposes.
No votes will be casted do not worry, but it's an offline token so, for safety reasons, I would recommend using a test account.

Live Demo

Repository

https://github.com/therealFlauwy/1UP

Pull Request

UA Integration + 1UP-votes

GitHub Account

https://github.com/stoodkev


Meet me at SteemFest 2018 in Kraków

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
STEEMKR.COM IS SPONSORED BY
ADVERTISEMENT
Sort Order:  trending

Thank you for your contribution. A great update to the 1-up after integrating it with Steem-UA. Not sure how this works "The first step was to encode our account s name using both our own private memo key and @steem-ua's public key, for authentication, since the API is private.", if the API is private are you getting any key from Steem-UA?


Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

·

They added our account name in their list of authorized accounts.

·

Thank you for your review, @codingdefined!

So far this week you've reviewed 3 contributions. Keep up the good work!

Yes, one step closer! Thanks for all the work. :)

Hi, @stoodkev!

You just got a 26.63% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.

Hi @stoodkev!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @stoodkev!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!