Skip to content

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

arcs: number[]

The ARCs used and/or supported by this contract. All contracts implicitly support ARC4 and ARC56

src/types/app-arc56.ts:250


bareActions: Object

Supported bare actions for the contract. An action is a combination of call/create and an OnComplete

NameTypeDescription
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

src/types/app-arc56.ts:298


Optional byteCode: Object

The compiled bytecode for the application. MUST be omitted if included as part of ARC23

NameTypeDescription
approvalstringThe approval program
clearstringThe clear program

src/types/app-arc56.ts:319


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

NameTypeDescription
compiler"algod" | "puya"The name of the compiler
compilerVersion{ commitHash?: string ; major: number ; minor: number ; patch: number }Compiler version information
compilerVersion.commitHash?string-
compilerVersion.majornumber-
compilerVersion.minornumber-
compilerVersion.patchnumber-

src/types/app-arc56.ts:326


Optional desc: string

Optional, user-friendly description for the interface

src/types/app-arc56.ts:254


Optional events: Event[]

ARC-28 events that MAY be emitted by this contract

src/types/app-arc56.ts:338


methods: Method[]

All of the methods that the contract implements

src/types/app-arc56.ts:271


name: string

A user-friendly name for the contract

src/types/app-arc56.ts:252


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

▪ [network: string]: { appID: number }

src/types/app-arc56.ts:262


Optional scratchVariables: Object

The scratch variables used during runtime

▪ [name: string]: { slot: number ; type: ABIType | AVMType | StructName }

src/types/app-arc56.ts:349


Optional source: Object

The pre-compiled TEAL that may contain template variables. MUST be omitted if included as part of ARC23

NameTypeDescription
approvalstringThe approval program
clearstringThe clear program

src/types/app-arc56.ts:312


Optional sourceInfo: Object

Information about the TEAL programs

NameTypeDescription
approvalProgramSourceInfoApproval program information
clearProgramSourceInfoClear program information

src/types/app-arc56.ts:305


state: Object

NameTypeDescription
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.bytesnumber-
schema.global.intsnumber-
schema.local{ bytes: number ; ints: number }-
schema.local.bytesnumber-
schema.local.intsnumber-

src/types/app-arc56.ts:272


structs: Object

Named structs used by the application. Each struct field appears in the same order as ABI encoding.

▪ [structName: StructName]: StructField[]

src/types/app-arc56.ts:269


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)

▪ [name: string]: { type: ABIType | AVMType | StructName ; value?: string }

src/types/app-arc56.ts:340