Skip to content

Method

Defined in: algokit-utils-ts/src/types/app-arc56.ts:358

Describes a method in the contract. This interface is an extension of the interface described in ARC-4

actions: object

Defined in: algokit-utils-ts/src/types/app-arc56.ts:399

an action is a combination of call/create and an OnComplete

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


args: object[]

Defined in: algokit-utils-ts/src/types/app-arc56.ts:364

The arguments of the method, in order

optional defaultValue?: object

The default value that clients should use.

data: string

Base64 encoded bytes, base64 ARC4 encoded uint64, or UTF-8 method selector

source: "method" | "box" | "global" | "local" | "literal"

Where the default value is coming from

  • box: The data key signifies the box key to read the value from
  • global: The data key signifies the global state key to read the value from
  • local: The data key signifies the local state key to read the value from (for the sender)
  • literal: the value is a literal and should be passed directly as the argument
  • method: The utf8 signature of the method in this contract to call to get the default value. If the method has arguments, they all must have default values. The method MUST be readonly so simulate can be used to get the default value

optional type?: string

How the data is encoded. This is the encoding for the data provided here, not the arg type

optional desc?: string

Optional, user-friendly description for the argument

optional name?: string

Optional, user-friendly name for the argument

optional struct?: string

If the type is a struct, the name of the struct

type: string

The type of the argument. The struct field should also be checked to determine if this arg is a struct.


optional desc?: string

Defined in: algokit-utils-ts/src/types/app-arc56.ts:362

Optional, user-friendly description for the method


optional events?: Event[]

Defined in: algokit-utils-ts/src/types/app-arc56.ts:408

ARC-28 events that MAY be emitted by this method


name: string

Defined in: algokit-utils-ts/src/types/app-arc56.ts:360

The name of the method


optional readonly?: boolean

Defined in: algokit-utils-ts/src/types/app-arc56.ts:406

If this method does not write anything to the ledger (ARC-22)


optional recommendations?: object

Defined in: algokit-utils-ts/src/types/app-arc56.ts:410

Information that clients can use when calling the method

optional accounts?: string[]

Recommended foreign accounts

optional apps?: number[]

Recommended foreign apps

optional assets?: number[]

Recommended foreign assets

optional boxes?: object

Recommended box references to include

optional app?: number

The app ID for the box

key: string

The base64 encoded box key

readBytes: number

The number of bytes being read from the box

writeBytes: number

The number of bytes being written to the box

optional innerTransactionCount?: number

The number of inner transactions the caller should cover the fees for


returns: object

Defined in: algokit-utils-ts/src/types/app-arc56.ts:390

Information about the method’s return value

optional desc?: string

Optional, user-friendly description for the return value

optional struct?: string

If the type is a struct, the name of the struct

type: string

The type of the return value, or “void” to indicate no return value. The struct field should also be checked to determine if this return value is a struct.