Reddit tip bot development #1

in gridcoin •  6 years ago 

As I see, there is no news about old reddit gridcoin tip bot for now (link). Creator of the bot doesn't answer, so I decided to do own tipping bot.

That is planning stage of bot development. This bot also could be used in other chats (like telegram) too with minimal changes.

Reddit-related functions

  • Authentication
  • Receive PM from user and do some actions
  • Send PM to user after
  • Receive mentions in posts and do some actions
  • Reply to mentions in posts after

Gridcoin-related functions

All transactions are on-chain.

  • Do outcoming transactions, update user balance
  • Check for incoming transactions, update user balance

Commands

Public commands:

  • tip {amount} - tip amount to username. Only public command and public-only command.

PM commands are:

  • balance - show your balance
  • withdraw {address} [amount] - withdraw specific amount to address
  • address - show your receiving address
  • help - show all commands (also triggered by any unknown command)

Database structure

As usually I'll use MySQL.

  • users - uid, username, address, balance, timestamp
  • inbox - uid, message, timestamp
  • tips - uid, post_comment_id, from_user_uid, to_user_uid, amount, timestamp
  • deposits - uid, user_uid, amount, tx_id, wallet_uid, confirmations, status, timestamp
  • withdrawals - uid, user_uid, amount, tx_id, wallet_uid, timestamp
  • variables - uid, name, value, timestamp - for various variables

How it should work

  • Gridcoin address and balance linked to username. New users created on tip or first pm
  • Users can tip each other
  • Users can deposit or withdraw coins
  • Experimental feature: Even if user have no funds, he still can tip some amount once a day (like a faucet, but reward sent to other person)

Gridcoin is an open source cryptocurrency (Ticker: GRC) which securely rewards volunteer computing performed upon the BOINC platform in a decentralized manner on top of proof of stake.

BOINC (Berkeley Open Infrastructure for Network Computing) is a distributed Internet platform launched beginning of 2002 and rewards participants with credits for performed work. BOINC is an application available for multiple Operating Systems and utilises the unused CPU and GPU cycles on computers to perform scientific work.

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!
Sort Order:  

Would you be interested in picking up a tipbot for slack as well? It's largely done but needs someone to run it and maintain it. I have what I've done so far on GitHub here.Ping me on slack if you are.