applications.app_spec.arc56
Classes
Section titled “Classes”StructField | Represents a field in a struct type. |
|---|---|
CallEnum | Enum representing different call types for application transactions. |
CreateEnum | Enum representing different create types for application transactions. |
BareActions | Represents bare call and create actions for an application. |
ByteCode | Represents the approval and clear program bytecode. |
Compiler | Enum representing different compiler types. |
CompilerVersion | Represents compiler version information. |
CompilerInfo | Information about the compiler used. |
Network | Network-specific application information. |
ScratchVariables | Information about scratch space variables. |
Source | Source code for approval and clear programs. |
Global | Global state schema. |
Local | Local state schema. |
Schema | Application state schema. |
TemplateVariables | Template variable information. |
EventArg | Event argument information. |
Event | Event information. |
Actions | Method actions information. |
DefaultValue | Default value information for method arguments. |
MethodArg | Method argument information. |
Boxes | Box storage requirements. |
Recommendations | Method execution recommendations. |
Returns | Method return information. |
Method | Method information. |
PcOffsetMethod | PC offset method types. |
SourceInfo | Source code location information. |
StorageKey | Storage key information. |
StorageMap | Storage map information. |
Keys | Storage keys for different storage types. |
Maps | Storage maps for different storage types. |
State | Application state information. |
ProgramSourceInfo | Program source information. |
SourceInfoModel | Source information for approval and clear programs. |
Arc56Contract | ARC-0056 application specification. |
Module Contents
Section titled “Module Contents”class algokit_utils.applications.app_spec.arc56.StructField
Section titled “class algokit_utils.applications.app_spec.arc56.StructField”Represents a field in a struct type.
name : str
Section titled “name : str”The name of the struct field
type : list[StructField] | str
Section titled “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
Section titled “static from_dict(data: dict[str, Any]) → StructField”class algokit_utils.applications.app_spec.arc56.CallEnum
Section titled “class algokit_utils.applications.app_spec.arc56.CallEnum”Bases: str, enum.Enum
Enum representing different call types for application transactions.
CLEAR*STATE *= ‘ClearState’_
Section titled “CLEAR*STATE *= ‘ClearState’_”CLOSE*OUT *= ‘CloseOut’_
Section titled “CLOSE*OUT *= ‘CloseOut’_”DELETE*APPLICATION *= ‘DeleteApplication’_
Section titled “DELETE*APPLICATION *= ‘DeleteApplication’_”NO*OP *= ‘NoOp’_
Section titled “NO*OP *= ‘NoOp’_”OPT*IN *= ‘OptIn’_
Section titled “OPT*IN *= ‘OptIn’_”UPDATE*APPLICATION *= ‘UpdateApplication’_
Section titled “UPDATE*APPLICATION *= ‘UpdateApplication’_”class algokit_utils.applications.app_spec.arc56.CreateEnum
Section titled “class algokit_utils.applications.app_spec.arc56.CreateEnum”Bases: str, enum.Enum
Enum representing different create types for application transactions.
DELETE*APPLICATION *= ‘DeleteApplication’_
Section titled “DELETE*APPLICATION *= ‘DeleteApplication’_”NO*OP *= ‘NoOp’_
Section titled “NO*OP *= ‘NoOp’_”OPT*IN *= ‘OptIn’_
Section titled “OPT*IN *= ‘OptIn’_”class algokit_utils.applications.app_spec.arc56.BareActions
Section titled “class algokit_utils.applications.app_spec.arc56.BareActions”Represents bare call and create actions for an application.
call : list[CallEnum]
Section titled “call : list[CallEnum]”The list of allowed call actions
create : list[CreateEnum]
Section titled “create : list[CreateEnum]”The list of allowed create actions
static from_dict(data: dict[str, Any]) → BareActions
Section titled “static from_dict(data: dict[str, Any]) → BareActions”class algokit_utils.applications.app_spec.arc56.ByteCode
Section titled “class algokit_utils.applications.app_spec.arc56.ByteCode”Represents the approval and clear program bytecode.
approval : str
Section titled “approval : str”The base64 encoded approval program bytecode
clear : str
Section titled “clear : str”The base64 encoded clear program bytecode
static from_dict(data: dict[str, Any]) → ByteCode
Section titled “static from_dict(data: dict[str, Any]) → ByteCode”class algokit_utils.applications.app_spec.arc56.Compiler
Section titled “class algokit_utils.applications.app_spec.arc56.Compiler”Bases: str, enum.Enum
Enum representing different compiler types.
ALGOD = ‘algod’
Section titled “ALGOD = ‘algod’”PUYA = ‘puya’
Section titled “PUYA = ‘puya’”class algokit_utils.applications.app_spec.arc56.CompilerVersion
Section titled “class algokit_utils.applications.app_spec.arc56.CompilerVersion”Represents compiler version information.
commit*hash *: str | None_ = None
Section titled “commit*hash *: str | None_ = None”The git commit hash of the compiler
major : int | None = None
Section titled “major : int | None = None”The major version number
minor : int | None = None
Section titled “minor : int | None = None”The minor version number
patch : int | None = None
Section titled “patch : int | None = None”The patch version number
static from_dict(data: dict[str, Any]) → CompilerVersion
Section titled “static from_dict(data: dict[str, Any]) → CompilerVersion”class algokit_utils.applications.app_spec.arc56.CompilerInfo
Section titled “class algokit_utils.applications.app_spec.arc56.CompilerInfo”Information about the compiler used.
compiler : Compiler
Section titled “compiler : Compiler”The type of compiler used
compiler*version *: CompilerVersion_
Section titled “compiler*version *: CompilerVersion_”Version information for the compiler
static from_dict(data: dict[str, Any]) → CompilerInfo
Section titled “static from_dict(data: dict[str, Any]) → CompilerInfo”class algokit_utils.applications.app_spec.arc56.Network
Section titled “class algokit_utils.applications.app_spec.arc56.Network”Network-specific application information.
app*id *: int_
Section titled “app*id *: int_”The application ID on the network
static from_dict(data: dict[str, Any]) → Network
Section titled “static from_dict(data: dict[str, Any]) → Network”class algokit_utils.applications.app_spec.arc56.ScratchVariables
Section titled “class algokit_utils.applications.app_spec.arc56.ScratchVariables”Information about scratch space variables.
slot : int
Section titled “slot : int”The scratch slot number
type : str
Section titled “type : str”The type of the scratch variable
static from_dict(data: dict[str, Any]) → ScratchVariables
Section titled “static from_dict(data: dict[str, Any]) → ScratchVariables”class algokit_utils.applications.app_spec.arc56.Source
Section titled “class algokit_utils.applications.app_spec.arc56.Source”Source code for approval and clear programs.
approval : str
Section titled “approval : str”The base64 encoded approval program source
clear : str
Section titled “clear : str”The base64 encoded clear program source
static from_dict(data: dict[str, Any]) → Source
Section titled “static from_dict(data: dict[str, Any]) → Source”get_decoded_approval() → str
Section titled “get_decoded_approval() → str”Get decoded approval program source.
- Returns: Decoded approval program source code
get_decoded_clear() → str
Section titled “get_decoded_clear() → str”Get decoded clear program source.
- Returns: Decoded clear program source code
class algokit_utils.applications.app_spec.arc56.Global
Section titled “class algokit_utils.applications.app_spec.arc56.Global”Global state schema.
bytes : int
Section titled “bytes : int”The number of byte slices in global state
ints : int
Section titled “ints : int”The number of integers in global state
static from_dict(data: dict[str, Any]) → Global
Section titled “static from_dict(data: dict[str, Any]) → Global”class algokit_utils.applications.app_spec.arc56.Local
Section titled “class algokit_utils.applications.app_spec.arc56.Local”Local state schema.
bytes : int
Section titled “bytes : int”The number of byte slices in local state
ints : int
Section titled “ints : int”The number of integers in local state
static from_dict(data: dict[str, Any]) → Local
Section titled “static from_dict(data: dict[str, Any]) → Local”class algokit_utils.applications.app_spec.arc56.Schema
Section titled “class algokit_utils.applications.app_spec.arc56.Schema”Application state schema.
global*state *: Global_
Section titled “global*state *: Global_”The global state schema
local*state *: Local_
Section titled “local*state *: Local_”The local state schema
static from_dict(data: dict[str, Any]) → Schema
Section titled “static from_dict(data: dict[str, Any]) → Schema”class algokit_utils.applications.app_spec.arc56.TemplateVariables
Section titled “class algokit_utils.applications.app_spec.arc56.TemplateVariables”Template variable information.
type : str
Section titled “type : str”The type of the template variable
value : str | None = None
Section titled “value : str | None = None”The optional value of the template variable
static from_dict(data: dict[str, Any]) → TemplateVariables
Section titled “static from_dict(data: dict[str, Any]) → TemplateVariables”class algokit_utils.applications.app_spec.arc56.EventArg
Section titled “class algokit_utils.applications.app_spec.arc56.EventArg”Event argument information.
type : str
Section titled “type : str”The type of the event argument
desc : str | None = None
Section titled “desc : str | None = None”The optional description of the argument
name : str | None = None
Section titled “name : str | None = None”The optional name of the argument
struct : str | None = None
Section titled “struct : str | None = None”The optional struct type name
static from_dict(data: dict[str, Any]) → EventArg
Section titled “static from_dict(data: dict[str, Any]) → EventArg”class algokit_utils.applications.app_spec.arc56.Event
Section titled “class algokit_utils.applications.app_spec.arc56.Event”Event information.
args : list[EventArg]
Section titled “args : list[EventArg]”The list of event arguments
name : str
Section titled “name : str”The name of the event
desc : str | None = None
Section titled “desc : str | None = None”The optional description of the event
static from_dict(data: dict[str, Any]) → Event
Section titled “static from_dict(data: dict[str, Any]) → Event”class algokit_utils.applications.app_spec.arc56.Actions
Section titled “class algokit_utils.applications.app_spec.arc56.Actions”Method actions information.
call : list[CallEnum] | None = None
Section titled “call : list[CallEnum] | None = None”The optional list of allowed call actions
create : list[CreateEnum] | None = None
Section titled “create : list[CreateEnum] | None = None”The optional list of allowed create actions
static from_dict(data: dict[str, Any]) → Actions
Section titled “static from_dict(data: dict[str, Any]) → Actions”class algokit_utils.applications.app_spec.arc56.DefaultValue
Section titled “class algokit_utils.applications.app_spec.arc56.DefaultValue”Default value information for method arguments.
data : str
Section titled “data : str”The default value data
source : Literal[‘box’, ‘global’, ‘local’, ‘literal’, ‘method’]
Section titled “source : Literal[‘box’, ‘global’, ‘local’, ‘literal’, ‘method’]”The source of the default value
type : str | None = None
Section titled “type : str | None = None”The optional type of the default value
static from_dict(data: dict[str, Any]) → DefaultValue
Section titled “static from_dict(data: dict[str, Any]) → DefaultValue”class algokit_utils.applications.app_spec.arc56.MethodArg
Section titled “class algokit_utils.applications.app_spec.arc56.MethodArg”Method argument information.
type : str
Section titled “type : str”The type of the argument
default*value *: DefaultValue | None_ = None
Section titled “default*value *: DefaultValue | None_ = None”The optional default value
desc : str | None = None
Section titled “desc : str | None = None”The optional description
name : str | None = None
Section titled “name : str | None = None”The optional name
struct : str | None = None
Section titled “struct : str | None = None”The optional struct type name
static from_dict(data: dict[str, Any]) → MethodArg
Section titled “static from_dict(data: dict[str, Any]) → MethodArg”class algokit_utils.applications.app_spec.arc56.Boxes
Section titled “class algokit_utils.applications.app_spec.arc56.Boxes”Box storage requirements.
key : str
Section titled “key : str”The box key
read*bytes *: int_
Section titled “read*bytes *: int_”The number of bytes to read
write*bytes *: int_
Section titled “write*bytes *: int_”The number of bytes to write
app : int | None = None
Section titled “app : int | None = None”The optional application ID
static from_dict(data: dict[str, Any]) → Boxes
Section titled “static from_dict(data: dict[str, Any]) → Boxes”class algokit_utils.applications.app_spec.arc56.Recommendations
Section titled “class algokit_utils.applications.app_spec.arc56.Recommendations”Method execution recommendations.
accounts : list[str] | None = None
Section titled “accounts : list[str] | None = None”The optional list of accounts
apps : list[int] | None = None
Section titled “apps : list[int] | None = None”The optional list of applications
assets : list[int] | None = None
Section titled “assets : list[int] | None = None”The optional list of assets
boxes : Boxes | None = None
Section titled “boxes : Boxes | None = None”The optional box storage requirements
inner*transaction_count *: int | None_ = None
Section titled “inner*transaction_count *: int | None_ = None”The optional inner transaction count
static from_dict(data: dict[str, Any]) → Recommendations
Section titled “static from_dict(data: dict[str, Any]) → Recommendations”class algokit_utils.applications.app_spec.arc56.Returns
Section titled “class algokit_utils.applications.app_spec.arc56.Returns”Method return information.
type : str
Section titled “type : str”The type of the return value
desc : str | None = None
Section titled “desc : str | None = None”The optional description
struct : str | None = None
Section titled “struct : str | None = None”The optional struct type name
static from_dict(data: dict[str, Any]) → Returns
Section titled “static from_dict(data: dict[str, Any]) → Returns”class algokit_utils.applications.app_spec.arc56.Method
Section titled “class algokit_utils.applications.app_spec.arc56.Method”Method information.
The allowed actions
args : list[MethodArg]
Section titled “args : list[MethodArg]”The method arguments
name : str
Section titled “name : str”The method name
The return information
desc : str | None = None
Section titled “desc : str | None = None”The optional description
events : list[Event] | None = None
Section titled “events : list[Event] | None = None”The optional list of events
readonly : bool | None = None
Section titled “readonly : bool | None = None”The optional readonly flag
recommendations : Recommendations | None = None
Section titled “recommendations : Recommendations | None = None”The optional execution recommendations
to_abi_method() → algosdk.abi.Method
Section titled “to_abi_method() → algosdk.abi.Method”Convert to ABI method.
- Raises: ValueError – If underlying ABI method is not initialized
- Returns: ABI method
static from_dict(data: dict[str, Any]) → Method
Section titled “static from_dict(data: dict[str, Any]) → Method”class algokit_utils.applications.app_spec.arc56.PcOffsetMethod
Section titled “class algokit_utils.applications.app_spec.arc56.PcOffsetMethod”Bases: str, enum.Enum
PC offset method types.
CBLOCKS = ‘cblocks’
Section titled “CBLOCKS = ‘cblocks’”NONE = ‘none’
Section titled “NONE = ‘none’”class algokit_utils.applications.app_spec.arc56.SourceInfo
Section titled “class algokit_utils.applications.app_spec.arc56.SourceInfo”Source code location information.
pc : list[int]
Section titled “pc : list[int]”The list of program counter values
error*message *: str | None_ = None
Section titled “error*message *: str | None_ = None”The optional error message
source : str | None = None
Section titled “source : str | None = None”The optional source code
teal : int | None = None
Section titled “teal : int | None = None”The optional TEAL version
static from_dict(data: dict[str, Any]) → SourceInfo
Section titled “static from_dict(data: dict[str, Any]) → SourceInfo”class algokit_utils.applications.app_spec.arc56.StorageKey
Section titled “class algokit_utils.applications.app_spec.arc56.StorageKey”Storage key information.
key : str
Section titled “key : str”The storage key
key*type *: str_
Section titled “key*type *: str_”The type of the key
value*type *: str_
Section titled “value*type *: str_”The type of the value
desc : str | None = None
Section titled “desc : str | None = None”The optional description
static from_dict(data: dict[str, Any]) → StorageKey
Section titled “static from_dict(data: dict[str, Any]) → StorageKey”class algokit_utils.applications.app_spec.arc56.StorageMap
Section titled “class algokit_utils.applications.app_spec.arc56.StorageMap”Storage map information.
key*type *: str_
Section titled “key*type *: str_”The type of the map keys
value*type *: str_
Section titled “value*type *: str_”The type of the map values
desc : str | None = None
Section titled “desc : str | None = None”The optional description
prefix : str | None = None
Section titled “prefix : str | None = None”The optional key prefix
static from_dict(data: dict[str, Any]) → StorageMap
Section titled “static from_dict(data: dict[str, Any]) → StorageMap”class algokit_utils.applications.app_spec.arc56.Keys
Section titled “class algokit_utils.applications.app_spec.arc56.Keys”Storage keys for different storage types.
box : dict[str, StorageKey]
Section titled “box : dict[str, StorageKey]”The box storage keys
global*state *: dict[str, StorageKey]_
Section titled “global*state *: dict[str, StorageKey]_”The global state storage keys
local*state *: dict[str, StorageKey]_
Section titled “local*state *: dict[str, StorageKey]_”The local state storage keys
static from_dict(data: dict[str, Any]) → Keys
Section titled “static from_dict(data: dict[str, Any]) → Keys”class algokit_utils.applications.app_spec.arc56.Maps
Section titled “class algokit_utils.applications.app_spec.arc56.Maps”Storage maps for different storage types.
box : dict[str, StorageMap]
Section titled “box : dict[str, StorageMap]”The box storage maps
global*state *: dict[str, StorageMap]_
Section titled “global*state *: dict[str, StorageMap]_”The global state storage maps
local*state *: dict[str, StorageMap]_
Section titled “local*state *: dict[str, StorageMap]_”The local state storage maps
static from_dict(data: dict[str, Any]) → Maps
Section titled “static from_dict(data: dict[str, Any]) → Maps”class algokit_utils.applications.app_spec.arc56.State
Section titled “class algokit_utils.applications.app_spec.arc56.State”Application state information.
The storage keys
The storage maps
The state schema
static from_dict(data: dict[str, Any]) → State
Section titled “static from_dict(data: dict[str, Any]) → State”class algokit_utils.applications.app_spec.arc56.ProgramSourceInfo
Section titled “class algokit_utils.applications.app_spec.arc56.ProgramSourceInfo”Program source information.
pc*offset_method *: PcOffsetMethod_
Section titled “pc*offset_method *: PcOffsetMethod_”The PC offset method
source*info *: list[SourceInfo]_
Section titled “source*info *: list[SourceInfo]_”The list of source info entries
static from_dict(data: dict[str, Any]) → ProgramSourceInfo
Section titled “static from_dict(data: dict[str, Any]) → ProgramSourceInfo”class algokit_utils.applications.app_spec.arc56.SourceInfoModel
Section titled “class algokit_utils.applications.app_spec.arc56.SourceInfoModel”Source information for approval and clear programs.
The approval program source info
The clear program source info
static from_dict(data: dict[str, Any]) → SourceInfoModel
Section titled “static from_dict(data: dict[str, Any]) → SourceInfoModel”class algokit_utils.applications.app_spec.arc56.Arc56Contract
Section titled “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]
Section titled “arcs : list[int]”The list of supported ARC version numbers
bare*actions *: BareActions_
Section titled “bare*actions *: BareActions_”The bare call and create actions
methods : list[Method]
Section titled “methods : list[Method]”The list of contract methods
name : str
Section titled “name : str”The contract name
The contract state information
structs : dict[str, list[StructField]]
Section titled “structs : dict[str, list[StructField]]”The contract struct definitions
byte*code *: ByteCode | None_ = None
Section titled “byte*code *: ByteCode | None_ = None”The optional bytecode for approval and clear programs
compiler*info *: CompilerInfo | None_ = None
Section titled “compiler*info *: CompilerInfo | None_ = None”The optional compiler information
desc : str | None = None
Section titled “desc : str | None = None”The optional contract description
events : list[Event] | None = None
Section titled “events : list[Event] | None = None”The optional list of contract events
networks : dict[str, Network] | None = None
Section titled “networks : dict[str, Network] | None = None”The optional network deployment information
scratch*variables *: dict[str, ScratchVariables] | None_ = None
Section titled “scratch*variables *: dict[str, ScratchVariables] | None_ = None”The optional scratch variable information
source : Source | None = None
Section titled “source : Source | None = None”The optional source code
source*info *: SourceInfoModel | None_ = None
Section titled “source*info *: SourceInfoModel | None_ = None”The optional source code information
template*variables *: dict[str, TemplateVariables] | None_ = None
Section titled “template*variables *: dict[str, TemplateVariables] | None_ = None”The optional template variable information
static from_dict(application_spec: dict) → Arc56Contract
Section titled “static from_dict(application_spec: dict) → Arc56Contract”Create Arc56Contract from dictionary.
- Parameters: application_spec – Dictionary containing contract specification
- Returns: Arc56Contract instance