add nonce parameter

This commit is contained in:
Carlosokumu 2024-12-15 12:37:33 +03:00
parent 1ea883ae54
commit 682836fa1e
Signed by: carlos
GPG Key ID: 7BD6BC8160A5C953

View File

@ -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 "