Arc56Contract
@algorandfoundation/algokit-utils / types/app-arc56 / Arc56Contract
types/app-arc56.Arc56Contract
Describes the entire contract. This interface is an extension of the interface described in ARC-4
Table of contents
Section titled “Table of contents”Properties
Section titled “Properties”- arcs
- bareActions
- byteCode
- compilerInfo
- desc
- events
- methods
- name
- networks
- scratchVariables
- source
- sourceInfo
- state
- structs
- templateVariables
Properties
Section titled “Properties”• arcs: number[]
The ARCs used and/or supported by this contract. All contracts implicitly support ARC4 and ARC56
Defined in
Section titled “Defined in”bareActions
Section titled “bareActions”• bareActions: Object
Supported bare actions for the contract. An action is a combination of call/create and an OnComplete
Type declaration
Section titled “Type declaration”| Name | Type | Description |
|---|---|---|
call | ("NoOp" | "OptIn" | "DeleteApplication" | "CloseOut" | "ClearState" | "UpdateApplication")[] | OnCompletes this method allows when appID !== 0 |
create | ("NoOp" | "OptIn" | "DeleteApplication")[] | OnCompletes this method allows when appID === 0 |
Defined in
Section titled “Defined in”byteCode
Section titled “byteCode”• Optional byteCode: Object
The compiled bytecode for the application. MUST be omitted if included as part of ARC23
Type declaration
Section titled “Type declaration”| Name | Type | Description |
|---|---|---|
approval | string | The approval program |
clear | string | The clear program |
Defined in
Section titled “Defined in”compilerInfo
Section titled “compilerInfo”• Optional compilerInfo: Object
Information used to get the given byteCode and/or PC values in sourceInfo. MUST be given if byteCode or PC values are present
Type declaration
Section titled “Type declaration”| Name | Type | Description |
|---|---|---|
compiler | "algod" | "puya" | The name of the compiler |
compilerVersion | { commitHash?: string ; major: number ; minor: number ; patch: number } | Compiler version information |
compilerVersion.commitHash? | string | - |
compilerVersion.major | number | - |
compilerVersion.minor | number | - |
compilerVersion.patch | number | - |
Defined in
Section titled “Defined in”• Optional desc: string
Optional, user-friendly description for the interface
Defined in
Section titled “Defined in”events
Section titled “events”• Optional events: Event[]
ARC-28 events that MAY be emitted by this contract
Defined in
Section titled “Defined in”methods
Section titled “methods”• methods: Method[]
All of the methods that the contract implements
Defined in
Section titled “Defined in”• name: string
A user-friendly name for the contract
Defined in
Section titled “Defined in”networks
Section titled “networks”• Optional networks: Object
Optional object listing the contract instances across different networks. The key is the base64 genesis hash of the network, and the value contains information about the deployed contract in the network indicated by the key. A key containing the human-readable name of the network MAY be included, but the corresponding genesis hash key MUST also be defined
Index signature
Section titled “Index signature”▪ [network: string]: { appID: number }
Defined in
Section titled “Defined in”scratchVariables
Section titled “scratchVariables”• Optional scratchVariables: Object
The scratch variables used during runtime
Index signature
Section titled “Index signature”▪ [name: string]: { slot: number ; type: ABIType | AVMType | StructName }
Defined in
Section titled “Defined in”source
Section titled “source”• Optional source: Object
The pre-compiled TEAL that may contain template variables. MUST be omitted if included as part of ARC23
Type declaration
Section titled “Type declaration”| Name | Type | Description |
|---|---|---|
approval | string | The approval program |
clear | string | The clear program |
Defined in
Section titled “Defined in”sourceInfo
Section titled “sourceInfo”• Optional sourceInfo: Object
Information about the TEAL programs
Type declaration
Section titled “Type declaration”| Name | Type | Description |
|---|---|---|
approval | ProgramSourceInfo | Approval program information |
clear | ProgramSourceInfo | Clear program information |
Defined in
Section titled “Defined in”• state: Object
Type declaration
Section titled “Type declaration”| Name | Type | Description |
|---|---|---|
keys | { box: { [name: string]: StorageKey; } ; global: { [name: string]: StorageKey; } ; local: { [name: string]: StorageKey; } } | Mapping of human-readable names to StorageKey objects |
keys.box | { [name: string]: StorageKey; } | - |
keys.global | { [name: string]: StorageKey; } | - |
keys.local | { [name: string]: StorageKey; } | - |
maps | { box: { [name: string]: StorageMap; } ; global: { [name: string]: StorageMap; } ; local: { [name: string]: StorageMap; } } | Mapping of human-readable names to StorageMap objects |
maps.box | { [name: string]: StorageMap; } | - |
maps.global | { [name: string]: StorageMap; } | - |
maps.local | { [name: string]: StorageMap; } | - |
schema | { global: { bytes: number ; ints: number } ; local: { bytes: number ; ints: number } } | Defines the values that should be used for GlobalNumUint, GlobalNumByteSlice, LocalNumUint, and LocalNumByteSlice when creating the application |
schema.global | { bytes: number ; ints: number } | - |
schema.global.bytes | number | - |
schema.global.ints | number | - |
schema.local | { bytes: number ; ints: number } | - |
schema.local.bytes | number | - |
schema.local.ints | number | - |
Defined in
Section titled “Defined in”structs
Section titled “structs”• structs: Object
Named structs used by the application. Each struct field appears in the same order as ABI encoding.
Index signature
Section titled “Index signature”▪ [structName: StructName]: StructField[]
Defined in
Section titled “Defined in”templateVariables
Section titled “templateVariables”• Optional templateVariables: Object
A mapping of template variable names as they appear in the TEAL (not including TMPL_ prefix) to their respective types and values (if applicable)
Index signature
Section titled “Index signature”▪ [name: string]: { type: ABIType | AVMType | StructName ; value?: string }