Created
October 25, 2016 13:16
-
-
Save cyborgshead/b24944c96948be7c468370bb6662b30f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from time import time | |
from piston.steem import ( | |
Steem, | |
BroadcastingError | |
) | |
config = json.load(open('config.json')) | |
creator = config["registory"] | |
wif = config["wif"] | |
steem = Steem(node='ws://127.0.0.1:8090', nobroadcast=False, wif=wif) | |
transfer_list = json.load(open('./transfer_list.json')) | |
logs = [] | |
for index, tx in enumerate(transfer_list): | |
try: | |
transfer_log = steem.transfer(account=creator, | |
amount=tx['amount'], | |
asset="GOLOS", | |
to=tx['account'], | |
memo="") | |
logs.append(transfer_log) | |
print ("[+] <{0}> Transfered {1} to {2}".format(index+1, tx['amount'], tx['account'])) | |
except BroadcastingError: | |
print ("[-] <{0}> Didn't transferred {1} to {2}".format(index+1, tx['amount'], tx['account'])) | |
pass | |
json.dump(logs, open('golos_transfer_log_' + str(int(time())) + '.json', 'w'), | |
indent=4, | |
sort_keys=True, | |
separators=(',', ':')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment