Skip to content

Method

@algorandfoundation/algokit-utils / types/app-arc56 / Method

types/app-arc56.Method

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

actions: Object

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:399


args: { defaultValue?: { data: string ; source: "method" | "box" | "global" | "local" | "literal" ; type?: string } ; desc?: string ; name?: string ; struct?: string ; type: string }[]

The arguments of the method, in order

src/types/app-arc56.ts:364


Optional desc: string

Optional, user-friendly description for the method

src/types/app-arc56.ts:362


Optional events: Event[]

ARC-28 events that MAY be emitted by this method

src/types/app-arc56.ts:408


name: string

The name of the method

src/types/app-arc56.ts:360


Optional readonly: boolean

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

src/types/app-arc56.ts:406


Optional recommendations: Object

Information that clients can use when calling the method

NameTypeDescription
accounts?string[]Recommended foreign accounts
apps?number[]Recommended foreign apps
assets?number[]Recommended foreign assets
boxes?{ app?: number ; key: string ; readBytes: number ; writeBytes: number }Recommended box references to include
boxes.app?numberThe app ID for the box
boxes.keystringThe base64 encoded box key
boxes.readBytesnumberThe number of bytes being read from the box
boxes.writeBytesnumberThe number of bytes being written to the box
innerTransactionCount?numberThe number of inner transactions the caller should cover the fees for

src/types/app-arc56.ts:410


returns: Object

Information about the method’s return value

NameTypeDescription
desc?stringOptional, user-friendly description for the return value
struct?stringIf the type is a struct, the name of the struct
typestringThe 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.

src/types/app-arc56.ts:390