Want to be a Pay-4-Vote Service Like or
Feel like you are up to the task of being yet another paid voting service?!
Got A Friggin' WICKED Chunk of Code For You!
Introducing Votezy, a brand new, barely working, nearly untested NodeJS script that allows you to run any account you own as one of those fancy paid for vote services. After a number of users decided to start sending me 1.000 SBD and a link to get an upvote and my subsequent frutration that followed this script was born, mostly to stop me from freaking out when people were hounding me to upvote their stuff really.. Figured I may as well share it!
Votezy STEEM Bot - How Does it Work?!
Poorly, but jokes aside at my somewhat archaic coding on this script... The code featured below allows you to turn your account into a voting bot that casts random votes whenever a user tips your account over a pre-determined amount.. Then comments on the voted on post showing what percentage the upvote given was. While this script is somewhat functioning the truth is this is a basically untested early alpha version and should not be run by anyone not willing to have their account potentially go crazy due to unforseen bugs in the code (which there almost certainly is) so please deploy this script at YOUR OWN RISK.
Want a RANDOM Upvote From @KLYE?
For those brave or insane enough to gamble their hard earned SBD or STEEM I invite you (at your own risk with no liability or refunds) to send 1.000 or more SBD or STEEM to this @KLYE account with the memo containing only the Steemit.com link you wish to get upvoted.
Within a few minutes assuming the script isn't crashed or being bugged (which is a possibility) you'll receive a RANDOM 0.01% - 100% vote worth up to ~$8.000 SBD on the post provided in memo. Don't like the amount you got voted? Send again and try your luck!
~~WARNING:~~
@KLYE holds no responsibility for voting insanity caused by this script!Also no refunds or any support is offered for this service.. USE AT OWN RISK!
Installation and Configuration
Being a NodeJS script the first thing you're gonna need is NodeJS running on some system you have access to. Not sure what the minimum system requirements are yet..
The official NodeJS site can be found here: https://nodejs.org/en/download/current/
Install that to your system, hopefully grabbing the correct version for your operating system.. After that you'll need to grab the script below and save it to a file called "votezy001.js" or whatever you wish really.
////////////////////////////////////////////////////////////////////////////////
//----- VOTEZY STEEMIT.COM Bot v0.0.1 - An Open NodeJS Source "Pay-4-Vote" Script
//----- A functional yet probably not wise to run paid voting script in nodeJS
//----- Written, Tested (barely), Butchered and Released by: @KLYE steemit.com/@klye
//----- Like this Script and want More?! Please vote my witness efforts!
////////////////////////////////////////////////////////////////////////////////
// Add your Account Info Here!
var votebot = "klye"; // Account to Run Bot on
var wif = ""; // Posting Private Key Here
// NO NEED TO MODIFY THESE
var steem = require('steem');
var metadata = {
"app": "votezy/0.0.1"
};
var opscan = 0;
var errorconn = 0;
// ----- SLEEP Function to unfuck some nodeJS things - NO modify
function sleep(milliseconds) {
var start = new Date().getTime();
for (var i = 0; i < 1e7; i++) {
if ((new Date().getTime() - start) > milliseconds) {
break;
}
}
};
// Lets Start this script!
console.log("Starting Votezy v0.0.1 on @" + votebot + " - Script By @KLYE");
// Fix to send to new API server
steem.api.setOptions({ url: 'https://api.steemit.com'});
steem.config.set('websocket', 'wss://steemd.steemitdev.com');
//steem.api.setOptions({ url: 'https://steemd.privex.io' });
// Start the script scanning
trannyscanner();
// The Transaction Streamer function
function trannyscanner() {
// Stream irreversible Operations
steem.api.streamOperations('irreversible', function(err2, safeblockops) {
// If operations call to RPC f*cks up
if (err2) {
errorconn++;
if (errorconn % 3 === 0) {
console.log("ERROR - RPC Connection Lost/Timeout");
console.log("Attempting to Reconnect to Official Steemit.com RPC now..!");
steem.api.setOptions({
url: 'https://api.steemit.com'
});
steem.config.set('websocket', 'wss://steemd.steemitdev.com');
trannyscanner();
sleep(2000);
return;
} else {
console.log("ERROR - RPC Connection Lost/Timeout");
console.log("Attempting to Reconnect to rpc.buildteam.io RPC now..!");
steem.api.setOptions({
url: 'https://rpc.buildteam.io'
});
steem.config.set('websocket', 'wss://gtg.steem.house:8090');
trannyscanner();
sleep(2000);
return;
};
};
// If we get operations from server
if (safeblockops) {
// get 1st item in blockops an apply to operationType variable to check type later
var opType = safeblockops[0];
// get 2nd item in blockops and store it later to be parsed if it's our specified type of operation
var op = safeblockops[1];
//check if current operation is a comment
if (opType == "transfer") {
opscan++;
console.log("Transfer Scanned: " + opscan);
process_transfer(op);
}
};
}); // END streamOperations irreversible!!!
}; // End trannyscanner
// Transfer operation found? Lets see if it is for us!
var process_transfer = function(op) {
if (op["to"] == votebot) {
var depositer = op["from"];
var reciever = op["to"];
var firstdepo = op["amount"];
var currency = op["amount"];
var depositmemo = op["memo"];
var chaching = parseFloat(currency);
var type = currency.substring(currency.lastIndexOf(" ") + 1);
// Unused "if no memo" logic
if (depositmemo == undefined) {
//console.log(time + " - " + chaching + " " + type + " Transfer from @" + depositer + " to @" + reciever);
} else {
// Look for Steemit.com Link
if (depositmemo.toLowerCase().indexOf("https://steemit.com") >= 0) {
if (chaching >= 0.001) {
console.log(chaching + " " + type + " transfer from @" + depositer + " to @" + reciever + " Detected with Memo Containing Link:");
console.log(depositmemo);
var parentAuthor = depositmemo.match(/\/@(\w*)\//)[1];
console.log("Parent Author: " + parentAuthor);
var permlink = depositmemo.substring(depositmemo.lastIndexOf("/") + 1);
console.log("Permalink: " + permlink);
var weight = Math.floor(Math.random() * 10000);
var weightpercent = parseFloat(weight / 100).toFixed(2);
// Prepare vote response
var balancetable = [
"| @"
+ parentAuthor + " Got a " + weightpercent + "% Vote via @" + votebot + " |",
"|:----:|",
"| Send any amount of STEEM or SBD Over 1.000 & Recieve a RANDOM @KLYE VOTE
Make sure to include the link to your post in the memo field of the transfer!
( Any amounts < 1.000 STEEM or SBD will be considered donations ) |",
"| Vote power is Generated via RNG (Random Number Generator) |"
].join("\n");
var title = "@KLYE Pay-4-Vote Report:";
//reply comment
steem.broadcast.vote(
wif,
votebot,
parentAuthor,
permlink,
weight,
function(err, result) {
// if it f**ks up...
if (err) {
console.log("Pay-4-Vote FAILED");
console.log(err);
return;
};
// If it wins
if (result) {
console.log("Pay-4-Vote Success! Upvote of " + weightpercent + "%!");
replycomment(wif, parentAuthor, permlink, votebot, permlink, title, balancetable, metadata);
};
});
}
};
}
};
};
// Send a voted comment
var replycomment = function(wif, parentAuthor, permlink, votebot, permlink, title, content, metadata) {
//broadcast comment
steem.broadcast.comment(wif, parentAuthor, permlink, votebot, permlink, title, content, metadata, function(commentfailz, commentwinz) {
if (commentfailz) {
console.log("Error");
// Load first op without removing
steem.broadcast.comment(wif, parentAuthor, permlink, votebot, permlink, title, content, metadata, function(errqc, winqc) {
if (errqc) {
console.log("ERROR Sending Comment!");
}
if (winqc) {
console.log(parentAuthor + "'s Response Sent");
}
});
}; //END if (commentfailz)
if (commentwinz) {
console.log(parentAuthor + "'s Response Sent");
}
});
}; //END replycomment
After you've got the script above copied down to a file of your choice it's now time to install the SteemJS dependency using the following command in the same folder you've saved the votezy001.js file (or whatever you named it)...
After that it's just a matter of running it in your console after filling in your account name and provate posting key in the top lines of the script to allow it to vote from your account as transfers of 1.000 STEEM/SBD or over are detected!
Of course after filling in the top few lines with the info required you run it with:
node votezy001.js
And almost like magic if you didn't bork something it should run!
Sometimes the RPC nodes time out or drop you... Have no fear!
The script will try to connect to another RPC node and continue.
CONGRATS, You're Now A "Pay-4-Vote" Service
Official Votezy Github Link:
https://github.com/klye-steem/votezy
!!! Disclaimer !!!
This script is about as alpha and untested as they come, expect bugs.. Like a colony or swarm of them. This code was shared more for reference or a learning tool than a production ready service. As stated early I offer no support, warranty, refunds or responsibility for whatever happens if you choose to use this insanity! Good luck on your votes!
USE THIS SCRIPT AND KLYE UPVOTING SERVICE AT YOUR OWN RISK!
Posted on Utopian.io - Rewarding Open Source Contributors