Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions autonity_cli/commands/governance.py
Original file line number Diff line number Diff line change
Expand Up @@ -1209,3 +1209,44 @@ def set_clustering_threshold(
chain_id=chain_id,
)
print(to_json(tx))


@governance_group.command()
@rpc_endpoint_option
@from_options()
@tx_aux_options
@argument("gas_limit", type=int)
def set_gas_limit(
rpc_endpoint: Optional[str],
keyfile: Optional[str],
trezor: Optional[str],
from_str: Optional[str],
gas: Optional[str],
gas_price: Optional[str],
max_priority_fee_per_gas: Optional[str],
max_fee_per_gas: Optional[str],
fee_factor: Optional[float],
nonce: Optional[int],
chain_id: Optional[int],
gas_limit: int,
):
"""
Set the gas limit.

Restricted to the Operator account. See `setGasLimit` on Autonity contract.
"""
from_addr = validate_authenticator_account(from_str, keyfile=keyfile, trezor=trezor)
aut = autonity_from_endpoint_arg(rpc_endpoint)

tx = create_contract_tx_from_args(
function=aut.set_gas_limit(gas_limit),
from_addr=from_addr,
gas=gas,
gas_price=gas_price,
max_fee_per_gas=max_fee_per_gas,
max_priority_fee_per_gas=max_priority_fee_per_gas,
fee_factor=fee_factor,
nonce=nonce,
chain_id=chain_id,
)
print(to_json(tx))
1 change: 1 addition & 0 deletions scripts/test_governance
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ aut governance set-withholding-threshold --help > /dev/null
aut governance set-withheld-rewards-pool --help > /dev/null
aut governance set-eip1559-params --help > /dev/null
aut governance set-clustering-threshold --help > /dev/null
aut governance set-gas-limit --help > /dev/null
aut governance create-schedule --help > /dev/null
aut governance mint --help > /dev/null
aut governance burn --help > /dev/null
Expand Down
Loading