"0x45e110F81bBf89041A63Bc2403058743bc552bAF", "0x7B29ed69368B0Ed0d3b21A857BaEeF788B13c626", "0x60423Ebc63245631Ea71bdF58CF23A3949329cDb" ] proxyaddr = "0x6BeE8B8a06F2Df4c3e3BE7E6ca8E489602378186" hdaddr = "0xbc6B59f5a1e86F262Ae92A81aE1c44F401521577" ymaddr = "0x950b5C568c46B1abcDC21F7348d9F29B7c64462a" ownerfile = "./keystore/UTC--2019-07-20T04-00-01.800933268Z--a9535b10ee96b4a03269d0e0def417af97477fd6" # get ether node enode = EtherNode(ETH_NODE_HTTP) # decrype keystore file acc = enode.decrypt_keystore(ownerfile, "123456") print("acc address:", acc.address) relayer = acc print("relayer address:", relayer.address) # get contract proxy = enode.get_contract(proxyaddr, proxyjson) hd = enode.get_contract(hdaddr, hdjson) tm = enode.get_contract(ymaddr, tmjson) APPROVE_VALUE = 10**27 # approve for qt in qts: print("approve proxy for token:", qt) qtoken = enode.get_contract(qt, tptjson)
def tpt_cstcb(cst, args): return cst() def rand_cstcb(cst, args): return cst() def bt_cstcb(cst, args): return cst(args[0]) if __name__ == "__main__": # get ether node enode = EtherNode() # decrype keystore file acc = enode.decrypt_keystore(ownerfile, None) # deploy contract: TPT #tpt = enode.create_contract(acc, tptfile, tpt_cstcb, None, True) #print("tpt address:", tpt.address) #tpt = enode.create_contract(acc, tptfile, tpt_cstcb, None, True) #print("tpt address:", tpt.address) #tpt = enode.create_contract(acc, tptfile, tpt_cstcb, None, True) #print("tpt address:", tpt.address) #tpt = enode.create_contract(acc, tptfile, tpt_cstcb, None, True) #print("tpt address:", tpt.address) # deploy contract: random #random = enode.create_contract(acc, randfile, rand_cstcb, None, True) #print("random address:", random.address)
from ether_node import EtherNode import config as cfg if __name__ == "__main__": # get ether node enode = EtherNode() # decrype keystore file acc = enode.decrypt_keystore(cfg.ETH_KEYSTORE_FILE, None) # deploy contract address, abi = enode.create_contract(acc, cfg.ETH_CONTRACT_SHT_FILE, True) print("contract address:", address)