def _send_or_simulate(tx: Transaction, args: Any): if args.send: tx.send(ElrondProxy(args.proxy)) return None elif args.simulate: response = tx.simulate(ElrondProxy(args.proxy)) return response
def _send_or_simulate(tx: Transaction, args: Any): send_wait_result = args.wait_result and args.send and not args.simulate send_only = args.send and not (args.wait_result or args.simulate) simulate = args.simulate and not (send_only or send_wait_result) if send_wait_result: proxy = ElrondProxy(args.proxy) response = tx.send_wait_result(proxy, args.timeout) return None elif send_only: tx.send(ElrondProxy(args.proxy)) return None elif simulate: response = tx.simulate(ElrondProxy(args.proxy)) return response
def send_or_simulate(tx: Transaction, args: Any): if args.send: tx.send(ElrondProxy(args.proxy)) elif args.simulate: response = tx.simulate(ElrondProxy(args.proxy)) utils.dump_out_json(response)