def __init__(self): self.msg = Msg(default.logfilename, default.logpath, default.msgmode) self.db = axdb.AXdb(default.dbuser, default.dbpass, default.dbname) self.steem = SimpleSteem() self.react = Reaction()
def __init__(self): self.db = axdb.AXdb(default.dbuser, default.dbpass, default.dbname) self.reaction = None self.returnmsg = None self.memoid = None self.action = None self.percentage = None self.ratio = None self.duration = None self.sendto = None
def vote_on_it(self, voter, author, post, weight): """ Use the tokens in the database to vote on a post. If the vote fails, renews the token and tries again. """ db = axdb.AXdb(default.dbuser, default.dbpass, default.dbname) if db.get_user_token(voter) is not False: accesstoken = db.dbresults[0][1] refreshtoken = db.dbresults[0][2] else: return False # If the vote fails then we renew the token if not self.sc_vote(voter, author, post, weight, accesstoken): print("Renewing token for " + voter) newtoken = self.renew_token(voter, refreshtoken) if newtoken is not False: return self.sc_vote(voter, author, post, weight, newtoken) else: self.msg.error_message("A NEW TOKEN COULD NOT BE CREATED") return False
def __init__(self): self.db = axdb.AXdb(default.dbuser, default.dbpass, default.dbname) self.verify = axverify.AXverify()
#!/usr/bin/python3 from steemax import axdb from steemax import axverify xdb = axdb.AXdb("steemax", "SteemAX_pass23", "steemax") xverify = axverify.AXverify() def run_exchanges(mode): xresults = xdb.get_axlist(mode) for row in xresults: idk = row[0] acct1 = row[1] acct2 = row[2] key1 = row[3] key2 = row[4] per = row[5] ratio = row[6] dur = row[7] memoid = row[8] status = row[9] time = row[10] if xverify.eligible_posts(acct1, acct2, mode): if xverify.eligible_votes(acct1, acct2, per, ratio, mode, 0): print("\nAuto exchange occured.\n")
def __init__(self): self.db = axdb.AXdb(default.dbuser, default.dbpass, default.dbname)
#!/usr/bin/python3 import re import sys from cmd import Cmd from steemax import axe from steemax import axdb from steemax import axverify from steemax import axtrans from steemax import default from screenlogger.screenlogger import Msg msg = Msg(default.logfilename, default.logpath, "") db = axdb.AXdb(default.dbuser, default.dbpass, default.dbname) xverify = axverify.AXverify() # Entry point def run(args=None): db.first_time_setup() prompt = MyPrompt() prompt.prompt = '[steemax]# ' prompt.cmdloop('\n ** Welcome to SteemAX ** \n') class Enter: def new_account(self, acct): '''Prompts user to create an account when an account is not found ''' answer = input(