Steem Automation - Automate stuff on steem easily

in #utopian-io5 years ago (edited)

Repository

https://github.com/nirvanaitsolutions/steem-automation

New Projects

What is steem-automation ?

Steem Automation is a node.js based bot application to stream the steem blockchain for new blocks,
parse them for ttransactions and do custom operations when a transaction meets a predefine criteria.

How does it work ?

Steem automation uses steemjs for querying blocks, dsteem.js for broadcasting transactions and a centralised MongoDB
database to store the last processed block number,although it can be replaced by another database easily. Please note that
this script does not store the actual blocks anywhere, just processes them one by one,
but it can be modified to store blocks/transactions on the centralsied database too.

How to run the bot ?

Requirements
  • Node.js v8+
  • MOngoDB (local or mlab)
Setup
  • Clone the repo locally
git clone https://github.com/nirvanaitsolutions/steem-automation
  • Install dependencies
npm install
  • Configure the environment variables Add the bot account name and active key in utils.js and mongodb url in mongo_util.js

  • Run the app

npm start

Deployment

You can deploy this app to any server that has node.js installed but we recommend to run this app on heroku using this guide.

Examples

See the examples directory for examples

Use Cases

  • Automate Upvote
  • Automate Resteem
  • Automate Bets on steem/steem-engine based betting sites
  • Automate Dice Payouts on your dice app
  • Provide notifications feature in your app
  • Automate Delegation calculation and payouts

You can tell us more :D

Roadmap

  • Add environment variables via .env files
  • Add procfile for heroku deployment
  • Add predefined rules
  • Add a front end to set rules and environment variables
  • Add support for SCOT operations

How to contribute

  • Fork the Repo
  • Create a new branch named as issue number
  • Commit your code
  • Raise a Pull Request

Contact us

To know more about Swapsteem and our projects please connect with us on

GitHub Account

https://github.com/nirvanaitsolutions

Sort:  

Thank you for your contribution. The idea looks promising and interesting, although I haven't seen any examples in your repro or post.

  1. You probably want to add a handler (or callback) to getTransactions so that the logics of handling the automation and the getting blocks/transactions can be separated.
  2. inconsistent usage of let and var, and the line-ending semicolon.
  3. You may want to re-format the utils.js, and add some comments and blank lines between functions.
  4. private activekey, the steem node are better configured/stored off the source code e.g. env parameter
    5.console.log could be replaced by a Logger object which we can decide where to log e.g. output to files.
  5. commented-out code should be removed to keep your codebase clean.

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? Chat with us on Discord.

[utopian-moderator]

Thank you @justyy for the review! We are soon adding codacy to our projects for automated code reviews which will help us get a good score here. The post is written by a Developer not a professional content writer so quality might be low. We are in a process of hiring content writers now.

You can see the automated review of this project using the link below :
https://app.codacy.com/app/nirvanaitsolutions/steem-automation/issues/index?bid=11833394#

Posted using Partiko Android

Thank you for your review, @justyy! Keep up the good work!

This could turn out to be a real time saver. Looking forward to trying it out

Posted using Partiko Android

Thank you for your feedback. Examples coming soon!

Posted using Partiko Android

Neat work here man.

Thank you @klye. Cheers!

Posted using Partiko Android

Hi @swapsteem!

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

This looks pretty awesome; trying to figure out whether or not I want to use this. Could be like @steemauto in some cases. That's the current use case I see for it, considering I don't currently maintain any applications on the blockchain myself ... yet.

It will soon have a front end to set rules so that you don't have to run an instance of this bot yourself. Till then you can try to play around it and share some example use case, ofc if you are a Developer.

That would be great! So many people who don't even know how to 'run an instance' :D STEEM makes me motivated to become a programmer though :') Cheers and thanks!

Hehe, it's easy to run it, just follow the steps in this post or the readme file in the repo. Development is not that hard if your logic nerves function well :p

Posted using Partiko Android

Hehe, I've been learning some bits of programming already over the years, it's not that hard, I just need to set apart some time dedicated to learning this new skill - I'll run it tonight and see how it works! :D Thanks!

I am writing some examples right now. It will be easier once you can see some custom automation and then Google for custom log implementation until you are a pro at it.
I would also recommend www.freecodecamp.org to learn programing.

Posted using Partiko Android

I mean question now is whether you need apps of your own in order for this to work? It doesn't seem like you would.

Posted using Partiko Android

Steemauto does support some of these but there are lot of a things that can be automated.

Posted using Partiko Android

I see it more for repost, actually. I need to do more of that in my account for certain people, and I never got a chance to because I always miss them.

Posted using Partiko Android

I see. I will add an example in the examples directory soon and to show resteeming can be automated for a certain/group of accounts

Posted using Partiko Android

Awesome. I'll take a look.

Posted using Partiko Android

This post has been included in the latest edition of SoS Daily News - a digest of all the latest news on the Steem blockchain.

Hey, @swapsteem!

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!

Coin Marketplace

STEEM 0.26
TRX 0.11
JST 0.033
BTC 62796.11
ETH 3045.55
USDT 1.00
SBD 3.85