Files
chia-blockchain/chia/cmds/options.py
Matt HauffandGitHub 40db4635a8 [LABS-245] Enable PEP604 Ruff rules (#20269)
* Enable PEP604 Ruff rules

* Fix harcoded signature in test

* Hack CLVMStreamable test with note to fast follow
2025-11-18 12:34:00 -08:00

34 lines
830 B
Python

from __future__ import annotations
from collections.abc import Callable
from typing import Any, TypeVar
import click
from chia.cmds.param_types import TransactionFeeParamType
FC = TypeVar("FC", bound=Callable[..., Any] | click.Command)
def create_fingerprint(required: bool = False) -> Callable[[FC], FC]:
return click.option(
"-f",
"--fingerprint",
help="Fingerprint of the wallet to use",
required=required,
# TODO: should be uint32
type=int,
)
def create_fee(message: str = "Set the fees for the transaction, in XCH", required: bool = True) -> Callable[[FC], FC]:
return click.option(
"-m",
"--fee",
help=message,
type=TransactionFeeParamType(),
default="0",
show_default=True,
required=required,
)