def userA_transfers_some_eth_to_userB(context, amount): prev_block = DEPOSIT_TX_BLOCK client = Client(container.get_root_chain(), container.get_child_chain_client(), userA_key) client.send_transaction(prev_block, uid, amount, userB) operator = Client(container.get_root_chain(), container.get_child_chain_client(), operator_key) operator.submit_block()
def sendTransaction(): print('sendTransaction') #TODO userA = Client(container.get_root_chain(), container.get_child_chain_client() , request.args.get('key')) preblock = requests.post("http://127.0.0.1:26657/status").json()['result']['sync_info']['latest_block_height'] userA.send_transaction(int(preblock), int(request.args.get('uid')), int(request.args.get('amount')), request.args.get('receiver')) return '0'
def userC_transfers_some_eth_to_userD(context, amount): prev_block = TRANSFER_TX_2_BLOCK client = Client(container.get_root_chain(), container.get_child_chain_client(), userC_key) client.send_transaction(prev_block, uid, amount, userD) operator = Client(container.get_root_chain(), container.get_child_chain_client(), operator_key) operator.submit_block()