Skip to content

algopy_testing.arc4

StringAn ARC4 sequence of bytes containing a UTF8 string.
UIntNAn ARC4 UInt consisting of the number of bits specified.
BigUIntNAn ARC4 UInt consisting of the number of bits specified.
ByteAn ARC4 alias for a UInt8.
BoolAn ARC4 encoded bool.
StaticArrayA fixed length ARC4 Array of the specified type and length.
Address
DynamicArrayA dynamically sized ARC4 Array of the specified type.
DynamicBytesA variable sized array of bytes.
TupleAn ARC4 ABI tuple, containing other ARC4 ABI types.
StructBase class for ARC4 Struct types.
ARC4Client
arc4_signature(→ algopy.Bytes)Convert a signature to ARC4 bytes.
emit(→ None)
encode(→ algopy.Bytes)
decode(→ _TDecode)
UFixedNxM
BigUFixedNxM
UInt8
UInt16
UInt32
UInt64
UInt128
UInt256
UInt512
abi_call
arc4_create
arc4_update

arc4_signature(signature: str | Callable[_P, _R]) → algopy.Bytes

Section titled “arc4_signature(signature: str | Callable[_P, _R]) → algopy.Bytes”

Convert a signature to ARC4 bytes.

Bases: _ABIEncoded

An ARC4 sequence of bytes containing a UTF8 string.

Return the String representation of the UTF8 string after ARC4 decoding.

Bases: _UIntN, Generic[_TBitSize]

An ARC4 UInt consisting of the number of bits specified.

Max Size: 64 bits

Return the UInt64 representation of the value after ARC4 decoding.

Return the UInt64 representation of the value after ARC4 decoding.

Return the BigUInt representation of the value after ARC4 decoding.

Bases: _UIntN, Generic[_TBitSize]

An ARC4 UInt consisting of the number of bits specified.

Max size: 512 bits

Return the BigUInt representation of the value after ARC4 decoding.

Return the UInt64 representation of the value after ARC4 decoding.

Return the BigUInt representation of the value after ARC4 decoding.

Bases: UIntN[Literal[8]]

An ARC4 alias for a UInt8.

Bases: _ABIEncoded

An ARC4 encoded bool.

Return the bool representation of the value after ARC4 decoding.

Bases: _ABIEncoded, algopy_testing.mutable.MutableBytes, Generic[_TArrayItem, _TArrayLength]

A fixed length ARC4 Array of the specified type and length.

to_native(element_type: type[_TNativeArrayItem]) → algopy.FixedArray[_TNativeArrayItem, _TArrayLength]

Section titled “to_native(element_type: type[_TNativeArrayItem]) → algopy.FixedArray[_TNativeArrayItem, _TArrayLength]”

Convert to an algopy.FixedArray with the specified element type.

Only allowed if the element type is compatible with this arrays element type e.g. arc4.UInt64 -> UInt64

Bases: StaticArray[Byte, Literal[32]]

Bases: _ABIEncoded, algopy_testing.mutable.MutableBytes, Generic[_TArrayItem]

A dynamically sized ARC4 Array of the specified type.

Returns the current length of the array.

Append items to this array.

extend(other: Iterable[_TArrayItem]) → None

Section titled “extend(other: Iterable[_TArrayItem]) → None”

Extend this array with the contents of another array.

Remove and return the last item in the array.

to_native(element_type: type[_TNativeArrayItem]) → algopy.Array[_TNativeArrayItem]

Section titled “to_native(element_type: type[_TNativeArrayItem]) → algopy.Array[_TNativeArrayItem]”

Convert to an algopy.Array with the specified element type.

Only allowed if the element type is compatible with this arrays element type e.g. arc4.UInt64 -> UInt64

Bases: DynamicArray[Byte]

A variable sized array of bytes.

Bases: _ABIEncoded, algopy_testing.mutable.MutableBytes, tuple[Unpack[_TTuple]], Generic[Unpack[_TTuple]]

An ARC4 ABI tuple, containing other ARC4 ABI types.

Bases: algopy_testing.mutable.MutableBytes, _ABIEncoded

Base class for ARC4 Struct types.

classmethod from_bytes(value: algopy.Bytes | bytes) → Self

Section titled “classmethod from_bytes(value: algopy.Bytes | bytes) → Self”

Construct an instance from the underlying bytes (no validation)

Get the underlying bytes[]

decode(typ: type[_TDecode], value: algopy.Bytes | bytes, validate: Literal[True, False] = True) → _TDecode

Section titled “decode(typ: type[_TDecode], value: algopy.Bytes | bytes, validate: Literal[True, False] = True) → _TDecode”