Skip to content

algokit_utils.applications.abi

ABIValue
ABIStruct
Arc56ReturnValueType
ABIType
ABIArgumentType
ABIReturnRepresents the return value from an ABI method call.
ABIResultDeprecated wrapper that previously carried tx context plus ABI data.
BoxABIValueRepresents an ABI value stored in a box.
extract_abi_return_from_logs(→ ABIReturn)Decode ABI return value from a transaction confirmation log.
parse_abi_method_result(→ ABIResult)Deprecated: use extract_abi_return_from_logs instead.
get_arc56_value(→ Arc56ReturnValueType)Deprecated: use ABIReturn.value instead.
get_abi_encoded_value(→ bytes)Encodes a value according to its ABI type.
get_abi_decoded_value(→ ABIValue)Decodes a value according to its ABI type.

type ABIValue = bool | int | str | bytes | bytearray | list[‘ABIValue’] | tuple[‘ABIValue’] | dict[str, ‘ABIValue’] | object

Section titled “type ABIValue = bool | int | str | bytes | bytearray | list[‘ABIValue’] | tuple[‘ABIValue’] | dict[str, ‘ABIValue’] | object”

type ABIStruct = dict[str, list[dict[str, ‘ABIValue’]]] | object

Section titled “type ABIStruct = dict[str, list[dict[str, ‘ABIValue’]]] | object”

type Arc56ReturnValueType = ABIValue | ABIStruct | None

Section titled “type Arc56ReturnValueType = ABIValue | ABIStruct | None”

type ABIArgumentType = abi.ABIType | arc56.TransactionType | arc56.ReferenceType

Section titled “type ABIArgumentType = abi.ABIType | arc56.TransactionType | arc56.ReferenceType”

class ABIReturn(*, method: Arc56Method | None, raw_value: bytes = b”, value: ABIValue | None = None, decode_error: Exception | None = None, tx_info: ConfirmationResponse | None = None)

Section titled “class ABIReturn(*, method: Arc56Method | None, raw_value: bytes = b”, value: ABIValue | None = None, decode_error: Exception | None = None, tx_info: ConfirmationResponse | None = None)”

Represents the return value from an ABI method call.

Aligns with the Rust model: always carries the method, raw bytes, decoded value (if available), and any decode error. Transaction context should live on the send result, not here.

Returns True if the ABI call was decoded successfully.

property tx_info : ConfirmationResponse | None

Section titled “property tx_info : ConfirmationResponse | None”

Deprecated: transaction info now lives on the send result.

get_arc56_value(method: Method, structs: dict[str, object] | None = None) → Arc56ReturnValueType

Section titled “get_arc56_value(method: Method, structs: dict[str, object] | None = None) → Arc56ReturnValueType”

Deprecated: use value directly.

class ABIResult(*, tx_id: str | None = None, raw_value: bytes = b”, value: ABIValue | None = None, decode_error: Exception | None = None, tx_info: ConfirmationResponse | None = None, method: Arc56Method | None = None)

Section titled “class ABIResult(*, tx_id: str | None = None, raw_value: bytes = b”, value: ABIValue | None = None, decode_error: Exception | None = None, tx_info: ConfirmationResponse | None = None, method: Arc56Method | None = None)”

Bases: ABIReturn

Deprecated wrapper that previously carried tx context plus ABI data.

extract_abi_return_from_logs(confirmation: ConfirmationResponse, method: Arc56Method) → ABIReturn

Section titled “extract_abi_return_from_logs(confirmation: ConfirmationResponse, method: Arc56Method) → ABIReturn”

Decode ABI return value from a transaction confirmation log.

parse_abi_method_result(method: Arc56Method, tx_id: str, txn: ConfirmationResponse) → ABIResult

Section titled “parse_abi_method_result(method: Arc56Method, tx_id: str, txn: ConfirmationResponse) → ABIResult”

Deprecated: use extract_abi_return_from_logs instead.

get_arc56_value(abi_return: ABIReturn, method: Method, structs: dict[str, object] | None = None) → Arc56ReturnValueType

Section titled “get_arc56_value(abi_return: ABIReturn, method: Method, structs: dict[str, object] | None = None) → Arc56ReturnValueType”

Deprecated: use ABIReturn.value instead.

get_abi_encoded_value(value: object, abi_type: ABIType | AVMType) → bytes

Section titled “get_abi_encoded_value(value: object, abi_type: ABIType | AVMType) → bytes”

Encodes a value according to its ABI type.

  • Parameters:
    • value – The value to encode
    • abi_type – The ABI or AVM type
  • Returns: The ABI encoded bytes

get_abi_decoded_value(value: bytes | int | str, decode_type: AVMType | ABIType | ReferenceType) → ABIValue

Section titled “get_abi_decoded_value(value: bytes | int | str, decode_type: AVMType | ABIType | ReferenceType) → ABIValue”

Decodes a value according to its ABI type.

  • Parameters:
    • value – The value to decode
    • decode_type – The ABI type string or type object
  • Returns: The decoded ABI value

Represents an ABI value stored in a box.

The name of the box

The ABI value stored in the box