@staticmethod<EOL><INDENT>def lastpayout(delegate_address, blacklist=None):<DEDENT>
if blacklist and len(blacklist) > <NUM_LIT:1>:<EOL><INDENT>command_blacklist = '<STR_LIT>' + str(tuple(blacklist))<EOL><DEDENT>elif blacklist and len(blacklist) == <NUM_LIT:1>:<EOL><INDENT>command_blacklist = '<STR_LIT>' + "<STR_LIT:'>" + blacklist[<NUM_LIT:0>] + "<STR_LIT:'>"<EOL><DEDENT>else:<EOL><INDENT>command_blacklist = "<STR_LIT>"<EOL><DEDENT>qry = DbCursor().execute_and_fetchall("""<STR_LIT>""".format(delegate_address, command_blacklist))<EOL>result = []<EOL>Payout = namedtuple(<EOL>'<STR_LIT>',<EOL>'<STR_LIT>')<EOL>for i in qry:<EOL><INDENT>payout = Payout(<EOL>address=i[<NUM_LIT:0>],<EOL>id=i[<NUM_LIT:1>],<EOL>timestamp=i[<NUM_LIT:2>]<EOL>)<EOL>result.append(payout)<EOL><DEDENT>return result<EOL>
Assumes that all send transactions from a delegate are payouts.
Use blacklist to remove rewardwallet and other transactions if the
address is not a voter. blacklist can contain both addresses and transactionIds