algokit_utils.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 StructField
Section titled “class 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 CallEnum
Section titled “class 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 CreateEnum
Section titled “class 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 BareActions
Section titled “class 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 ByteCode
Section titled “class 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 Compiler
Section titled “class Compiler”Bases: str, enum.Enum
Enum representing different compiler types.
ALGOD = ‘algod’
Section titled “ALGOD = ‘algod’”PUYA = ‘puya’
Section titled “PUYA = ‘puya’”class CompilerVersion
Section titled “class 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 CompilerInfo
Section titled “class 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 Network
Section titled “class 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 ScratchVariables
Section titled “class 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 Source
Section titled “class 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 Global
Section titled “class 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 Local
Section titled “class 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 Schema
Section titled “class 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 TemplateVariables
Section titled “class 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 EventArg
Section titled “class 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 Event
Section titled “class 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 Actions
Section titled “class 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 DefaultValue
Section titled “class 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 MethodArg
Section titled “class 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 Boxes
Section titled “class 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 Recommendations
Section titled “class 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 Returns
Section titled “class 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 Method
Section titled “class 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 PcOffsetMethod
Section titled “class PcOffsetMethod”Bases: str, enum.Enum
PC offset method types.
CBLOCKS = ‘cblocks’
Section titled “CBLOCKS = ‘cblocks’”NONE = ‘none’
Section titled “NONE = ‘none’”class SourceInfo
Section titled “class 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 StorageKey
Section titled “class 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 StorageMap
Section titled “class 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 Keys
Section titled “class 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 Maps
Section titled “class 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 State
Section titled “class 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 ProgramSourceInfo
Section titled “class 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 SourceInfoModel
Section titled “class 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 Arc56Contract
Section titled “class 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