From 682836fa1ea52a45b755211cc1cf104172487f66 Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Sun, 15 Dec 2024 12:37:33 +0300 Subject: [PATCH] add nonce parameter --- parse.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/parse.py b/parse.py index 0c0ecdc..63d7e0a 100644 --- a/parse.py +++ b/parse.py @@ -489,8 +489,7 @@ def do_custodial_token_transfer(transfer): transfer = response.json() return transfer["result"]["trackingId"] else: - print("Error:", response.json) - return None + return None except requests.exceptions.RequestException as e: print("Error:", e) return None @@ -726,6 +725,8 @@ def voucher_transfer_handler(cmd): def voucher_mint_handler(cmd): value = cmd.v + master_address = w3.eth.account.from_key(master_private_key) + nonce = w3.eth.get_transaction_count(master_address.address,'pending') if str(cmd.t).startswith("NameAgent"): key_name = str(cmd.t).split(":")[1] custodial_address = find_custodial_address(key_name) @@ -770,6 +771,7 @@ def voucher_mint_handler(cmd): command = ( f"cast send --private-key {privatekey} " f"--rpc-url {rpc} " + f"--nonce {nonce} " f" {s} " f'"mintTo(address,uint256)" {to} {value}' f" --json "