algopy_testing.utils
Module Contents
Section titled “Module Contents”Functions
Section titled “Functions”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.Bytes | algopy.UInt64) |
convert_stack_to_native(→ bytes | int) |
check_type(→ None) | |
assert_address_is_valid(→ None) | |
get_default_global_fields(…) | |
get_new_scratch_space(→ list[algopy.Bytes | algopy.UInt64]) |
arc4_prefix(→ _TBytes) | Return the value with the ARC4 prefix prepended. |
raise_mocked_function_error(→ Never) | |
get_static_size_of(→ int | None) |
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_bytes32() → bytes
Section titled “generate_random_bytes32() → bytes”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_int8(value: object) → int
Section titled “as_int8(value: object) → int”as_int16(value: object) → int
Section titled “as_int16(value: object) → int”as_int64(value: object) → int
Section titled “as_int64(value: object) → int”as_int512(value: object) → int
Section titled “as_int512(value: object) → 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”as_string(value: object) → str
Section titled “as_string(value: object) → str”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_default_global_fields() → GlobalFields
Section titled “get_default_global_fields() → GlobalFields”get_new_scratch_space() → list[algopy.Bytes | algopy.UInt64]
Section titled “get_new_scratch_space() → list[algopy.Bytes | algopy.UInt64]”arc4_prefix(value: _TBytes) → _TBytes
Section titled “arc4_prefix(value: _TBytes) → _TBytes”Return the value with the ARC4 prefix prepended.