kopia lustrzana https://github.com/bugout-dev/moonworm
Merge pull request #53 from zomglings/eip1559-support
Added EIP1559 parameters to generated CLI for brownie projectspull/55/head v0.1.14
commit
0477656342
|
|
@ -246,6 +246,38 @@ def generate_get_transaction_config() -> cst.FunctionDef:
|
|||
'transaction_config["gas_price"] = args.gas_price'
|
||||
),
|
||||
),
|
||||
cst.If(
|
||||
test=cst.Comparison(
|
||||
left=cst.Attribute(
|
||||
attr=cst.Name(value="max_fee_per_gas"),
|
||||
value=cst.Name(value="args"),
|
||||
),
|
||||
comparisons=[
|
||||
cst.ComparisonTarget(
|
||||
operator=cst.IsNot(), comparator=cst.Name(value="None")
|
||||
)
|
||||
],
|
||||
),
|
||||
body=cst.parse_statement(
|
||||
'transaction_config["max_fee"] = args.max_fee_per_gas'
|
||||
),
|
||||
),
|
||||
cst.If(
|
||||
test=cst.Comparison(
|
||||
left=cst.Attribute(
|
||||
attr=cst.Name(value="max_priority_fee_per_gas"),
|
||||
value=cst.Name(value="args"),
|
||||
),
|
||||
comparisons=[
|
||||
cst.ComparisonTarget(
|
||||
operator=cst.IsNot(), comparator=cst.Name(value="None")
|
||||
)
|
||||
],
|
||||
),
|
||||
body=cst.parse_statement(
|
||||
'transaction_config["priority_fee"] = args.max_priority_fee_per_gas'
|
||||
),
|
||||
),
|
||||
cst.If(
|
||||
test=cst.Comparison(
|
||||
left=cst.Attribute(
|
||||
|
|
@ -571,6 +603,12 @@ def generate_add_default_arguments() -> cst.FunctionDef:
|
|||
cst.parse_statement(
|
||||
'parser.add_argument("--gas-price", default=None, help="Gas price at which to submit transaction")'
|
||||
),
|
||||
cst.parse_statement(
|
||||
'parser.add_argument("--max-fee-per-gas", default=None, help="Max fee per gas for EIP1559 transactions")'
|
||||
),
|
||||
cst.parse_statement(
|
||||
'parser.add_argument("--max-priority-fee-per-gas", default=None, help="Max priority fee per gas for EIP1559 transactions")'
|
||||
),
|
||||
cst.parse_statement(
|
||||
'parser.add_argument("--confirmations", type=int, default=None, help="Number of confirmations to await before considering a transaction completed")'
|
||||
),
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
MOONWORM_VERSION = "0.1.13"
|
||||
MOONWORM_VERSION = "0.1.14"
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue