Arc56Method
Arc56Method =
object
Defined in: packages/abi/src/arc56-contract.ts:142
Describes a method in the contract. This type is an extension of the type described in ARC-4
Properties
Section titled “Properties”actions
Section titled “actions”actions:
object
Defined in: packages/abi/src/arc56-contract.ts:183
an action is a combination of call/create and an OnComplete
call: (
"NoOp"|"OptIn"|"CloseOut"|"ClearState"|"UpdateApplication"|"DeleteApplication")[]
OnCompletes this method allows when appID !== 0
create
Section titled “create”create: (
"NoOp"|"OptIn"|"DeleteApplication")[]
OnCompletes this method allows when appID === 0
args:
object[]
Defined in: packages/abi/src/arc56-contract.ts:148
The arguments of the method, in order
defaultValue?
Section titled “defaultValue?”
optionaldefaultValue:object
The default value that clients should use.
defaultValue.data
Section titled “defaultValue.data”data:
string
Base64 encoded bytes, base64 ARC4 encoded uint64, or UTF-8 method selector
defaultValue.source
Section titled “defaultValue.source”source:
"box"|"global"|"local"|"literal"|"method"
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
defaultValue.type?
Section titled “defaultValue.type?”
optionaltype:ABITypeName|AVMType
How the data is encoded. This is the encoding for the data provided here, not the arg type
optionaldesc:string
Optional, user-friendly description for the argument
optionalname:string
Optional, user-friendly name for the argument
struct?
Section titled “struct?”
optionalstruct:StructName
If the type is a struct, the name of the struct
type:
ABITypeName
The type of the argument. The struct field should also be checked to determine if this arg is a struct.
optionaldesc:string
Defined in: packages/abi/src/arc56-contract.ts:146
Optional, user-friendly description for the method
events?
Section titled “events?”
optionalevents:Event[]
Defined in: packages/abi/src/arc56-contract.ts:192
ARC-28 events that MAY be emitted by this method
name:
string
Defined in: packages/abi/src/arc56-contract.ts:144
The name of the method
readonly?
Section titled “readonly?”
optionalreadonly:boolean
Defined in: packages/abi/src/arc56-contract.ts:190
If this method does not write anything to the ledger (ARC-22)
recommendations?
Section titled “recommendations?”
optionalrecommendations:object
Defined in: packages/abi/src/arc56-contract.ts:194
Information that clients can use when calling the method
accounts?
Section titled “accounts?”
optionalaccounts:string[]
Recommended foreign accounts
optionalapps:number[]
Recommended foreign apps
assets?
Section titled “assets?”
optionalassets:number[]
Recommended foreign assets
boxes?
Section titled “boxes?”
optionalboxes:object
Recommended box references to include
boxes.app?
Section titled “boxes.app?”
optionalapp:number
The app ID for the box
boxes.key
Section titled “boxes.key”key:
string
The base64 encoded box key
boxes.readBytes
Section titled “boxes.readBytes”readBytes:
number
The number of bytes being read from the box
boxes.writeBytes
Section titled “boxes.writeBytes”writeBytes:
number
The number of bytes being written to the box
innerTransactionCount?
Section titled “innerTransactionCount?”
optionalinnerTransactionCount:number
The number of inner transactions the caller should cover the fees for
returns
Section titled “returns”returns:
object
Defined in: packages/abi/src/arc56-contract.ts:174
Information about the method’s return value
optionaldesc:string
Optional, user-friendly description for the return value
struct?
Section titled “struct?”
optionalstruct:StructName
If the type is a struct, the name of the struct
type:
ABITypeName
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.