add nonce parameter
This commit is contained in:
parent
1ea883ae54
commit
682836fa1e
4
parse.py
4
parse.py
@ -489,7 +489,6 @@ def do_custodial_token_transfer(transfer):
|
||||
transfer = response.json()
|
||||
return transfer["result"]["trackingId"]
|
||||
else:
|
||||
print("Error:", response.json)
|
||||
return None
|
||||
except requests.exceptions.RequestException as e:
|
||||
print("Error:", e)
|
||||
@ -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 "
|
||||
|
Loading…
Reference in New Issue
Block a user