コード例 #1
0
ファイル: bootstrapper.py プロジェクト: jhexperiment/grow
 def self_vote_producers(self, a_accounts, num_accounts=10000000):
     i = 0
     for a in a_accounts:
         if i < num_accounts:
             cmd = self.teclos_dir + ' --url %s system voteproducer approve ' + a.name + ' ' + a.name
             run_retry(cmd % self.host_address)
             i = i + 1
コード例 #2
0
ファイル: account.py プロジェクト: jhexperiment/grow
 def post_sys_create(self, a, net, cpu, ram, creator='eosio'):
     cmd = self.teclos + ' --url %s system newaccount %s --transfer %s %s --stake-net \"%s\" --stake-cpu \"%s\" --buy-ram \"%s\"'
     net = Asset(net)
     cpu = Asset(cpu)
     ram = Asset(ram)
     run_retry(cmd % (self.host_address, creator, a.name, a.keypair.public,
                      net, cpu, ram))
     a.amount += cpu + net + ram
コード例 #3
0
ファイル: bootstrapper.py プロジェクト: jhexperiment/grow
 def vote_producers(self, a_accounts, b_accounts, minimum=10, maximum=30):
     for a in a_accounts:
         cmd = self.teclos_dir + ' --url %s system voteproducer prods ' + a.name + ' '
         i = 0
         for t in b_accounts:
             if a.name != t.name and i < randint(minimum, maximum):
                 cmd += t.name + " "
                 i = i + 1
         run_retry(cmd % self.host_address)
コード例 #4
0
ファイル: bootstrapper.py プロジェクト: jhexperiment/grow
 def push_action(self, target, action_name, json):
     run_retry(self.teclos_dir + ' --url %s push action %s %s %s' %
               (self.host_address, target, action_name, json))
コード例 #5
0
ファイル: bootstrapper.py プロジェクト: jhexperiment/grow
 def set_contract(self, account_name, path, p=""):
     print(self.host_address)
     cmd = self.teclos_dir + ' --url %s set contract %s %s'
     if p != "":
         cmd += ' -p %s' % p
     run_retry(cmd % (self.host_address, account_name, path))
コード例 #6
0
ファイル: bootstrapper.py プロジェクト: jhexperiment/grow
 def transfer(host_address, sender, receipient, amount, memo=""):
     cmd = 'teclos --url %s transfer %s %s \"%s\" \"%s\"'
     run_retry(cmd % (host_address, sender, receipient, amount, memo))