Skip to content

algopy_testing.utils

resolve_app_index(→ int)
resolve_asset_index(→ int)
generate_random_int(→ int)
generate_random_bytes32(→ bytes)
generate_random_account(→ algokit_utils.AddressWithSigners)Generate a new random Algorand account and return its address.
as_int(→ int)
as_int8(→ int)
as_int16(→ int)
as_int64(→ int)
as_int512(→ int)
as_bytes(→ bytes)
as_string(→ str)
int_to_bytes(→ bytes)
convert_native_to_stack(→ algopy.Bytesalgopy.UInt64)
convert_stack_to_native(→ bytesint)
check_type(→ None)
assert_address_is_valid(→ None)
get_default_global_fields(…)
get_new_scratch_space(→ list[algopy.Bytesalgopy.UInt64])
arc4_prefix(→ _TBytes)Return the value with the ARC4 prefix prepended.
raise_mocked_function_error(→ Never)
get_static_size_of(→ intNone)
get_int_literal_from_type_generic(→ int)
get_type_generic_from_int_literal(→ type)
parameterize_type(→ type)

resolve_app_index(app_id_or_index: algopy.UInt64 | int) → int

Section titled “resolve_app_index(app_id_or_index: algopy.UInt64 | int) → int”

resolve_asset_index(asset_id_or_index: algopy.UInt64 | int) → int

Section titled “resolve_asset_index(asset_id_or_index: algopy.UInt64 | int) → int”

generate_random_int(min_value: int, max_value: int) → int

Section titled “generate_random_int(min_value: int, max_value: int) → int”

generate_random_account() → algokit_utils.AddressWithSigners

Section titled “generate_random_account() → algokit_utils.AddressWithSigners”

Generate a new random Algorand account and return its address.

as_int(value: object, max: int | None) → int

Section titled “as_int(value: object, max: int | None) → int”

as_bytes(value: object, max_size: int = MAX_BYTES_SIZE) → bytes

Section titled “as_bytes(value: object, max_size: int = MAX_BYTES_SIZE) → bytes”

int_to_bytes(x: int, pad_to: int | None = None) → bytes

Section titled “int_to_bytes(x: int, pad_to: int | None = None) → bytes”

convert_native_to_stack(value: algopy.Bytes | algopy.UInt64 | bytes | int) → algopy.Bytes | algopy.UInt64

Section titled “convert_native_to_stack(value: algopy.Bytes | algopy.UInt64 | bytes | int) → algopy.Bytes | algopy.UInt64”

convert_stack_to_native(value: algopy.Bytes | algopy.UInt64 | bytes | int) → bytes | int

Section titled “convert_stack_to_native(value: algopy.Bytes | algopy.UInt64 | bytes | int) → bytes | int”

check_type(value: object, typ: type | types.UnionType) → None

Section titled “check_type(value: object, typ: type | types.UnionType) → None”

assert_address_is_valid(address: str) → None

Section titled “assert_address_is_valid(address: str) → None”

get_new_scratch_space() → list[algopy.Bytes | algopy.UInt64]

Section titled “get_new_scratch_space() → list[algopy.Bytes | algopy.UInt64]”

Return the value with the ARC4 prefix prepended.

raise_mocked_function_error(func_name: str) → Never

Section titled “raise_mocked_function_error(func_name: str) → Never”

get_static_size_of(typ: type | object) → int | None

Section titled “get_static_size_of(typ: type | object) → int | None”

get_int_literal_from_type_generic(literal_type: type) → int

Section titled “get_int_literal_from_type_generic(literal_type: type) → int”

get_type_generic_from_int_literal(value: int) → type

Section titled “get_type_generic_from_int_literal(value: int) → type”

parameterize_type(type_: type, *params: type) → type

Section titled “parameterize_type(type_: type, *params: type) → type”