stinkypete.rb - Reward Claim script for STEEMsteemCreated with Sketch.

in #radiator3 years ago

Overview

Stinky Pete allows you to claim rewards based on rules. You can manually run this script periodically or create a cron job.


Install

To use this Radiator script:

Linux
$ sudo apt-get install ruby-full git openssl libssl1.0.0 libssl-dev
$ gem install bundler
macOS
$ gem install bundler

I've tested it on various versions of ruby. The oldest one I got it to work was:

ruby 2.0.0p645 (2015-04-13 revision 50299) [x86_64-darwin14.4.0]

First, clone this gist and install the dependencies:

$ git clone https://gist.github.com/db94986d168f7b35034b0d7ccba6f2b4.git stinkypete
$ cd stinkypete
$ bundle install

Edit the file stinkypete.yml and provide the account you want to claim rewards for. You must use the posting-wif.


Upgrade

Typically, you can upgrade to the latest version by this command, from the original directory you cloned into:

$ git pull

Usually, this works fine as long as you haven't modified anything. If you get an error, try this:

$ git stash --all
$ git pull --rebase
$ git stash pop

If you're still having problems, I suggest starting a new clone.


Usage

To do the actual claim:

$ ruby stinkypete.rb

Stinky Pete will now check if the rules have been met and conditionally claim them.


Check here to see an updated version of this script:

https://gist.github.com/inertia186/db94986d168f7b35034b0d7ccba6f2b4


Troubleshooting

Problem: What does this error mean?
stinkypete.yml:1: syntax error, unexpected ':', expecting end-of-input
Solution: You ran ruby stinkypete.yml but you should run ruby stinkypete.rb.
Problem: Everything looks ok, but every time Stinky Pete tries to claim, I get this error:
`from_base58': Invalid version (RuntimeError)
Solution: You're trying to claim with an invalid key.

Make sure the .yml file account item has the correct name and posting_wif key.

Problem: The node I'm using is down.

Is there a list of nodes?

Solution: Yes, special thanks to @ripplerm.

https://ripplerm.github.io/steem-servers/




See my previous Ruby How To posts in: #radiator #ruby

Get in touch!

If you're using Stinky Pete, I'd love to hear from you. Drop me a line and tell me what you think! I'm @inertia on STEEM and SteemSpeak.

License

I don't believe in intellectual "property". If you do, consider Stinky Pete as licensed under a Creative Commons CC0 License.

Sort:  

Nice little feature for a tedious task.

This post has been ranked within the top 80 most undervalued posts in the second half of Apr 29. We estimate that this post is undervalued by $2.27 as compared to a scenario in which every voter had an equal say.

See the full rankings and details in The Daily Tribune: Apr 29 - Part II. You can also read about some of our methodology, data analysis and technical details in our initial post.

If you are the author and would prefer not to receive these comments, simply reply "Stop" to this comment.