def parse_output(self, cmd, contract_name, result): """ parse the result """ if cmd in self.functions["parse_in"]: decode_result = common.parse_input(result["input"], contract_name, self.contract_path) common.print_info("input of transaction: {}", decode_result) if cmd in self.functions["parse_out"]: common.print_output_and_input(result["logs"], result["output"], result["input"], contract_name, self.contract_path)
def parse_output(self, cmd, contract_name, result): """ parse the result """ if "blockNumber" in result: blocknum = result["blockNumber"] if blocknum.startswith("0x"): blocknum = int(blocknum, 16) print("transaction in block number :", blocknum) if cmd in self.functions["parse_in"]: decode_result = common.parse_input(result["input"], contract_name, self.contract_path) common.print_info("transaction input", decode_result) if cmd in self.functions["parse_out"]: common.print_output_and_input(result["logs"], result["output"], result["input"], contract_name, self.contract_path)