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

Table of contents

Properties

Properties

actions

actions: Object

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

Type declaration

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

Defined in

src/types/app-arc56.ts:399


args

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

Defined in

src/types/app-arc56.ts:364


desc

Optional desc: string

Optional, user-friendly description for the method

Defined in

src/types/app-arc56.ts:362


events

Optional events: Event[]

ARC-28 events that MAY be emitted by this method

Defined in

src/types/app-arc56.ts:408


name

name: string

The name of the method

Defined in

src/types/app-arc56.ts:360


readonly

Optional readonly: boolean

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

Defined in

src/types/app-arc56.ts:406


recommendations

Optional recommendations: Object

Information that clients can use when calling the method

Type declaration

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

Defined in

src/types/app-arc56.ts:410


returns

returns: Object

Information about the method’s return value

Type declaration

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.

Defined in

src/types/app-arc56.ts:390