Skip to content

Commit

Permalink
add nonce flag to test script
Browse files Browse the repository at this point in the history
  • Loading branch information
nibty committed Feb 2, 2024
1 parent a330e43 commit 65c592d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docker/networksimulator/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@
argparser.add_argument('--validators', type=int,
help="the number of concurrent validators to use for signing transactions")
argparser.add_argument('--rpc', type=str, default=RPC_URL, help="The RPC URL to use")
argparser.add_argument('--nonce', type=int, required=False, help="The nonce")

args = argparser.parse_args()

Expand All @@ -459,9 +460,12 @@ def run_transactions(key):
"from": acct1.address,
"to": acct1.address,
"value": Web3.to_wei(args.value, 'ether'),
'gas': args.gas
'gas': args.gas,
}

if args.nonce:
tx_params["nonce"] = args.nonce

if args.max_gas_fee and args.max_gas_priority_fee:
tx_params["maxFeePerGas"] = Web3.to_wei(args.max_gas_fee, 'gwei')
tx_params["maxPriorityFeePerGas"] = Web3.to_wei(args.max_gas_priority_fee, 'gwei')
Expand Down

0 comments on commit 65c592d

Please sign in to comment.