Skip to content

Instantly share code, notes, and snippets.

@davekay100
Created June 27, 2018 22:06
Show Gist options
  • Select an option

  • Save davekay100/4ec2d1a33004708f5b5db5a002862557 to your computer and use it in GitHub Desktop.

Select an option

Save davekay100/4ec2d1a33004708f5b5db5a002862557 to your computer and use it in GitHub Desktop.
send async commands over the cosmos network
account2="cosmosaccaddr1mq93l3s2zml6nn97rmwlqhdw7gf6h0hgagyjun"
name2="dave-node2"
pass2="12345678"
sequence2=27
account3="cosmosaccaddr1j22rgj5znf0rp0g7gsrv9sndk2qxuxqevkmpej"
name3="dave-node3"
pass3="12345678"
sequence3=23
token="1steak"
import os
bashCommand2 = "echo " + pass2 +" | gaiacli-develop send --amount=" + token + " --chain-id=test-chain-0Mjy1s --name=" + name2 + " --to=" + account3 + " --async=true" + " --account-number=0"
bashCommand3 = "echo " + pass3 +" | gaiacli-develop send --amount=" + token + " --chain-id=test-chain-0Mjy1s --name=" + name3 + " --to=" + account2 + " --async=true" + " --account-number=2"
count = 0
while count < 10:
cmd1 = bashCommand2 + " --sequence=" + str(sequence2)
os.system(cmd1)
cmd1 = bashCommand3 + " --sequence=" + str(sequence3)
os.system(cmd1)
sequence2+=1
sequence3+=1
count+= 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment