# algopy.arc4

## Module Contents

[Section titled “Module Contents”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#module-contents)

### Classes

[Section titled “Classes”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classes)

| [`ARC4Client`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.ARC4Client) | Used to provide typed method signatures for ARC-4 contracts |
| --- | --- |
| [`ARC4Contract`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.ARC4Contract) | A contract that conforms to the ARC-4 ABI specification, functions decorated with<br>`@abimethod` or `@baremethod` will form the public interface of the contract |
| [`Address`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.Address) | An alias for an array containing 32 bytes representing an Algorand address |
| [`BigUFixedNxM`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.BigUFixedNxM) | An ARC-4 UFixed representing a decimal with the number of bits and precision specified. |
| [`BigUIntN`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.BigUIntN) | An ARC-4 UInt consisting of the number of bits specified. |
| [`Bool`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.Bool) | An ARC-4 encoded bool |
| [`Byte`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.Byte) | An ARC-4 alias for a UInt8 |
| [`DynamicArray`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.DynamicArray) | A dynamically sized ARC-4 Array of the specified type |
| [`DynamicBytes`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.DynamicBytes) | A variable sized array of bytes |
| [`StaticArray`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.StaticArray) | A fixed length ARC-4 Array of the specified type and length |
| [`String`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.String) | An ARC-4 sequence of bytes containing a UTF8 string |
| [`Struct`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.Struct) | Base class for ARC-4 Struct types |
| [`Tuple`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.Tuple) | An ARC-4 ABI tuple, containing other ARC-4 ABI types |
| [`UFixedNxM`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.UFixedNxM) | An ARC-4 UFixed representing a decimal with the number of bits and precision specified. |
| [`UIntN`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.UIntN) | An ARC-4 UInt consisting of the number of bits specified. |

### Functions

[Section titled “Functions”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#functions)

| [`abimethod`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.abimethod) | Decorator that indicates a method is an ARC-4 ABI method. |
| --- | --- |
| [`arc4_create`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.arc4_create) | Provides a typesafe and convenient way of creating an ARC4Contract via an inner transaction |
| [`arc4_signature`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.arc4_signature) | Returns the ARC-4 encoded method selector for the specified signature or abi method |
| [`arc4_update`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.arc4_update) | Provides a typesafe and convenient way of updating an ARC4Contract via an inner transaction |
| [`baremethod`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.baremethod) | Decorator that indicates a method is an ARC-4 bare method. |
| [`emit`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.emit) | Emit an ARC-28 event for the provided event signature or name, and provided args. |

### Data

[Section titled “Data”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#data)

| [`UInt128`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.UInt128) | An ARC-4 UInt128 |
| --- | --- |
| [`UInt16`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.UInt16) | An ARC-4 UInt16 |
| [`UInt256`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.UInt256) | An ARC-4 UInt256 |
| [`UInt32`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.UInt32) | An ARC-4 UInt32 |
| [`UInt512`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.UInt512) | An ARC-4 UInt512 |
| [`UInt64`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.UInt64) | An ARC-4 UInt64 |
| [`UInt8`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.UInt8) | An ARC-4 UInt8 |
| [`abi_call`](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.abi_call) | Provides a typesafe way of calling ARC-4 methods via an inner transaction |

### API

[Section titled “API”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#api)

#### _class_ algopy.arc4.ARC4Client

[Section titled “class algopy.arc4.ARC4Client”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#class-algopyarc4arc4client)

Used to provide typed method signatures for ARC-4 contracts

#### _class_ algopy.arc4.ARC4Contract

[Section titled “class algopy.arc4.ARC4Contract”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#class-algopyarc4arc4contract)

A contract that conforms to the ARC-4 ABI specification, functions decorated with
`@abimethod` or `@baremethod` will form the public interface of the contract

The approval\_program will be implemented by the compiler, and route application args
according to the ARC-4 ABI specification

The clear\_state\_program will by default return True, but can be overridden

##### _classmethod_ \_\_init _subclass_\_

[Section titled “classmethod \_\_initsubclass\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-__initsubclass_)

\* _classmethod_ \_\_init _subclass_\_(\*, name: [str](https://docs.python.org/3/library/stdtypes.html#str) = …, scratch\_slots: [algopy.urange](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.urange) \| [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[ [int](https://docs.python.org/3/library/functions.html#int) \| [algopy.urange](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.urange), …\] \| [list](https://docs.python.org/3/library/stdtypes.html#list)\[ [int](https://docs.python.org/3/library/functions.html#int) \| [algopy.urange](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.urange)\] = …, state\_totals: [algopy.StateTotals](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.StateTotals) = …, avm\_version: [int](https://docs.python.org/3/library/functions.html#int) = …)\*

When declaring a Contract subclass, options and configuration are passed in
the base class list:

```
class MyContract(algopy.Contract, name="CustomName"):

...
```

- **Parameters:**
  - **name** –

Will affect the output TEAL file name if there are multiple non-abstract contracts
    in the same file.

If the contract is a subclass of algopy.ARC4Contract, `name` will also be used as the
    contract name in the ARC-32 application.json, instead of the class name.

- **scratch\_slots** –

Allows you to mark a slot ID or range of slot IDs as “off limits” to Puya.
    These slot ID(s) will never be written to or otherwise manipulating by the compiler itself.
    This is particularly useful in combination with `algopy.op.gload_bytes` / `algopy.op.gload_uint64`
    which lets a contract in a group transaction read from the scratch slots of another contract
    that occurs earlier in the transaction group.

In the case of inheritance, scratch slots reserved become cumulative. It is not an error
    to have overlapping ranges or values either, so if a base class contract reserves slots
    0-5 inclusive and the derived contract reserves 5-10 inclusive, then within the derived
    contract all slots 0-10 will be marked as reserved.

- **state\_totals** –

Allows defining what values should be used for global and local uint and bytes storage
    values when creating a contract. Used when outputting ARC-32 application.json schemas.

If let unspecified, the totals will be determined by the compiler based on state
    variables assigned to `self`.

This setting is not inherited, and only applies to the exact `Contract` it is specified
    on. If a base class does specify this setting, and a derived class does not, a warning
    will be emitted for the derived class. To resolve this warning, `state_totals` must be
    specified. Note that it is valid to not provide any arguments to the `StateTotals`
    constructor, like so `state_totals=StateTotals()`, in which case all values will be
    automatically calculated.

- **avm\_version** – Determines which AVM version to use, this affects what operations are supported.
    Defaults to value provided supplied on command line (which defaults to current mainnet version)

##### approval\_program

[Section titled “approval\_program”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#approval_program)

_approval\_program() → [bool](https://docs.python.org/3/library/functions.html#bool)_

Represents the program called for all transactions
where `OnCompletion` != `ClearState`

##### clear\_state\_program

[Section titled “clear\_state\_program”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#clear_state_program)

_clear\_state\_program() → [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64) \| [bool](https://docs.python.org/3/library/functions.html#bool)_

Represents the program called when `OnCompletion` == `ClearState`

#### _class_ algopy.arc4.Address

[Section titled “class algopy.arc4.Address”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#class-algopyarc4address)

\* _class_ algopy.arc4.Address(value: [algopy.Account](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Account) \| [str](https://docs.python.org/3/library/stdtypes.html#str) \| [algopy.Bytes](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Bytes) = …, /)\*

An alias for an array containing 32 bytes representing an Algorand address

##### Initialization

[Section titled “Initialization”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#initialization)

If `value` is a string, it should be a 58 character base32 string,
ie a base32 string-encoded 32 bytes public key + 4 bytes checksum.
If `value` is a Bytes, it’s length checked to be 32 bytes - to avoid this
check, use `Address.from_bytes(...)` instead.
Defaults to the zero-address.

##### \_\_bool\_\_

[Section titled “\_\_bool\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__bool__)

_\_\_bool\_\_() → [bool](https://docs.python.org/3/library/functions.html#bool)_

Returns `True` if not equal to the zero address

##### \_\_eq\_\_

[Section titled “\_\_eq\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__eq__)

_\_\_eq\_\_(other: [algopy.arc4.Address](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.Address) \| [algopy.Account](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Account) \| [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool)_

Address equality is determined by the address of another
`arc4.Address`, `Account` or `str`

##### \_\_getitem\_\_

[Section titled “\_\_getitem\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__getitem__)

_\_\_getitem\_\_(index: [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64) \| [int](https://docs.python.org/3/library/functions.html#int)) → algopy.arc4.\_TArrayItem_

Gets the item of the array at provided index

##### \_\_iter\_\_

[Section titled “\_\_iter\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__iter__)

\_\_\_iter\_\_() → [Iterator](https://docs.python.org/3/library/typing.html#typing.Iterator)\[algopy.arc4. _TArrayItem\]_

Returns an iterator for the items in the array

##### \_\_ne\_\_

[Section titled “\_\_ne\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__ne__)

_\_\_ne\_\_(other: [algopy.arc4.Address](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.Address) \| [algopy.Account](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Account) \| [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool)_

Address equality is determined by the address of another
`arc4.Address`, `Account` or `str`

##### \_\_reversed\_\_

[Section titled “\_\_reversed\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__reversed__)

\_\_\_reversed\_\_() → [Iterator](https://docs.python.org/3/library/typing.html#typing.Iterator)\[algopy.arc4. _TArrayItem\]_

Returns an iterator for the items in the array, in reverse order

##### \_\_setitem\_\_

[Section titled “\_\_setitem\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__setitem__)

_\_\_setitem\_\_(index: [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64) \| [int](https://docs.python.org/3/library/functions.html#int), value: algopy.arc4.\_TArrayItem) → algopy.arc4.\_TArrayItem_

Sets the item of the array at specified index to provided value

##### _property_ bytes \*: \[algopy.Bytes\]

[Section titled “property bytes \*: \[algopy.Bytes\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-bytes--algopybytes)

_property bytes : [algopy.Bytes](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Bytes)_

Get the underlying Bytes

##### copy

[Section titled “copy”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#copy)

_copy() → [Self](https://docs.python.org/3/library/typing.html#typing.Self)_

Create a copy of this array

##### _classmethod_ from\_bytes

[Section titled “classmethod from\_bytes”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_bytes)

\* _classmethod_ from\_bytes(value: [algopy.Bytes](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Bytes) \| [bytes](https://docs.python.org/3/library/stdtypes.html#bytes), /) → [Self](https://docs.python.org/3/library/typing.html#typing.Self)\*

Construct an instance from the underlying bytes (no validation)

##### _classmethod_ from\_log

[Section titled “classmethod from\_log”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_log)

\* _classmethod_ from\_log(log: [algopy.Bytes](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Bytes), /) → [Self](https://docs.python.org/3/library/typing.html#typing.Self)\*

Load an ABI type from application logs, checking for the ABI return prefix `0x151f7c75`

##### _property_ length \*: \[algopy.UInt64\]

[Section titled “property length \*: \[algopy.UInt64\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-length--algopyuint64)

_property length : [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64)_

Returns the (compile-time) length of the array

##### _property_ native \*: \[algopy.Account\]

[Section titled “property native \*: \[algopy.Account\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-native--algopyaccount)

_property native : [algopy.Account](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Account)_

Return the Account representation of the address after ARC-4 decoding

##### to\_native

[Section titled “to\_native”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#to_native)

\_to\_native(element\_type: [type](https://docs.python.org/3/library/functions.html#type)\[algopy.arc4.\_TNativeArrayItem\], /) → [algopy.FixedArray](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.FixedArray)\[algopy.arc4.\_TNativeArrayItem, algopy.arc4. _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

##### validate

[Section titled “validate”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#validate)

_validate() → [None](https://docs.python.org/3/library/constants.html#None)_

Performs validation to ensure the value is well-formed, errors if it is not

#### _class_ algopy.arc4.BigUFixedNxM

[Section titled “class algopy.arc4.BigUFixedNxM”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#class-algopyarc4bigufixednxm)

\* _class_ algopy.arc4.BigUFixedNxM(value: [str](https://docs.python.org/3/library/stdtypes.html#str) = ‘0.0’, /)\*

An ARC-4 UFixed representing a decimal with the number of bits and precision specified.

Max size: 512 bits

##### Initialization

[Section titled “Initialization”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#initialization-1)

Construct an instance of UFixedNxM where value (v) is determined from the original
decimal value (d) by the formula v = round(d \* (10^M))

##### \_\_bool\_\_

[Section titled “\_\_bool\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__bool__-1)

_\_\_bool\_\_() → [bool](https://docs.python.org/3/library/functions.html#bool)_

Returns `True` if not equal to zero

##### \_\_eq\_\_

[Section titled “\_\_eq\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__eq__-1)

_\_\_eq\_\_(other: [Self](https://docs.python.org/3/library/typing.html#typing.Self)) → [bool](https://docs.python.org/3/library/functions.html#bool)_

Compare for equality, note both operands must be the exact same type

##### _property_ bytes \*: \[algopy.Bytes\]

[Section titled “property bytes \*: \[algopy.Bytes\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-bytes--algopybytes-1)

_property bytes : [algopy.Bytes](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Bytes)_

Get the underlying Bytes

##### _classmethod_ from\_bytes

[Section titled “classmethod from\_bytes”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_bytes-1)

Construct an instance from the underlying bytes (no validation)

##### _classmethod_ from\_log

[Section titled “classmethod from\_log”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_log-1)

Load an ABI type from application logs, checking for the ABI return prefix `0x151f7c75`

##### validate

[Section titled “validate”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#validate-1)

_validate() → [None](https://docs.python.org/3/library/constants.html#None)_

Performs validation to ensure the value is well-formed, errors if it is not

#### _class_ algopy.arc4.BigUIntN

[Section titled “class algopy.arc4.BigUIntN”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#class-algopyarc4biguintn)

\* _class_ algopy.arc4.BigUIntN(value: [algopy.BigUInt](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.BigUInt) \| [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64) \| [int](https://docs.python.org/3/library/functions.html#int) = 0, /)\*

An ARC-4 UInt consisting of the number of bits specified.

Max size: 512 bits

##### Initialization

[Section titled “Initialization”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#initialization-2)

##### \_\_bool\_\_

[Section titled “\_\_bool\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__bool__-2)

_\_\_bool\_\_() → [bool](https://docs.python.org/3/library/functions.html#bool)_

Returns `True` if not equal to zero

##### \_\_eq\_\_

[Section titled “\_\_eq\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__eq__-2)

\_\_\_eq\_\_(other: [algopy.arc4.UIntN](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.UIntN)\[algopy.arc4.\_TBitSize\] \| [algopy.arc4.BigUIntN](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.BigUIntN)\[algopy.arc4. _TBitSize\] \| [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64) \| [algopy.BigUInt](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.BigUInt) \| [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool)_

Return self==value.

##### \_\_ge\_\_

[Section titled “\_\_ge\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__ge__)

\_\_\_ge\_\_(other: [algopy.arc4.UIntN](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.UIntN)\[algopy.arc4.\_TBitSize\] \| [algopy.arc4.BigUIntN](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.BigUIntN)\[algopy.arc4. _TBitSize\] \| [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64) \| [algopy.BigUInt](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.BigUInt) \| [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool)_

Return self>=value.

##### \_\_gt\_\_

[Section titled “\_\_gt\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__gt__)

\_\_\_gt\_\_(other: [algopy.arc4.UIntN](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.UIntN)\[algopy.arc4.\_TBitSize\] \| [algopy.arc4.BigUIntN](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.BigUIntN)\[algopy.arc4. _TBitSize\] \| [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64) \| [algopy.BigUInt](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.BigUInt) \| [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool)_

Return self>value.

##### \_\_le\_\_

[Section titled “\_\_le\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__le__)

\_\_\_le\_\_(other: [algopy.arc4.UIntN](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.UIntN)\[algopy.arc4.\_TBitSize\] \| [algopy.arc4.BigUIntN](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.BigUIntN)\[algopy.arc4. _TBitSize\] \| [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64) \| [algopy.BigUInt](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.BigUInt) \| [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool)_

Return self<=value.

##### \_\_lt\_\_

[Section titled “\_\_lt\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__lt__)

\_\_\_lt\_\_(other: [algopy.arc4.UIntN](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.UIntN)\[algopy.arc4.\_TBitSize\] \| [algopy.arc4.BigUIntN](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.BigUIntN)\[algopy.arc4. _TBitSize\] \| [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64) \| [algopy.BigUInt](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.BigUInt) \| [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool)_

Return self<value.

##### \_\_ne\_\_

[Section titled “\_\_ne\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__ne__-1)

\_\_\_ne\_\_(other: [algopy.arc4.UIntN](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.UIntN)\[algopy.arc4.\_TBitSize\] \| [algopy.arc4.BigUIntN](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.BigUIntN)\[algopy.arc4. _TBitSize\] \| [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64) \| [algopy.BigUInt](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.BigUInt) \| [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool)_

Return self!=value.

##### as\_biguint

[Section titled “as\_biguint”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#as_biguint)

_as\_biguint() → [algopy.BigUInt](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.BigUInt)_

Return the BigUInt representation of the value after ARC-4 decoding

##### as\_uint64

[Section titled “as\_uint64”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#as_uint64)

_as\_uint64() → [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64)_

Return the UInt64 representation of the value after ARC-4 decoding

##### _property_ bytes \*: \[algopy.Bytes\]

[Section titled “property bytes \*: \[algopy.Bytes\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-bytes--algopybytes-2)

_property bytes : [algopy.Bytes](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Bytes)_

Get the underlying Bytes

##### _classmethod_ from\_bytes

[Section titled “classmethod from\_bytes”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_bytes-2)

Construct an instance from the underlying bytes (no validation)

##### _classmethod_ from\_log

[Section titled “classmethod from\_log”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_log-2)

Load an ABI type from application logs, checking for the ABI return prefix `0x151f7c75`

##### _property_ native \*: \[algopy.BigUInt\]

[Section titled “property native \*: \[algopy.BigUInt\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-native--algopybiguint)

_property native : [algopy.BigUInt](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.BigUInt)_

Return the BigUInt representation of the value after ARC-4 decoding

##### validate

[Section titled “validate”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#validate-2)

_validate() → [None](https://docs.python.org/3/library/constants.html#None)_

Performs validation to ensure the value is well-formed, errors if it is not

#### _class_ algopy.arc4.Bool

[Section titled “class algopy.arc4.Bool”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#class-algopyarc4bool)

\* _class_ algopy.arc4.Bool(value: [bool](https://docs.python.org/3/library/functions.html#bool) = False, /)\*

An ARC-4 encoded bool

##### Initialization

[Section titled “Initialization”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#initialization-3)

##### \_\_eq\_\_

[Section titled “\_\_eq\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__eq__-3)

_\_\_eq\_\_(other: [algopy.arc4.Bool](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.Bool) \| [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool)_

Return self==value.

##### \_\_ne\_\_

[Section titled “\_\_ne\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__ne__-2)

_\_\_ne\_\_(other: [algopy.arc4.Bool](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.Bool) \| [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool)_

Return self!=value.

##### _property_ bytes \*: \[algopy.Bytes\]

[Section titled “property bytes \*: \[algopy.Bytes\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-bytes--algopybytes-3)

_property bytes : [algopy.Bytes](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Bytes)_

Get the underlying Bytes

##### _classmethod_ from\_bytes

[Section titled “classmethod from\_bytes”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_bytes-3)

Construct an instance from the underlying bytes (no validation)

##### _classmethod_ from\_log

[Section titled “classmethod from\_log”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_log-3)

Load an ABI type from application logs, checking for the ABI return prefix `0x151f7c75`

##### _property_ native \*: \[bool\]

[Section titled “property native \*: \[bool\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-native--bool)

_property native : [bool](https://docs.python.org/3/library/functions.html#bool)_

Return the bool representation of the value after ARC-4 decoding

##### validate

[Section titled “validate”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#validate-3)

_validate() → [None](https://docs.python.org/3/library/constants.html#None)_

Performs validation to ensure the value is well-formed, errors if it is not

#### _class_ algopy.arc4.Byte

[Section titled “class algopy.arc4.Byte”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#class-algopyarc4byte)

\* _class_ algopy.arc4.Byte(value: [algopy.BigUInt](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.BigUInt) \| [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64) \| [int](https://docs.python.org/3/library/functions.html#int) = 0, /)\*

An ARC-4 alias for a UInt8

##### Initialization

[Section titled “Initialization”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#initialization-4)

##### \_\_bool\_\_

[Section titled “\_\_bool\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__bool__-3)

_\_\_bool\_\_() → [bool](https://docs.python.org/3/library/functions.html#bool)_

Returns `True` if not equal to zero

##### \_\_eq\_\_

[Section titled “\_\_eq\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__eq__-4)

Return self==value.

##### \_\_ge\_\_

[Section titled “\_\_ge\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__ge__-1)

Return self>=value.

##### \_\_gt\_\_

[Section titled “\_\_gt\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__gt__-1)

Return self>value.

##### \_\_le\_\_

[Section titled “\_\_le\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__le__-1)

Return self<=value.

##### \_\_lt\_\_

[Section titled “\_\_lt\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__lt__-1)

Return self<value.

##### \_\_ne\_\_

[Section titled “\_\_ne\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__ne__-3)

Return self!=value.

##### as\_biguint

[Section titled “as\_biguint”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#as_biguint-1)

_as\_biguint() → [algopy.BigUInt](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.BigUInt)_

Return the BigUInt representation of the value after ARC-4 decoding

##### as\_uint64

[Section titled “as\_uint64”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#as_uint64-1)

_as\_uint64() → [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64)_

Return the UInt64 representation of the value after ARC-4 decoding

##### _property_ bytes \*: \[algopy.Bytes\]

[Section titled “property bytes \*: \[algopy.Bytes\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-bytes--algopybytes-4)

_property bytes : [algopy.Bytes](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Bytes)_

Get the underlying Bytes

##### _classmethod_ from\_bytes

[Section titled “classmethod from\_bytes”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_bytes-4)

Construct an instance from the underlying bytes (no validation)

##### _classmethod_ from\_log

[Section titled “classmethod from\_log”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_log-4)

Load an ABI type from application logs, checking for the ABI return prefix `0x151f7c75`

##### _property_ native \*: \[algopy.UInt64\]

[Section titled “property native \*: \[algopy.UInt64\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-native--algopyuint64)

_property native : [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64)_

Return the UInt64 representation of the value after ARC-4 decoding

##### validate

[Section titled “validate”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#validate-4)

_validate() → [None](https://docs.python.org/3/library/constants.html#None)_

Performs validation to ensure the value is well-formed, errors if it is not

#### _class_ algopy.arc4.DynamicArray

[Section titled “class algopy.arc4.DynamicArray”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#class-algopyarc4dynamicarray)

\* _class_ algopy.arc4.DynamicArray(\*items: algopy.arc4.\_TArrayItem)\*

A dynamically sized ARC-4 Array of the specified type

##### Initialization

[Section titled “Initialization”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#initialization-5)

Initializes a new array with items provided

##### \_\_add\_\_

[Section titled “\_\_add\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__add__)

\_\_\_add\_\_(other: [collections.abc.Iterable](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable)\[algopy.arc4.\_TArrayItem\]) → [algopy.arc4.DynamicArray](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.DynamicArray)\[algopy.arc4. _TArrayItem\]_

Concat two arrays together, returning a new array

##### \_\_bool\_\_

[Section titled “\_\_bool\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__bool__-4)

_\_\_bool\_\_() → [bool](https://docs.python.org/3/library/functions.html#bool)_

Returns `True` if not an empty array

##### \_\_getitem\_\_

[Section titled “\_\_getitem\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__getitem__-1)

Gets the item of the array at provided index

##### \_\_iter\_\_

[Section titled “\_\_iter\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__iter__-1)

\_\_\_iter\_\_() → [Iterator](https://docs.python.org/3/library/typing.html#typing.Iterator)\[algopy.arc4. _TArrayItem\]_

Returns an iterator for the items in the array

##### \_\_reversed\_\_

[Section titled “\_\_reversed\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__reversed__-1)

\_\_\_reversed\_\_() → [Iterator](https://docs.python.org/3/library/typing.html#typing.Iterator)\[algopy.arc4. _TArrayItem\]_

Returns an iterator for the items in the array, in reverse order

##### \_\_setitem\_\_

[Section titled “\_\_setitem\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__setitem__-1)

Sets the item of the array at specified index to provided value

##### append

[Section titled “append”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#append)

_append(item: algopy.arc4.\_TArrayItem, /) → [None](https://docs.python.org/3/library/constants.html#None)_

Append an item to this array

##### _property_ bytes \*: \[algopy.Bytes\]

[Section titled “property bytes \*: \[algopy.Bytes\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-bytes--algopybytes-5)

_property bytes : [algopy.Bytes](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Bytes)_

Get the underlying Bytes

##### copy

[Section titled “copy”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#copy-1)

_copy() → [Self](https://docs.python.org/3/library/typing.html#typing.Self)_

Create a copy of this array

##### extend

[Section titled “extend”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#extend)

\_extend(other: [collections.abc.Iterable](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable)\[algopy.arc4. _TArrayItem\], /) → [None](https://docs.python.org/3/library/constants.html#None)_

Extend this array with the contents of another array

##### _classmethod_ from\_bytes

[Section titled “classmethod from\_bytes”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_bytes-5)

Construct an instance from the underlying bytes (no validation)

##### _classmethod_ from\_log

[Section titled “classmethod from\_log”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_log-5)

Load an ABI type from application logs, checking for the ABI return prefix `0x151f7c75`

##### _property_ length \*: \[algopy.UInt64\]

[Section titled “property length \*: \[algopy.UInt64\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-length--algopyuint64-1)

_property length : [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64)_

Returns the current length of the array

##### pop

[Section titled “pop”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#pop)

_pop() → algopy.arc4.\_TArrayItem_

Remove and return the last item of this array

##### to\_native

[Section titled “to\_native”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#to_native-1)

\_to\_native(element\_type: [type](https://docs.python.org/3/library/functions.html#type)\[algopy.arc4.\_TNativeArrayItem\], /) → [algopy.Array](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Array)\[algopy.arc4. _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

##### validate

[Section titled “validate”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#validate-5)

_validate() → [None](https://docs.python.org/3/library/constants.html#None)_

Performs validation to ensure the value is well-formed, errors if it is not

#### _class_ algopy.arc4.DynamicBytes

[Section titled “class algopy.arc4.DynamicBytes”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#class-algopyarc4dynamicbytes)

A variable sized array of bytes

##### \_\_add\_\_

[Section titled “\_\_add\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__add__-1)

Concat two arrays together, returning a new array

##### \_\_bool\_\_

[Section titled “\_\_bool\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__bool__-5)

_\_\_bool\_\_() → [bool](https://docs.python.org/3/library/functions.html#bool)_

Returns `True` if not an empty array

##### \_\_getitem\_\_

[Section titled “\_\_getitem\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__getitem__-2)

Gets the item of the array at provided index

##### \_\_iter\_\_

[Section titled “\_\_iter\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__iter__-2)

\_\_\_iter\_\_() → [Iterator](https://docs.python.org/3/library/typing.html#typing.Iterator)\[algopy.arc4. _TArrayItem\]_

Returns an iterator for the items in the array

##### \_\_reversed\_\_

[Section titled “\_\_reversed\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__reversed__-2)

\_\_\_reversed\_\_() → [Iterator](https://docs.python.org/3/library/typing.html#typing.Iterator)\[algopy.arc4. _TArrayItem\]_

Returns an iterator for the items in the array, in reverse order

##### \_\_setitem\_\_

[Section titled “\_\_setitem\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__setitem__-2)

Sets the item of the array at specified index to provided value

##### append

[Section titled “append”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#append-1)

_append(item: algopy.arc4.\_TArrayItem, /) → [None](https://docs.python.org/3/library/constants.html#None)_

Append an item to this array

##### _property_ bytes \*: \[algopy.Bytes\]

[Section titled “property bytes \*: \[algopy.Bytes\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-bytes--algopybytes-6)

_property bytes : [algopy.Bytes](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Bytes)_

Get the underlying Bytes

##### copy

[Section titled “copy”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#copy-2)

_copy() → [Self](https://docs.python.org/3/library/typing.html#typing.Self)_

Create a copy of this array

##### extend

[Section titled “extend”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#extend-1)

Extend this array with the contents of another array

##### _classmethod_ from\_bytes

[Section titled “classmethod from\_bytes”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_bytes-6)

Construct an instance from the underlying bytes (no validation)

##### _classmethod_ from\_log

[Section titled “classmethod from\_log”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_log-6)

Load an ABI type from application logs, checking for the ABI return prefix `0x151f7c75`

##### _property_ length \*: \[algopy.UInt64\]

[Section titled “property length \*: \[algopy.UInt64\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-length--algopyuint64-2)

_property length : [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64)_

Returns the current length of the array

##### _property_ native \*: \[algopy.Bytes\]

[Section titled “property native \*: \[algopy.Bytes\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-native--algopybytes)

_property native : [algopy.Bytes](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Bytes)_

Return the Bytes representation of the address after ARC-4 decoding

##### pop

[Section titled “pop”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#pop-1)

_pop() → algopy.arc4.\_TArrayItem_

Remove and return the last item of this array

##### to\_native

[Section titled “to\_native”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#to_native-2)

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

##### validate

[Section titled “validate”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#validate-6)

_validate() → [None](https://docs.python.org/3/library/constants.html#None)_

Performs validation to ensure the value is well-formed, errors if it is not

#### _class_ algopy.arc4.StaticArray

[Section titled “class algopy.arc4.StaticArray”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#class-algopyarc4staticarray)

A fixed length ARC-4 Array of the specified type and length

##### \_\_getitem\_\_

[Section titled “\_\_getitem\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__getitem__-3)

Gets the item of the array at provided index

##### \_\_iter\_\_

[Section titled “\_\_iter\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__iter__-3)

\_\_\_iter\_\_() → [Iterator](https://docs.python.org/3/library/typing.html#typing.Iterator)\[algopy.arc4. _TArrayItem\]_

Returns an iterator for the items in the array

##### \_\_reversed\_\_

[Section titled “\_\_reversed\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__reversed__-3)

\_\_\_reversed\_\_() → [Iterator](https://docs.python.org/3/library/typing.html#typing.Iterator)\[algopy.arc4. _TArrayItem\]_

Returns an iterator for the items in the array, in reverse order

##### \_\_setitem\_\_

[Section titled “\_\_setitem\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__setitem__-3)

Sets the item of the array at specified index to provided value

##### _property_ bytes \*: \[algopy.Bytes\]

[Section titled “property bytes \*: \[algopy.Bytes\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-bytes--algopybytes-7)

_property bytes : [algopy.Bytes](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Bytes)_

Get the underlying Bytes

##### copy

[Section titled “copy”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#copy-3)

_copy() → [Self](https://docs.python.org/3/library/typing.html#typing.Self)_

Create a copy of this array

##### _classmethod_ from\_bytes

[Section titled “classmethod from\_bytes”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_bytes-7)

Construct an instance from the underlying bytes (no validation)

##### _classmethod_ from\_log

[Section titled “classmethod from\_log”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_log-7)

Load an ABI type from application logs, checking for the ABI return prefix `0x151f7c75`

##### _property_ length \*: \[algopy.UInt64\]

[Section titled “property length \*: \[algopy.UInt64\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-length--algopyuint64-3)

_property length : [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64)_

Returns the (compile-time) length of the array

##### to\_native

[Section titled “to\_native”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#to_native-3)

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

##### validate

[Section titled “validate”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#validate-7)

_validate() → [None](https://docs.python.org/3/library/constants.html#None)_

Performs validation to ensure the value is well-formed, errors if it is not

#### _class_ algopy.arc4.String

[Section titled “class algopy.arc4.String”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#class-algopyarc4string)

\* _class_ algopy.arc4.String(value: [algopy.String](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.String) \| [str](https://docs.python.org/3/library/stdtypes.html#str) = ”, /)\*

An ARC-4 sequence of bytes containing a UTF8 string

##### Initialization

[Section titled “Initialization”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#initialization-6)

##### \_\_bool\_\_

[Section titled “\_\_bool\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__bool__-6)

_\_\_bool\_\_() → [bool](https://docs.python.org/3/library/functions.html#bool)_

Returns `True` if length is not zero

##### \_\_eq\_\_

[Section titled “\_\_eq\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__eq__-5)

_\_\_eq\_\_(other: [algopy.arc4.String](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.String) \| [algopy.String](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.String) \| [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool)_

Return self==value.

##### _property_ bytes \*: \[algopy.Bytes\]

[Section titled “property bytes \*: \[algopy.Bytes\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-bytes--algopybytes-8)

_property bytes : [algopy.Bytes](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Bytes)_

Get the underlying Bytes

##### _classmethod_ from\_bytes

[Section titled “classmethod from\_bytes”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_bytes-8)

Construct an instance from the underlying bytes (no validation)

##### _classmethod_ from\_log

[Section titled “classmethod from\_log”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_log-8)

Load an ABI type from application logs, checking for the ABI return prefix `0x151f7c75`

##### _property_ native \*: \[algopy.String\]

[Section titled “property native \*: \[algopy.String\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-native--algopystring)

_property native : [algopy.String](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.String)_

Return the String representation of the UTF8 string after ARC-4 decoding

##### validate

[Section titled “validate”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#validate-8)

_validate() → [None](https://docs.python.org/3/library/constants.html#None)_

Performs validation to ensure the value is well-formed, errors if it is not

#### _class_ algopy.arc4.Struct

[Section titled “class algopy.arc4.Struct”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#class-algopyarc4struct)

Base class for ARC-4 Struct types

##### \_replace

[Section titled “\_replace”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#_replace)

_\_replace(\*\*kwargs: [Any](https://docs.python.org/3/library/typing.html#typing.Any)) → [Self](https://docs.python.org/3/library/typing.html#typing.Self)_

Return a new instance of the struct replacing specified fields with new values.

Note that any mutable fields must be explicitly copied to avoid aliasing.

##### _property_ bytes \*: \[algopy.Bytes\]

[Section titled “property bytes \*: \[algopy.Bytes\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-bytes--algopybytes-9)

_property bytes : [algopy.Bytes](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Bytes)_

Get the underlying bytes\[\]

##### copy

[Section titled “copy”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#copy-4)

_copy() → [Self](https://docs.python.org/3/library/typing.html#typing.Self)_

Create a copy of this struct

##### _classmethod_ from\_bytes

[Section titled “classmethod from\_bytes”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_bytes-9)

Construct an instance from the underlying bytes\[\] (no validation)

##### _classmethod_ from\_log

[Section titled “classmethod from\_log”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_log-9)

Load an ABI type from application logs, checking for the ABI return prefix `0x151f7c75`

##### validate

[Section titled “validate”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#validate-9)

_validate() → [None](https://docs.python.org/3/library/constants.html#None)_

Performs validation to ensure the value is well-formed, errors if it is not

#### _class_ algopy.arc4.Tuple

[Section titled “class algopy.arc4.Tuple”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#class-algopyarc4tuple)

\* _class_ algopy.arc4.Tuple(items: [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[ [Unpack](https://docs.python.org/3/library/typing.html#typing.Unpack)\[algopy.arc4.\_TTuple\]\], /)\*

An ARC-4 ABI tuple, containing other ARC-4 ABI types

##### Initialization

[Section titled “Initialization”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#initialization-7)

Construct an ARC-4 tuple from a native Python tuple

##### \_\_add\_\_

[Section titled “\_\_add\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__add__-2)

_\_\_add\_\_()_

Return self+value.

##### \_\_contains\_\_

[Section titled “\_\_contains\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__contains__)

_\_\_contains\_\_()_

Return bool(key in self).

##### \_\_delattr\_\_

[Section titled “\_\_delattr\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__delattr__)

_\_\_delattr\_\_()_

Implement delattr(self, name).

##### \_\_dir\_\_

[Section titled “\_\_dir\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__dir__)

_\_\_dir\_\_()_

Default dir() implementation.

##### \_\_eq\_\_

[Section titled “\_\_eq\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__eq__-6)

_\_\_eq\_\_()_

Return self==value.

##### \_\_format\_\_

[Section titled “\_\_format\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__format__)

_\_\_format\_\_()_

Default object formatter.

Return str(self) if format\_spec is empty. Raise TypeError otherwise.

##### \_\_ge\_\_

[Section titled “\_\_ge\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__ge__-2)

_\_\_ge\_\_()_

Return self>=value.

##### \_\_getattribute\_\_

[Section titled “\_\_getattribute\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__getattribute__)

_\_\_getattribute\_\_()_

Return getattr(self, name).

##### \_\_getitem\_\_

[Section titled “\_\_getitem\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__getitem__-4)

_\_\_getitem\_\_()_

Return self\[key\].

##### \_\_getstate\_\_

[Section titled “\_\_getstate\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__getstate__)

_\_\_getstate\_\_()_

Helper for pickle.

##### \_\_gt\_\_

[Section titled “\_\_gt\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__gt__-2)

_\_\_gt\_\_()_

Return self>value.

##### \_\_hash\_\_

[Section titled “\_\_hash\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__hash__)

_\_\_hash\_\_()_

Return hash(self).

##### \_\_iter\_\_

[Section titled “\_\_iter\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__iter__-4)

_\_\_iter\_\_()_

Implement iter(self).

##### \_\_le\_\_

[Section titled “\_\_le\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__le__-2)

_\_\_le\_\_()_

Return self<=value.

##### \_\_len\_\_

[Section titled “\_\_len\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__len__)

_\_\_len\_\_()_

Return len(self).

##### \_\_lt\_\_

[Section titled “\_\_lt\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__lt__-2)

_\_\_lt\_\_()_

Return self<value.

##### \_\_mul\_\_

[Section titled “\_\_mul\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__mul__)

_\_\_mul\_\_()_

Return self\*value.

##### \_\_ne\_\_

[Section titled “\_\_ne\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__ne__-4)

_\_\_ne\_\_()_

Return self!=value.

##### \_\_new\_\_

[Section titled “\_\_new\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__new__)

_\_\_new\_\_()_

Create and return a new object. See help(type) for accurate signature.

##### \_\_reduce\_\_

[Section titled “\_\_reduce\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__reduce__)

_\_\_reduce\_\_()_

Helper for pickle.

##### \_\_reduce _ex_\_

[Section titled “\_\_reduceex\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__reduceex_)

_\_\_reduceex\_()_

Helper for pickle.

##### \_\_repr\_\_

[Section titled “\_\_repr\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__repr__)

_\_\_repr\_\_()_

Return repr(self).

##### \_\_rmul\_\_

[Section titled “\_\_rmul\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__rmul__)

_\_\_rmul\_\_()_

Return value\*self.

##### \_\_setattr\_\_

[Section titled “\_\_setattr\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__setattr__)

_\_\_setattr\_\_()_

Implement setattr(self, name, value).

##### \_\_sizeof\_\_

[Section titled “\_\_sizeof\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__sizeof__)

_\_\_sizeof\_\_()_

Size of object in memory, in bytes.

##### \_\_str\_\_

[Section titled “\_\_str\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__str__)

_\_\_str\_\_()_

Return str(self).

##### _property_ bytes \*: \[algopy.Bytes\]

[Section titled “property bytes \*: \[algopy.Bytes\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-bytes--algopybytes-10)

_property bytes : [algopy.Bytes](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Bytes)_

Get the underlying Bytes

##### copy

[Section titled “copy”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#copy-5)

_copy() → [Self](https://docs.python.org/3/library/typing.html#typing.Self)_

Create a copy of this tuple

##### count

[Section titled “count”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#count)

_count()_

Return number of occurrences of value.

##### _classmethod_ from\_bytes

[Section titled “classmethod from\_bytes”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_bytes-10)

Construct an instance from the underlying bytes (no validation)

##### _classmethod_ from\_log

[Section titled “classmethod from\_log”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_log-10)

Load an ABI type from application logs, checking for the ABI return prefix `0x151f7c75`

##### index

[Section titled “index”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#index)

_index()_

Return first index of value.

Raises ValueError if the value is not present.

##### _property_ native \*: \[tuple\]

[Section titled “property native \*: \[tuple\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-native--tuple)

_property native : [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[ [Unpack](https://docs.python.org/3/library/typing.html#typing.Unpack)\[algopy.arc4.\_TTuple\]\]_

Convert to a native Python tuple - note that the elements of the tuple
should be considered to be copies of the original elements

##### validate

[Section titled “validate”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#validate-10)

_validate() → [None](https://docs.python.org/3/library/constants.html#None)_

Performs validation to ensure the value is well-formed, errors if it is not

#### _class_ algopy.arc4.UFixedNxM

[Section titled “class algopy.arc4.UFixedNxM”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#class-algopyarc4ufixednxm)

\* _class_ algopy.arc4.UFixedNxM(value: [str](https://docs.python.org/3/library/stdtypes.html#str) = ‘0.0’, /)\*

An ARC-4 UFixed representing a decimal with the number of bits and precision specified.

Max size: 64 bits

##### Initialization

[Section titled “Initialization”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#initialization-8)

Construct an instance of UFixedNxM where value (v) is determined from the original
decimal value (d) by the formula v = round(d \* (10^M))

##### \_\_bool\_\_

[Section titled “\_\_bool\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__bool__-7)

_\_\_bool\_\_() → [bool](https://docs.python.org/3/library/functions.html#bool)_

Returns `True` if not equal to zero

##### \_\_eq\_\_

[Section titled “\_\_eq\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__eq__-7)

_\_\_eq\_\_(other: [Self](https://docs.python.org/3/library/typing.html#typing.Self)) → [bool](https://docs.python.org/3/library/functions.html#bool)_

Compare for equality, note both operands must be the exact same type

##### _property_ bytes \*: \[algopy.Bytes\]

[Section titled “property bytes \*: \[algopy.Bytes\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-bytes--algopybytes-11)

_property bytes : [algopy.Bytes](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Bytes)_

Get the underlying Bytes

##### _classmethod_ from\_bytes

[Section titled “classmethod from\_bytes”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_bytes-11)

Construct an instance from the underlying bytes (no validation)

##### _classmethod_ from\_log

[Section titled “classmethod from\_log”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_log-11)

Load an ABI type from application logs, checking for the ABI return prefix `0x151f7c75`

##### validate

[Section titled “validate”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#validate-11)

_validate() → [None](https://docs.python.org/3/library/constants.html#None)_

Performs validation to ensure the value is well-formed, errors if it is not

##### algopy.arc4.UInt128 \*: \[TypeAlias\]

[Section titled “algopy.arc4.UInt128 \*: \[TypeAlias\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopyarc4uint128--typealias)

\_algopy.arc4.UInt128 \_: [TypeAlias](https://docs.python.org/3/library/typing.html#typing.TypeAlias)\*\*

None

An ARC-4 UInt128

##### algopy.arc4.UInt16 \*: \[TypeAlias\]

[Section titled “algopy.arc4.UInt16 \*: \[TypeAlias\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopyarc4uint16--typealias)

\_algopy.arc4.UInt16 \_: [TypeAlias](https://docs.python.org/3/library/typing.html#typing.TypeAlias)\*\*

None

An ARC-4 UInt16

##### algopy.arc4.UInt256 \*: \[TypeAlias\]

[Section titled “algopy.arc4.UInt256 \*: \[TypeAlias\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopyarc4uint256--typealias)

\_algopy.arc4.UInt256 \_: [TypeAlias](https://docs.python.org/3/library/typing.html#typing.TypeAlias)\*\*

None

An ARC-4 UInt256

##### algopy.arc4.UInt32 \*: \[TypeAlias\]

[Section titled “algopy.arc4.UInt32 \*: \[TypeAlias\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopyarc4uint32--typealias)

\_algopy.arc4.UInt32 \_: [TypeAlias](https://docs.python.org/3/library/typing.html#typing.TypeAlias)\*\*

None

An ARC-4 UInt32

##### algopy.arc4.UInt512 \*: \[TypeAlias\]

[Section titled “algopy.arc4.UInt512 \*: \[TypeAlias\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopyarc4uint512--typealias)

\_algopy.arc4.UInt512 \_: [TypeAlias](https://docs.python.org/3/library/typing.html#typing.TypeAlias)\*\*

None

An ARC-4 UInt512

##### algopy.arc4.UInt64 \*: \[TypeAlias\]

[Section titled “algopy.arc4.UInt64 \*: \[TypeAlias\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopyarc4uint64--typealias)

\_algopy.arc4.UInt64 \_: [TypeAlias](https://docs.python.org/3/library/typing.html#typing.TypeAlias)\*\*

None

An ARC-4 UInt64

##### algopy.arc4.UInt8 \*: \[TypeAlias\]

[Section titled “algopy.arc4.UInt8 \*: \[TypeAlias\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopyarc4uint8--typealias)

\_algopy.arc4.UInt8 \_: [TypeAlias](https://docs.python.org/3/library/typing.html#typing.TypeAlias)\*\*

None

An ARC-4 UInt8

#### _class_ algopy.arc4.UIntN

[Section titled “class algopy.arc4.UIntN”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#class-algopyarc4uintn)

\* _class_ algopy.arc4.UIntN(value: [algopy.BigUInt](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.BigUInt) \| [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64) \| [int](https://docs.python.org/3/library/functions.html#int) = 0, /)\*

An ARC-4 UInt consisting of the number of bits specified.

Max Size: 64 bits

##### Initialization

[Section titled “Initialization”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#initialization-9)

##### \_\_bool\_\_

[Section titled “\_\_bool\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__bool__-8)

_\_\_bool\_\_() → [bool](https://docs.python.org/3/library/functions.html#bool)_

Returns `True` if not equal to zero

##### \_\_eq\_\_

[Section titled “\_\_eq\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__eq__-8)

Return self==value.

##### \_\_ge\_\_

[Section titled “\_\_ge\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__ge__-3)

Return self>=value.

##### \_\_gt\_\_

[Section titled “\_\_gt\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__gt__-3)

Return self>value.

##### \_\_le\_\_

[Section titled “\_\_le\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__le__-3)

Return self<=value.

##### \_\_lt\_\_

[Section titled “\_\_lt\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__lt__-3)

Return self<value.

##### \_\_ne\_\_

[Section titled “\_\_ne\_\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#__ne__-5)

Return self!=value.

##### as\_biguint

[Section titled “as\_biguint”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#as_biguint-2)

_as\_biguint() → [algopy.BigUInt](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.BigUInt)_

Return the BigUInt representation of the value after ARC-4 decoding

##### as\_uint64

[Section titled “as\_uint64”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#as_uint64-2)

_as\_uint64() → [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64)_

Return the UInt64 representation of the value after ARC-4 decoding

##### _property_ bytes \*: \[algopy.Bytes\]

[Section titled “property bytes \*: \[algopy.Bytes\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-bytes--algopybytes-12)

_property bytes : [algopy.Bytes](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Bytes)_

Get the underlying Bytes

##### _classmethod_ from\_bytes

[Section titled “classmethod from\_bytes”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_bytes-12)

Construct an instance from the underlying bytes (no validation)

##### _classmethod_ from\_log

[Section titled “classmethod from\_log”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#classmethod-from_log-12)

Load an ABI type from application logs, checking for the ABI return prefix `0x151f7c75`

##### _property_ native \*: \[algopy.UInt64\]

[Section titled “property native \*: \[algopy.UInt64\]”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#property-native--algopyuint64-1)

_property native : [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64)_

Return the UInt64 representation of the value after ARC-4 decoding

##### validate

[Section titled “validate”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#validate-12)

_validate() → [None](https://docs.python.org/3/library/constants.html#None)_

Performs validation to ensure the value is well-formed, errors if it is not

##### algopy.arc4.abi\*call \*: algopy.arc4.\_ABICallProtocolType\_

[Section titled “algopy.arc4.abi\*call \*: algopy.arc4.\_ABICallProtocolType\_”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopyarc4abicall--algopyarc4_abicallprotocoltype_)

Ellipsis

Provides a typesafe way of calling ARC-4 methods via an inner transaction

```
def abi_call(

self,

method: Callable[..., _TABIResult_co] | str,

/,

*args: object,

app_id: algopy.Application | algopy.UInt64 | int = ...,

on_completion: algopy.OnCompleteAction = ...,

approval_program: algopy.Bytes | bytes | tuple[algopy.Bytes, ...] = ...,

clear_state_program: algopy.Bytes | bytes | tuple[algopy.Bytes, ...] = ...,

global_num_uint: UInt64 | int = ...,

global_num_bytes: UInt64 | int = ...,

local_num_uint: UInt64 | int = ...,

local_num_bytes: UInt64 | int = ...,

extra_program_pages: UInt64 | int = ...,

fee: algopy.UInt64 | int = 0,

sender: algopy.Account | str = ...,

note: algopy.Bytes | algopy.String | bytes | str = ...,

rekey_to: algopy.Account | str = ...,

) -> tuple[_TABIResult_co, algopy.itxn.ApplicationCallInnerTransaction]: ...
```

PARAMETERS:

**method:** The name, method selector or Algorand Python method to call

\\\
**app\_id:** Application to call, if 0 or not specified will create a new application

\\\
**on\_completion:** OnCompleteAction value for the transaction. If not specified will be inferred from Algorand Python method where possible

\\\
**approval\_program:** When creating or updating an application, the approval program

\\\
**clear\_state\_program:** When creating or updating an application, the clear state program

\\\
**global\_num\_uint:** When creating an application the number of global uints

\\\
**global\_num\_bytes:** When creating an application the number of global bytes

\\\
**local\_num\_uint:** When creating an application the number of local uints

\\\
**local\_num\_bytes:** When creating an application the number of local bytes

\\\
**extra\_program\_pages:** When creating an application the The number of extra program pages

\\\
**fee:** The fee to pay for the transaction, defaults to 0

\\\
**sender:** The sender address for the transaction

\\\
**note:** Note to include with the transaction

\\\
**rekey\_to:** Account to rekey to

RETURNS:

\\\
If `method` references an Algorand Contract / Client or the function is indexed with a return type,
then the result is a tuple containing the ABI result and the inner transaction of the call.

If no return type is specified, or the method does not have a return value then the result
is the inner transaction of the call.

Examples:

```
# can reference another algopy contract method

result, txn = abi_call(HelloWorldContract.hello, arc4.String("World"), app=...)

assert result == "Hello, World"

# can reference a method selector

result, txn = abi_call[arc4.String](docs/_build/markdown/"hello(string)string", arc4.String("Algo"), app=...)

assert result == "Hello, Algo"

# can reference a method name, the method selector is inferred from arguments and return type

result, txn = abi_call[arc4.String](docs/_build/markdown/"hello", "There", app=...)

assert result == "Hello, There"

# calling a method without a return value

txn = abi_call(HelloWorldContract.no_return, arc4.String("World"), app=...)
```

##### algopy.arc4.abimethod

[Section titled “algopy.arc4.abimethod”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopyarc4abimethod)

\_algopy.arc4.abimethod(\*, name: [str](https://docs.python.org/3/library/stdtypes.html#str) = …, create: [Literal](https://docs.python.org/3/library/typing.html#typing.Literal)\[allow, require, disallow\] = ‘disallow’, allow\_actions: [collections.abc.Sequence](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)\[ [algopy.OnCompleteAction](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.OnCompleteAction) \| [Literal](https://docs.python.org/3/library/typing.html#typing.Literal)\[NoOp, OptIn, CloseOut, UpdateApplication, DeleteApplication\]\] = (‘NoOp’,), resource\_encoding: [Literal](https://docs.python.org/3/library/typing.html#typing.Literal)\[index, value\] = …, readonly: [bool](https://docs.python.org/3/library/functions.html#bool) = False, default\_args: [collections.abc.Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping)\[ [str](https://docs.python.org/3/library/stdtypes.html#str), [str](https://docs.python.org/3/library/stdtypes.html#str) \| algopy.arc4.\_ReadOnlyNoArgsMethod \| [object](https://docs.python.org/3/library/functions.html#object)\] = …, validate\_encoding: [Literal](https://docs.python.org/3/library/typing.html#typing.Literal)\[unsafe\_disabled, args\] = …) → [collections.abc.Callable](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)\[\[ [collections.abc.Callable](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)\[algopy.arc4.\_P, algopy.arc4.\_R\]\], [collections.abc.Callable](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)\[algopy.arc4.\_P, algopy.arc4. _R\]\]_

Decorator that indicates a method is an ARC-4 ABI method.

- **Parameters:**
  - **name** – Name component of the ABI method selector. Defaults to using the function name.
  - **create** – Controls the validation of the Application ID. “require” means it must be zero,
    “disallow” requires it must be non-zero, and “allow” disables the validation.
  - **allow\_actions** – A sequence of allowed On-Completion Actions to validate against.
  - **resource\_encoding** – If “index”, then resource types (Application, Asset, Account)
    should be passed as an index into their appropriate foreign array.
    The default option “value”, as of PuyaPy 5.0, is for these values to be
    passed directly.
    This can be overridden at the compiler level with the
    “resource\_encoding” CLI flag.
    This option will be reflected in the method signature.
  - **readonly** – If True, then this method can be used via dry-run / simulate.
  - **default\_args** – Default argument sources for clients to use. For dynamic defaults, this can
    be the name of, or reference to a method member, or the name of a storage
    member. For static defaults, this can be any expression which evaluates to
    a compile time constant of the exact same type as the parameter.
  - **validate\_encoding** – Controls validation behaviour for this method.
    If “args”, then ABI arguments are validated automatically to ensure
    they are encoded correctly.
    If “unsafe\_disabled”, then no automatic validation occurs. Arguments
    can instead be validated using the .validate() method.
    The default behaviour of this option can be controlled with the
    –validate-abi-args CLI flag.

##### algopy.arc4.arc4\_create

[Section titled “algopy.arc4.arc4\_create”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopyarc4arc4_create)

\_algopy.arc4.arc4\_create(method: [collections.abc.Callable](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)\[algopy.arc4.\_P, algopy.arc4. _TABIResult\_co\], /, \*args: [object](https://docs.python.org/3/library/functions.html#object), compiled: [algopy.CompiledContract](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.CompiledContract) = …, on\_completion: [algopy.OnCompleteAction](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.OnCompleteAction) = …, fee: [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64) \| [int](https://docs.python.org/3/library/functions.html#int) = 0, sender: [algopy.Account](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Account) \| [str](https://docs.python.org/3/library/stdtypes.html#str) = …, note: [algopy.Bytes](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Bytes) \| [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) \| [str](https://docs.python.org/3/library/stdtypes.html#str) = …, rekey\_to: [algopy.Account](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Account) \| [str](https://docs.python.org/3/library/stdtypes.html#str) = …) → [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[algopy.arc4.\_TABIResult\_co, [algopy.itxn.ApplicationCallInnerTransaction](https://dev.algorand.co/reference/algorand-python/api/api-algopyitxn/#algopy.itxn.ApplicationCallInnerTransaction)\]_

Provides a typesafe and convenient way of creating an ARC4Contract via an inner transaction

- **Parameters:**
  - **method** – An ARC-4 create method (ABI or bare), or an ARC4Contract with a single create method
  - **args** – ABI args for chosen method
  - **compiled** – If supplied will be used to specify transaction parameters required for creation,
    can be omitted if template variables are not used
  - **on\_completion** – OnCompleteAction value for the transaction
    If not specified will be inferred from Algorand Python method where possible
  - **fee** – The fee to pay for the transaction, defaults to 0
  - **sender** – The sender address for the transaction
  - **note** – Note to include with the transaction
  - **rekey\_to** – Account to rekey to

##### algopy.arc4.arc4\_signature

[Section titled “algopy.arc4.arc4\_signature”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopyarc4arc4_signature)

\_algopy.arc4.arc4\_signature(signature: [str](https://docs.python.org/3/library/stdtypes.html#str) \| [collections.abc.Callable](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)\[algopy.arc4.\_P, algopy.arc4. _R\], /) → [algopy.Bytes](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Bytes)_

Returns the ARC-4 encoded method selector for the specified signature or abi method

##### algopy.arc4.arc4\_update

[Section titled “algopy.arc4.arc4\_update”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopyarc4arc4_update)

\_algopy.arc4.arc4\_update(method: [collections.abc.Callable](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)\[algopy.arc4.\_P, algopy.arc4. _TABIResult\_co\], /, \*args: [object](https://docs.python.org/3/library/functions.html#object), app\_id: [algopy.Application](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Application) \| [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64) \| [int](https://docs.python.org/3/library/functions.html#int), compiled: [algopy.CompiledContract](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.CompiledContract) = …, fee: [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64) \| [int](https://docs.python.org/3/library/functions.html#int) = 0, sender: [algopy.Account](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Account) \| [str](https://docs.python.org/3/library/stdtypes.html#str) = …, note: [algopy.Bytes](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Bytes) \| [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) \| [str](https://docs.python.org/3/library/stdtypes.html#str) = …, rekey\_to: [algopy.Account](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.Account) \| [str](https://docs.python.org/3/library/stdtypes.html#str) = …, reject\_version: [algopy.UInt64](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.UInt64) \| [int](https://docs.python.org/3/library/functions.html#int) = …) → [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[algopy.arc4.\_TABIResult\_co, [algopy.itxn.ApplicationCallInnerTransaction](https://dev.algorand.co/reference/algorand-python/api/api-algopyitxn/#algopy.itxn.ApplicationCallInnerTransaction)\]_

Provides a typesafe and convenient way of updating an ARC4Contract via an inner transaction

- **Parameters:**
  - **method** – An ARC-4 update method (ABI or bare), or an ARC4Contract with a single update method
  - **args** – ABI args for chosen method
  - **app\_id** – Application to update
  - **compiled** – If supplied will be used to specify transaction parameters required for updating,
    can be omitted if template variables are not used
  - **fee** – The fee to pay for the transaction, defaults to 0
  - **sender** – The sender address for the transaction
  - **note** – Note to include with the transaction
  - **rekey\_to** – Account to rekey to

##### algopy.arc4.baremethod

[Section titled “algopy.arc4.baremethod”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopyarc4baremethod)

\_algopy.arc4.baremethod(\*, create: [Literal](https://docs.python.org/3/library/typing.html#typing.Literal)\[allow, require, disallow\] = ‘disallow’, allow\_actions: [collections.abc.Sequence](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)\[ [algopy.OnCompleteAction](https://dev.algorand.co/reference/algorand-python/api/api-algopy/#algopy.OnCompleteAction) \| [Literal](https://docs.python.org/3/library/typing.html#typing.Literal)\[NoOp, OptIn, CloseOut, UpdateApplication, DeleteApplication\]\] = …) → [collections.abc.Callable](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)\[\[ [collections.abc.Callable](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)\[\[algopy.arc4.\_TARC4Contract\], [None](https://docs.python.org/3/library/constants.html#None)\]\], [collections.abc.Callable](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)\[\[algopy.arc4. _TARC4Contract\], [None](https://docs.python.org/3/library/constants.html#None)\]\]_

Decorator that indicates a method is an ARC-4 bare method.

There can be only one bare method on a contract for each given On-Completion Action.

- **Parameters:**
  - **create** – Controls the validation of the Application ID. “require” means it must be zero,
    “disallow” requires it must be non-zero, and “allow” disables the validation.
  - **allow\_actions** – Which On-Completion Action(s) to handle.

##### algopy.arc4.emit

[Section titled “algopy.arc4.emit”](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopyarc4emit)

_algopy.arc4.emit(event: [str](https://docs.python.org/3/library/stdtypes.html#str) \| [algopy.arc4.Struct](https://dev.algorand.co/reference/algorand-python/api/api-algopyarc4/#algopy.arc4.Struct), /, \*args: [object](https://docs.python.org/3/library/functions.html#object)) → [None](https://docs.python.org/3/library/constants.html#None)_

Emit an ARC-28 event for the provided event signature or name, and provided args.

- **Parameters:**
  - **event** –

Either an ARC-4 Struct, an event name, or event signature.
    - If event is an ARC-4 Struct, the event signature will be determined from the Struct name and fields
    - If event is a signature, then the following args will be typed checked to ensure they match.
    - If event is just a name, the event signature will be inferred from the name and following arguments
  - **args** – When event is a signature or name, args will be used as the event data.
    They will all be encoded as single ARC-4 Tuple

Example:

```
from algopy import ARC4Contract, arc4

class Swapped(arc4.Struct):

a: arc4.UInt64

b: arc4.UInt64

class EventEmitter(ARC4Contract):

@arc4.abimethod

def emit_swapped(self, a: arc4.UInt64, b: arc4.UInt64) -> None:

arc4.emit(Swapped(b, a))

arc4.emit("Swapped(uint64,uint64)", b, a)

arc4.emit("Swapped", b, a)
```

Ask AI

reCAPTCHA

Recaptcha requires verification.

protected by **reCAPTCHA**
