algokit_utils.applications.app_spec.arc56¶
Classes¶
Represents a field in a struct type. |
|
Enum representing different call types for application transactions. |
|
Enum representing different create types for application transactions. |
|
Represents bare call and create actions for an application. |
|
Represents the approval and clear program bytecode. |
|
Enum representing different compiler types. |
|
Represents compiler version information. |
|
Information about the compiler used. |
|
Network-specific application information. |
|
Information about scratch space variables. |
|
Source code for approval and clear programs. |
|
Global state schema. |
|
Local state schema. |
|
Application state schema. |
|
Template variable information. |
|
Event argument information. |
|
Event information. |
|
Method actions information. |
|
Default value information for method arguments. |
|
Method argument information. |
|
Box storage requirements. |
|
Method execution recommendations. |
|
Method return information. |
|
Method information. |
|
PC offset method types. |
|
Source code location information. |
|
Storage key information. |
|
Storage map information. |
|
Storage keys for different storage types. |
|
Storage maps for different storage types. |
|
Application state information. |
|
Program source information. |
|
Source information for approval and clear programs. |
|
ARC-0056 application specification. |
Module Contents¶
- class algokit_utils.applications.app_spec.arc56.StructField¶
Represents a field in a struct type.
- name: str¶
The name of the struct field
- type: list[StructField] | str¶
The type of the struct field, either a string or list of StructFields
- static from_dict(data: dict[str, Any]) StructField ¶
- class algokit_utils.applications.app_spec.arc56.CallEnum¶
Bases:
str
,enum.Enum
Enum representing different call types for application transactions.
- CLEAR_STATE = 'ClearState'¶
- CLOSE_OUT = 'CloseOut'¶
- DELETE_APPLICATION = 'DeleteApplication'¶
- NO_OP = 'NoOp'¶
- OPT_IN = 'OptIn'¶
- UPDATE_APPLICATION = 'UpdateApplication'¶
- class algokit_utils.applications.app_spec.arc56.CreateEnum¶
Bases:
str
,enum.Enum
Enum representing different create types for application transactions.
- DELETE_APPLICATION = 'DeleteApplication'¶
- NO_OP = 'NoOp'¶
- OPT_IN = 'OptIn'¶
- class algokit_utils.applications.app_spec.arc56.BareActions¶
Represents bare call and create actions for an application.
- create: list[CreateEnum]¶
The list of allowed create actions
- static from_dict(data: dict[str, Any]) BareActions ¶
- class algokit_utils.applications.app_spec.arc56.ByteCode¶
Represents the approval and clear program bytecode.
- approval: str¶
The base64 encoded approval program bytecode
- clear: str¶
The base64 encoded clear program bytecode
- class algokit_utils.applications.app_spec.arc56.Compiler¶
Bases:
str
,enum.Enum
Enum representing different compiler types.
- ALGOD = 'algod'¶
- PUYA = 'puya'¶
- class algokit_utils.applications.app_spec.arc56.CompilerVersion¶
Represents compiler version information.
- commit_hash: str | None = None¶
The git commit hash of the compiler
- major: int | None = None¶
The major version number
- minor: int | None = None¶
The minor version number
- patch: int | None = None¶
The patch version number
- static from_dict(data: dict[str, Any]) CompilerVersion ¶
- class algokit_utils.applications.app_spec.arc56.CompilerInfo¶
Information about the compiler used.
- compiler_version: CompilerVersion¶
Version information for the compiler
- static from_dict(data: dict[str, Any]) CompilerInfo ¶
- class algokit_utils.applications.app_spec.arc56.Network¶
Network-specific application information.
- app_id: int¶
The application ID on the network
- class algokit_utils.applications.app_spec.arc56.ScratchVariables¶
Information about scratch space variables.
- slot: int¶
The scratch slot number
- type: str¶
The type of the scratch variable
- static from_dict(data: dict[str, Any]) ScratchVariables ¶
- class algokit_utils.applications.app_spec.arc56.Source¶
Source code for approval and clear programs.
- approval: str¶
The base64 encoded approval program source
- clear: str¶
The base64 encoded clear program source
- get_decoded_approval() str ¶
Get decoded approval program source.
- Returns:
Decoded approval program source code
- get_decoded_clear() str ¶
Get decoded clear program source.
- Returns:
Decoded clear program source code
- class algokit_utils.applications.app_spec.arc56.Global¶
Global state schema.
- bytes: int¶
The number of byte slices in global state
- ints: int¶
The number of integers in global state
- class algokit_utils.applications.app_spec.arc56.Local¶
Local state schema.
- bytes: int¶
The number of byte slices in local state
- ints: int¶
The number of integers in local state
- class algokit_utils.applications.app_spec.arc56.Schema¶
Application state schema.
- class algokit_utils.applications.app_spec.arc56.TemplateVariables¶
Template variable information.
- type: str¶
The type of the template variable
- value: str | None = None¶
The optional value of the template variable
- static from_dict(data: dict[str, Any]) TemplateVariables ¶
- class algokit_utils.applications.app_spec.arc56.EventArg¶
Event argument information.
- type: str¶
The type of the event argument
- desc: str | None = None¶
The optional description of the argument
- name: str | None = None¶
The optional name of the argument
- struct: str | None = None¶
The optional struct type name
- class algokit_utils.applications.app_spec.arc56.Event¶
Event information.
- name: str¶
The name of the event
- desc: str | None = None¶
The optional description of the event
- class algokit_utils.applications.app_spec.arc56.Actions¶
Method actions information.
- create: list[CreateEnum] | None = None¶
The optional list of allowed create actions
- class algokit_utils.applications.app_spec.arc56.DefaultValue¶
Default value information for method arguments.
- data: str¶
The default value data
- source: Literal['box', 'global', 'local', 'literal', 'method']¶
The source of the default value
- type: str | None = None¶
The optional type of the default value
- static from_dict(data: dict[str, Any]) DefaultValue ¶
- class algokit_utils.applications.app_spec.arc56.MethodArg¶
Method argument information.
- type: str¶
The type of the argument
- default_value: DefaultValue | None = None¶
The optional default value
- desc: str | None = None¶
The optional description
- name: str | None = None¶
The optional name
- struct: str | None = None¶
The optional struct type name
- class algokit_utils.applications.app_spec.arc56.Boxes¶
Box storage requirements.
- key: str¶
The box key
- read_bytes: int¶
The number of bytes to read
- write_bytes: int¶
The number of bytes to write
- app: int | None = None¶
The optional application ID
- class algokit_utils.applications.app_spec.arc56.Recommendations¶
Method execution recommendations.
- accounts: list[str] | None = None¶
The optional list of accounts
- apps: list[int] | None = None¶
The optional list of applications
- assets: list[int] | None = None¶
The optional list of assets
- inner_transaction_count: int | None = None¶
The optional inner transaction count
- static from_dict(data: dict[str, Any]) Recommendations ¶
- class algokit_utils.applications.app_spec.arc56.Returns¶
Method return information.
- type: str¶
The type of the return value
- desc: str | None = None¶
The optional description
- struct: str | None = None¶
The optional struct type name
- class algokit_utils.applications.app_spec.arc56.Method¶
Method information.
- name: str¶
The method name
- desc: str | None = None¶
The optional description
- readonly: bool | None = None¶
The optional readonly flag
- recommendations: Recommendations | None = None¶
The optional execution recommendations
- to_abi_method() algosdk.abi.Method ¶
Convert to ABI method.
- Raises:
ValueError – If underlying ABI method is not initialized
- Returns:
ABI method
- class algokit_utils.applications.app_spec.arc56.PcOffsetMethod¶
Bases:
str
,enum.Enum
PC offset method types.
- CBLOCKS = 'cblocks'¶
- NONE = 'none'¶
- class algokit_utils.applications.app_spec.arc56.SourceInfo¶
Source code location information.
- pc: list[int]¶
The list of program counter values
- error_message: str | None = None¶
The optional error message
- source: str | None = None¶
The optional source code
- teal: int | None = None¶
The optional TEAL version
- static from_dict(data: dict[str, Any]) SourceInfo ¶
- class algokit_utils.applications.app_spec.arc56.StorageKey¶
Storage key information.
- key: str¶
The storage key
- key_type: str¶
The type of the key
- value_type: str¶
The type of the value
- desc: str | None = None¶
The optional description
- static from_dict(data: dict[str, Any]) StorageKey ¶
- class algokit_utils.applications.app_spec.arc56.StorageMap¶
Storage map information.
- key_type: str¶
The type of the map keys
- value_type: str¶
The type of the map values
- desc: str | None = None¶
The optional description
- prefix: str | None = None¶
The optional key prefix
- static from_dict(data: dict[str, Any]) StorageMap ¶
- class algokit_utils.applications.app_spec.arc56.Keys¶
Storage keys for different storage types.
- box: dict[str, StorageKey]¶
The box storage keys
- global_state: dict[str, StorageKey]¶
The global state storage keys
- local_state: dict[str, StorageKey]¶
The local state storage keys
- class algokit_utils.applications.app_spec.arc56.Maps¶
Storage maps for different storage types.
- box: dict[str, StorageMap]¶
The box storage maps
- global_state: dict[str, StorageMap]¶
The global state storage maps
- local_state: dict[str, StorageMap]¶
The local state storage maps
- class algokit_utils.applications.app_spec.arc56.State¶
Application state information.
- class algokit_utils.applications.app_spec.arc56.ProgramSourceInfo¶
Program source information.
- pc_offset_method: PcOffsetMethod¶
The PC offset method
- source_info: list[SourceInfo]¶
The list of source info entries
- static from_dict(data: dict[str, Any]) ProgramSourceInfo ¶
- class algokit_utils.applications.app_spec.arc56.SourceInfoModel¶
Source information for approval and clear programs.
- approval: ProgramSourceInfo¶
The approval program source info
- clear: ProgramSourceInfo¶
The clear program source info
- static from_dict(data: dict[str, Any]) SourceInfoModel ¶
- class algokit_utils.applications.app_spec.arc56.Arc56Contract¶
ARC-0056 application specification.
See https://github.com/algorandfoundation/ARCs/blob/main/ARCs/arc-0056.md
- arcs: list[int]¶
The list of supported ARC version numbers
- bare_actions: BareActions¶
The bare call and create actions
- name: str¶
The contract name
- structs: dict[str, list[StructField]]¶
The contract struct definitions
- compiler_info: CompilerInfo | None = None¶
The optional compiler information
- desc: str | None = None¶
The optional contract description
- scratch_variables: dict[str, ScratchVariables] | None = None¶
The optional scratch variable information
- source_info: SourceInfoModel | None = None¶
The optional source code information
- template_variables: dict[str, TemplateVariables] | None = None¶
The optional template variable information
- static from_dict(application_spec: dict) Arc56Contract ¶
Create Arc56Contract from dictionary.
- Parameters:
application_spec – Dictionary containing contract specification
- Returns:
Arc56Contract instance
- static from_json(application_spec: str) Arc56Contract ¶
- static from_arc32(arc32_application_spec: str | algokit_utils.applications.app_spec.arc32.Arc32Contract) Arc56Contract ¶
- static get_abi_struct_from_abi_tuple(decoded_tuple: Any, struct_fields: list[StructField], structs: dict[str, list[StructField]]) dict[str, Any] ¶
- to_json(indent: int | None = None) str ¶
- dictify() dict ¶