[Bot Wars]Third week report - SocialBoost

in #byteball6 years ago (edited)

Introduction
First of all i want say everyone - ‘Happy New Year’. And I would like to wish more interesting projects, ideas and health for their implementation to all. Last week i didn’t publish progress report because it was one of important weeks in my life - i finished my university. But this doesn’t matter, weekends it’s the best time to catch up progress. So let’s walk around SocialBoost Bot!

Problematics
Yes, i am newbie in coding. And let's be honest - Byteball have problems with the support of developers, but the recent release of the portal - developer.byteball.org, guides from core-developer @xjenek and also created telegram chat @devBB - redirect the vector of growth of developer community in the right direction and I really want everything to grow further. Bot-contest in turn - this is a good opportunity to consolidate the dev.bb material and also for people like me boost own coding skills. For my part, I want not just to face in the battle of Bot Wars, but show the same newcomers like me, what problems anyone can face as novice programmer in Byteball and generally. 

Why SocialBoost?
As I already pointed out in the first week report, this bot should help to earn the first bytes. In turn, this project hooked me with another advantage and a solution to another problem. Any project should have its target audience with the help of which it could exist and develop. Six months ago, byteball launched Steam Attestation Airdrop. As the statistics showed, there were more than 70 thousand certified users! With this information in my head I had only thoughts - ‘WOW!’ But, there is only a question - “How many of these people are interested in byteball not only as a free distribution?”. Therefore, projects of various kinds are needed and they will in turn appear with a good developer community. In result, i want to give a virtual promotion tool for SteemIt users - just a few messages to the bot, the minimum payment and post begins rise up in list. 

Progress report
Main progress:
database features, collection information for both side(workers, boosters), statistics for workers, payments with balance system, SteemAPI test, some interface features for usability and other small details.
At the start, when I built a plan for interaction with the bot, I thought that there is flexibility and you can easily build something like ‘interface’. And yes you can, but eventBus.on imposes some nuances of construction.
Since the bot helps to earn bytes and promote posts, we will have two types of accounts - earn_bytes and boost_post. In order for the bot to track at what stage the user and correctly read the messages in one or another role (as worker or as booster), we divide into separate steps - step_worker and step_booster.

Earn Bytes
In order for the user to start receiving bytes, we need to collect data about his steem account — SteemIt login, SteemPrivatePostKey, Byteball Wallet Address and also save the user's device_address — this will be the main identifier. When you click the Earn Bytes button, we write to the account type - earn_bytes. All data is written to the database, in a specially created users table using sqlite. After registration, the last step will display to us each time account statistics:
- How many was UpVotes done?
- How many was reposts done?
- How much money is earned - balance?
- Button to withdraw balance to the specified Byteball Wallet Address.

Boost Post
In order to promote posts, we need to ask the customer:
- Steemit login of post author
- PermLink of post (example: introducing-the-great-byteball-bot-war)
https://steemit.com/byteball/@byteball.org/introducing-the-great-byteball-bot-war
On this step I used ".split('/')[5]" , to get from customers just link on post and then get from it last part.
- How many upvotes customer need?
- How many reposts customer need?
Next, calculate by the formula ‘UpVotePrice * upvote_target + RepostPrice * repost_target’ and send invoice. After receiving payment, change the status of the order to paid and start the promotion process. I write all the data into the database, into a specially created table boost_tasks using sqlite.

Outcome
As a result, we have a base of steemit accounts that will promote posts and base of orders that needs to be promoted. It remains only to connect it all in one function using Steem API, that i alredy tested on this week and it works, for Upvote and Repost. Make withdraw balance function for workers. And MVP will be ready.

 

Sort:  

earn bitcoin from small addition on google during browse its true its from google
https://get.cryptobrowser.site/4787429

Congratulations @opposition! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You received more than 10 upvotes. Your next target is to reach 50 upvotes.

Click here to view your Board
If you no longer want to receive notifications, reply to this comment with the word STOP

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @opposition! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You made more than 10 upvotes. Your next target is to reach 50 upvotes.

Click here to view your Board
If you no longer want to receive notifications, reply to this comment with the word STOP

Support SteemitBoard's project! Vote for its witness and get one more award!

Coin Marketplace

STEEM 0.16
TRX 0.15
JST 0.029
BTC 56769.47
ETH 2402.64
USDT 1.00
SBD 2.30