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
Section titled “Table of contents”Properties
Section titled “Properties”Properties
Section titled “Properties”actions
Section titled “actions”• actions: Object
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”• 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
Section titled “Defined in”• Optional desc: string
Optional, user-friendly description for the method
Defined in
Section titled “Defined in”events
Section titled “events”• Optional events: Event[]
ARC-28 events that MAY be emitted by this method
Defined in
Section titled “Defined in”• name: string
The name of the method
Defined in
Section titled “Defined in”readonly
Section titled “readonly”• Optional readonly: boolean
If this method does not write anything to the ledger (ARC-22)
Defined in
Section titled “Defined in”recommendations
Section titled “recommendations”• Optional recommendations: Object
Information that clients can use when calling the method
Type declaration
Section titled “Type declaration”| Name | Type | Description |
|---|---|---|
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? | number | The app ID for the box |
boxes.key | string | The base64 encoded box key |
boxes.readBytes | number | The number of bytes being read from the box |
boxes.writeBytes | number | The number of bytes being written to the box |
innerTransactionCount? | number | The number of inner transactions the caller should cover the fees for |
Defined in
Section titled “Defined in”returns
Section titled “returns”• returns: Object
Information about the method’s return value
Type declaration
Section titled “Type declaration”| Name | Type | Description |
|---|---|---|
desc? | string | Optional, user-friendly description for the return value |
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. |