You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: ARCs/arc-0004.md
+25-8
Original file line number
Diff line number
Diff line change
@@ -147,7 +147,12 @@ interface Method {
147
147
desc?:string
148
148
}>,
149
149
/** Information about the method's return value */
150
-
returns: { type:string, desc?:string }
150
+
returns: {
151
+
/** The type of the return value, or "void" to indicate no return value. */
152
+
type:string,
153
+
/** Optional, user-friendly description for the return value */
154
+
desc?:string
155
+
}
151
156
}
152
157
```
153
158
@@ -320,9 +325,13 @@ interface Contract {
320
325
networks?: {
321
326
/**
322
327
* The key is the base64 genesis hash of the network, and the value contains
323
-
* the app ID of the deployed contract in that network
328
+
* information about the deployed contract in the network indicated by the
329
+
* key
324
330
*/
325
-
[network:string]: { appID:number }
331
+
[network:string]: {
332
+
/** The app ID of the deployed contract in this network */
333
+
appID:number
334
+
}
326
335
}
327
336
/** All of the methods that the contract implements */
328
337
methods:Method[]
@@ -495,16 +504,24 @@ properties:
495
504
496
505
The following types are supported in the Algorand ABI.
497
506
498
-
*`uint<N>`: An `N`-bit unsigned integer, where `8 <= N <= 512` and `N % 8 = 0`.
507
+
*`uint<N>`: An `N`-bit unsigned integer, where `8 <= N <= 512` and `N % 8 = 0`. When this type is
508
+
used as part of a method signature, `N` must be written as a base 10 number without any leading zeros.
499
509
*`byte`: An alias for `uint8`.
500
-
*`bool`: A boolean value that is restricted to either 0 or 1. When encoded, up to 8 consecutive `bool` values will be packed into a single byte.
501
-
*`ufixed<N>x<M>`: An `N`-bit unsigned fixed-point decimal number with precision `M`, where `8 <= N <= 512`, `N % 8 = 0`, and `0 < M <= 160`, which denotes a value `v` as `v / (10^M)`.
510
+
*`bool`: A boolean value that is restricted to either 0 or 1. When encoded, up to 8 consecutive
511
+
`bool` values will be packed into a single byte.
512
+
*`ufixed<N>x<M>`: An `N`-bit unsigned fixed-point decimal number with precision `M`, where
513
+
`8 <= N <= 512`, `N % 8 = 0`, and `0 < M <= 160`, which denotes a value `v` as `v / (10^M)`. When
514
+
this type is used as part of a method signature, `N` and `M` must be written as base 10 numbers
515
+
without any leading zeros.
502
516
*`<type>[<N>]`: A fixed-length array of length `N`, where `N >= 0`. `type` can be any other type.
517
+
When this type is used as part of a method signature, `N` must be written as a base 10 number without
518
+
any leading zeros, _unless_`N` is zero, in which case only a single 0 character should be used.
503
519
*`address`: Used to represent a 32-byte Algorand address. This is equivalent to `byte[32]`.
504
520
*`<type>[]`: A variable-length array. `type` can be any other type.
505
521
*`string`: A variable-length byte array (`byte[]`) assumed to contain UTF-8 encoded content.
506
-
*`(T1,T2,...,TN)`: A tuple of the types `T1`, `T2`, …, `TN`, `N >= 0`.
507
-
* reference types `account`, `asset`, `application`: only for arguments, in which case they are an alias for `uint8`. See section "Reference Types" below.
522
+
*`(T1,T2,…,TN)`: A tuple of the types `T1`, `T2`, …, `TN`, `N >= 0`.
523
+
* reference types `account`, `asset`, `application`: only for arguments, in which case they are an
524
+
alias for `uint8`. See section "Reference Types" below.
508
525
509
526
Additional special use types are defined in [Reference Types](#reference-types)
0 commit comments