_algopy_testing.value_generators.arc4
¶
Module Contents¶
Classes¶
Factory for generating ARC4-compliant test data. |
API¶
- class ARC4ValueGenerator¶
Factory for generating ARC4-compliant test data.
- address() algopy.arc4.Address ¶
Generate a random Algorand address.
- Returns:
A new, random Algorand address.
- uint8(min_value: int = 0, max_value: int = MAX_UINT8) algopy.arc4.UInt8 ¶
Generate a random UInt8 within the specified range.
- Parameters:
min_value – Minimum value (inclusive). Defaults to 0.
max_value – Maximum value (inclusive). Defaults to MAX_UINT8.
- Returns:
A random UInt8 value.
- uint16(min_value: int = 0, max_value: int = MAX_UINT16) algopy.arc4.UInt16 ¶
Generate a random UInt16 within the specified range.
- Parameters:
min_value – Minimum value (inclusive). Defaults to 0.
max_value – Maximum value (inclusive). Defaults to MAX_UINT16.
- Returns:
A random UInt16 value.
- uint32(min_value: int = 0, max_value: int = MAX_UINT32) algopy.arc4.UInt32 ¶
Generate a random UInt32 within the specified range.
- Parameters:
min_value – Minimum value (inclusive). Defaults to 0.
max_value – Maximum value (inclusive). Defaults to MAX_UINT32.
- Returns:
A random UInt32 value.
- uint64(min_value: int = 0, max_value: int = MAX_UINT64) algopy.arc4.UInt64 ¶
Generate a random UInt64 within the specified range.
- Parameters:
min_value – Minimum value (inclusive). Defaults to 0.
max_value – Maximum value (inclusive). Defaults to MAX_UINT64.
- Returns:
A random UInt64 value.
- biguint128( ) algopy.arc4.UInt128 ¶
Generate a random UInt128 within the specified range.
- Parameters:
min_value – Minimum value (inclusive). Defaults to 0.
max_value – Maximum value (inclusive). Defaults to (2^128 - 1).
- Returns:
A random UInt128 value.
- biguint256( ) algopy.arc4.UInt256 ¶
Generate a random UInt256 within the specified range.
- Parameters:
min_value – Minimum value (inclusive). Defaults to 0.
max_value – Maximum value (inclusive). Defaults to (2^256 - 1).
- Returns:
A random UInt256 value.
- biguint512( ) algopy.arc4.UInt512 ¶
Generate a random UInt512 within the specified range.
- Parameters:
min_value – Minimum value (inclusive). Defaults to 0.
max_value – Maximum value (inclusive). Defaults to MAX_UINT512.
- Returns:
A random UInt512 value.