diff --git a/autonity_cli/commands/governance.py b/autonity_cli/commands/governance.py index 369d368..e2c467f 100644 --- a/autonity_cli/commands/governance.py +++ b/autonity_cli/commands/governance.py @@ -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)) diff --git a/scripts/test_governance b/scripts/test_governance index 92c080a..c5241e4 100755 --- a/scripts/test_governance +++ b/scripts/test_governance @@ -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