import decimal
from _typeshed import Incomplete
from typing import Callable, Final

ABI_DECIMAL_PREC: Final[int]
abi_decimal_context: Final[Incomplete]
decimal_localcontext: Final[Incomplete]
ZERO: Final[Incomplete]
TEN: Final[Incomplete]
Decimal: Final[Incomplete]

def ceil32(x: int) -> int: ...
def compute_unsigned_integer_bounds(num_bits: int) -> tuple[int, int]: ...
def compute_signed_integer_bounds(num_bits: int) -> tuple[int, int]: ...
def compute_unsigned_fixed_bounds(
    num_bits: int, frac_places: int
) -> tuple[decimal.Decimal, decimal.Decimal]: ...
def compute_signed_fixed_bounds(
    num_bits: int, frac_places: int
) -> tuple[decimal.Decimal, decimal.Decimal]: ...
def scale_places(places: int) -> Callable[[decimal.Decimal], decimal.Decimal]:
    """
    Returns a function that shifts the decimal point of decimal values to the
    right by ``places`` places.
    """
