Skip to content

algokit_utils.applications.app_spec.arc32

AppSpecStateDictType defining Application Specification state entries
OnCompleteActionNameString literals representing on completion transaction types
MethodConfigDictDictionary of dict[OnCompletionActionName, CallConfig] representing allowed actions for each on completion type
DefaultArgumentTypeLiteral values describing the types of default argument sources
StateDict
CallConfigDescribes the type of calls a method can be used for based on {py:class}`algosdk.transaction.OnComplete` type
StructArgDictdict() -> new empty dictionary
DefaultArgumentDictDefaultArgument is a container for any arguments that may
MethodHintsMethodHints provides hints to the caller about how to call the method
Arc32ContractARC-0032 application specification

type AppSpecStateDict = dict[str, dict[str, dict]]

Section titled “type AppSpecStateDict = dict[str, dict[str, dict]]”

Type defining Application Specification state entries

Bases: enum.IntFlag

Describes the type of calls a method can be used for based on {py:class}`algosdk.transaction.OnComplete` type

Never handle the specified on completion type

Only handle the specified on completion type for application calls

Only handle the specified on completion type for application create calls

Handle the specified on completion type for both create and normal application calls

Bases: TypedDict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via: : d = {} for k, v in iterable:

d[k] = v

dict(

**

kwargs) -> new dictionary initialized with the name=value pairs : in the keyword argument list. For example: dict(one=1, two=2)

type OnCompleteActionName = Literal[‘no_op’, ‘opt_in’, ‘close_out’, ‘clear_state’, ‘update_application’, ‘delete_application’]

Section titled “type OnCompleteActionName = Literal[‘no_op’, ‘opt_in’, ‘close_out’, ‘clear_state’, ‘update_application’, ‘delete_application’]”

String literals representing on completion transaction types

Dictionary of dict[OnCompletionActionName, CallConfig] representing allowed actions for each on completion type

type DefaultArgumentType = Literal[‘abi-method’, ‘local-state’, ‘global-state’, ‘constant’]

Section titled “type DefaultArgumentType = Literal[‘abi-method’, ‘local-state’, ‘global-state’, ‘constant’]”

Literal values describing the types of default argument sources

Bases: TypedDict

DefaultArgument is a container for any arguments that may be resolved prior to calling some target method

data : int | str | bytes | algosdk.abi.method.MethodDict

Section titled “data : int | str | bytes | algosdk.abi.method.MethodDict”

MethodHints provides hints to the caller about how to call the method

ARC-0032 application specification

See <https://github.com/algorandfoundation/ARCs/pull/150>

global_state_schema : algosdk.transaction.StateSchema

Section titled “global_state_schema : algosdk.transaction.StateSchema”

local_state_schema : algosdk.transaction.StateSchema

Section titled “local_state_schema : algosdk.transaction.StateSchema”

to_json(indent: int | None = None) → str

Section titled “to_json(indent: int | None = None) → str”

export(directory: pathlib.Path | str | None = None) → None

Section titled “export(directory: pathlib.Path | str | None = None) → None”

Write out the artifacts generated by the application to disk.

Writes the approval program, clear program, contract specification and application specification to files in the specified directory.

  • Parameters: directory – Path to the directory where the artifacts should be written. If not specified, uses the current working directory