gator.rb - STEEM Power Delegation script for STEEM

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@inertia·
0.000 HBD
gator.rb - STEEM Power Delegation script for STEEM
#### Overview

Gator allows you to delegate STEEM Power from one account to another.  This script is especially useful for dealing with multiple delegator accounts, like mined accounts.

---

#### Install

To use this [Radiator](https://steemit.com/steem/@inertia/radiator-steem-ruby-api-client) script:

##### Linux

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

##### macOS

```bash
$ 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:

```bash
$ git clone https://gist.github.com/3107372d2a52fed7c8f1a2e943cf6300.git gator
$ cd gator
$ bundle install
```

Edit the file `delegators.txt` and add all of the accounts you want to delegate from.  You must use the active-wif.

---

#### Upgrade

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

```bash
$ 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 delegation:

```bash
$ ruby gator.rb vesting_shares:42437.7 delegatee:inertia broadcast:true
```

Gator will now delegate `42437.700000 VESTS` to `inertia` (for example).

To delegate a dynamic amount based on the current vesting balance of each delegator:

```bash
$ ruby gator.rb vesting_shares:auto delegatee:inertia broadcast:true
```

Gator will now delegate `100% of vesting - 1 STEEM` to `inertia`.  It is advisable to leave *some* VESTS on the account, otherwise it won't have enough bandwidth to do anything.

To reset delegation:

```bash
$ ruby gator.rb vesting_shares:0 delegatee:inertia broadcast:true
```
  
Gator will now remove all delegation for each delegator from `inertia`.  Keep in mind, when resetting delegation, any amount that was previously delegated will be in limbo and take 7 days to return to the original delegator.

---

Check here to see an updated version of this script:

https://gist.github.com/inertia186/3107372d2a52fed7c8f1a2e943cf6300

---
#### Troubleshooting

##### Problem: What does this error mean?

```
gator.yml:1: syntax error, unexpected ':', expecting end-of-input
```

##### Solution: You ran `ruby gator.yml` but you should run `ruby gator.rb`.

---

<center>
  ![](http://i.imgur.com/FBoXX3w.png)
</center>

See my previous Ruby How To posts in: [#radiator](https://steemit.com/created/radiator) [#ruby](https://steemit.com/created/ruby)

## Get in touch!

If you're using Gator, I'd love to hear from you.  Drop me a line and tell me what you think!  I'm @inertia on STEEM and [SteemSpeak](http://discord.steemspeak.com).
  
## License

I don't believe in intellectual "property".  If you do, consider Gator as licensed under a Creative Commons [![CC0](http://i.creativecommons.org/p/zero/1.0/80x15.png)](http://creativecommons.org/publicdomain/zero/1.0/) License.
👍 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,