From 2f0b59e57920af520f0a2416a0374375df25dacf Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Tue, 10 Dec 2024 15:55:12 +0300 Subject: [PATCH] fix parser error --- parse.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/parse.py b/parse.py index 5a2b5f2..c0a7b0f 100644 --- a/parse.py +++ b/parse.py @@ -235,6 +235,8 @@ def p_voucher_transfer(p): | change_label nv LABEL HEX | change_label hv LABEL LABEL | change_label nv LABEL LABEL + | change_label hv HEX LABEL + | change_label nv HEX LABEL ''' o = p[1] if o.c.value & 0x10 == 0: @@ -382,7 +384,7 @@ def load_gas(address,nonce): if result.returncode != 0: raise subprocess.CalledProcessError(result.returncode, command, output=result.stdout, stderr=result.stderr) - message = f"Added some gas to {address}" + message = f"Added {gas_topup} to {address}" printMessage(message) @@ -547,8 +549,10 @@ def voucher_transfer_handler(cmd): if result.stderr: raise ValueError(f"Command failed with error: {result.stderr}") + amount_transfered = value / 10**6 + data = json.loads(result.stdout) - message = f"Transfered {value} {voucher_name} to {to} " + message = f"Transfered {amount_transfered} {voucher_name} to {to} " printMessage(message) return data["transactionHash"] @@ -603,7 +607,10 @@ def voucher_mint_handler(cmd): if result.stderr: raise ValueError(f"Command failed with error: {result.stderr}") data = json.loads(result.stdout) - message = f"Added supply of {value} {voucher_symbol} to :{to}" + + mint_amount = value / 10**6 + message = f"Minted {mint_amount} {voucher_symbol} to :{to}" + printMessage(message) return data["transactionHash"]