@@ -19,7 +19,11 @@ import type { uint64 } from '@algorandfoundation/algorand-typescript'
19
19
export default class InnerTransactions extends Contract {
20
20
// example: PAYMENT
21
21
/**
22
- * Demonstrates a simple payment inner transaction
22
+ * Demonstrates a simple payment inner transaction.
23
+ * The fee is set to 0 by default. Manually set here for demonstration purposes.
24
+ * The `Sender` for the payment is implied to be Global.currentApplicationAddress.
25
+ * If a different sender is needed, it'd have to be an account that has been
26
+ * rekeyed to the application address.
23
27
* @returns The amount of the payment
24
28
*/
25
29
@abimethod ( )
@@ -34,14 +38,6 @@ export default class InnerTransactions extends Contract {
34
38
35
39
return result . amount
36
40
}
37
-
38
- /**
39
- * fee is set to 0 by default. Manually set here for demonstration purposes.
40
- * The `Sender` for the above is implied to be Global.currentApplicationAddress.
41
- *
42
- * If a different sender is needed, it'd have to be an account that has been
43
- * rekeyed to the application address.
44
- */
45
41
// example: PAYMENT
46
42
47
43
// example: ASSET_CREATE
@@ -64,10 +60,12 @@ export default class InnerTransactions extends Contract {
64
60
}
65
61
66
62
/**
67
- * Creates a non-fungible asset (NFT)
63
+ * Creates a non-fungible asset (NFT).
68
64
* Following the ARC3 standard, the total supply must be 1 for a non-fungible asset.
69
65
* If you want to create fractional NFTs, `total` * `decimals` point must be 1.
70
66
* ex) total=100, decimals=2, 100 * 0.01 = 1
67
+ * The fee is set to 0 by default for inner transactions.
68
+ * The Sender is implied to be Global.currentApplicationAddress.
71
69
* @returns The ID of the created asset
72
70
*/
73
71
@abimethod ( )
@@ -93,7 +91,10 @@ export default class InnerTransactions extends Contract {
93
91
94
92
// example: ASSET_OPT_IN
95
93
/**
96
- * Opts the application into an asset
94
+ * Opts the application into an asset.
95
+ * A zero amount asset transfer to one's self is a special type of asset transfer
96
+ * that is used to opt-in to an asset.
97
+ * To send an asset transfer, the asset must be an available resource.
97
98
* @param asset The asset to opt into
98
99
*/
99
100
@abimethod ( )
@@ -107,19 +108,14 @@ export default class InnerTransactions extends Contract {
107
108
} )
108
109
. submit ( )
109
110
}
110
-
111
- /**
112
- * A zero amount asset transfer to one's self is a special type of asset transfer
113
- * that is used to opt-in to an asset.
114
- *
115
- * To send an asset transfer, the asset must be an available resource.
116
- * Refer the Resource Availability section for more information.
117
- */
118
111
// example: ASSET_OPT_IN
119
112
120
113
// example: ASSET_TRANSFER
121
114
/**
122
- * Transfers an asset from the application to another account
115
+ * Transfers an asset from the application to another account.
116
+ * For a smart contract to transfer an asset, the app account must be opted into the asset
117
+ * and be holding non zero amount of assets.
118
+ * To send an asset transfer, the asset must be an available resource.
123
119
* @param asset The asset to transfer
124
120
* @param receiver The account to receive the asset
125
121
* @param amount The amount to transfer
@@ -136,18 +132,13 @@ export default class InnerTransactions extends Contract {
136
132
. submit ( )
137
133
}
138
134
139
- /**
140
- * For a smart contract to transfer an asset, the app account must be opted into the asset
141
- * and be holding non zero amount of assets.
142
- *
143
- * To send an asset transfer, the asset must be an available resource.
144
- * Refer the Resource Availability section for more information.
145
- */
146
135
// example: ASSET_TRANSFER
147
136
148
137
// example: ASSET_FREEZE
149
138
/**
150
- * Freezes an asset for a specific account
139
+ * Freezes an asset for a specific account.
140
+ * To freeze an asset, the asset must be a freezable asset
141
+ * by having an account with freeze authority.
151
142
* @param acctToBeFrozen The account to freeze the asset for
152
143
* @param asset The asset to freeze
153
144
*/
@@ -162,16 +153,14 @@ export default class InnerTransactions extends Contract {
162
153
} )
163
154
. submit ( )
164
155
}
165
-
166
- /**
167
- * To freeze an asset, the asset must be a freezable asset
168
- * by having an account with freeze authority.
169
- */
170
156
// example: ASSET_FREEZE
171
157
172
158
// example: ASSET_REVOKE
173
159
/**
174
- * Revokes (clawbacks) an asset from an account
160
+ * Revokes (clawbacks) an asset from an account.
161
+ * To revoke an asset, the asset must be a revocable asset
162
+ * by having an account with clawback authority.
163
+ * The Sender is implied to be current_application_address.
175
164
* @param asset The asset to revoke
176
165
* @param accountToBeRevoked The account to revoke the asset from
177
166
* @param amount The amount to revoke
@@ -188,18 +177,15 @@ export default class InnerTransactions extends Contract {
188
177
} )
189
178
. submit ( )
190
179
}
191
-
192
- /**
193
- * To revoke an asset, the asset must be a revocable asset
194
- * by having an account with clawback authority.
195
- *
196
- * Sender is implied to be current_application_address
197
- */
198
180
// example: ASSET_REVOKE
199
181
200
182
// example: ASSET_CONFIG
201
183
/**
202
- * Reconfigures an existing asset
184
+ * Reconfigures an existing asset.
185
+ * For a smart contract to transfer an asset, the app account must be opted into the asset
186
+ * and be holding non zero amount of assets.
187
+ * To send an asset transfer, the asset must be an available resource.
188
+ * Refer the Resource Availability section for more information.
203
189
* @param asset The asset to reconfigure
204
190
*/
205
191
@abimethod ( )
@@ -215,19 +201,14 @@ export default class InnerTransactions extends Contract {
215
201
} )
216
202
. submit ( )
217
203
}
218
-
219
- /**
220
- * For a smart contract to transfer an asset, the app account must be opted into the asset
221
- * and be holding non zero amount of assets.
222
- *
223
- * To send an asset transfer, the asset must be an available resource.
224
- * Refer the Resource Availability section for more information.
225
- */
226
204
// example: ASSET_CONFIG
227
205
228
206
// example: ASSET_DELETE
229
207
/**
230
- * Deletes an asset
208
+ * Deletes an asset.
209
+ * To delete an asset, the asset must be a deleteable asset
210
+ * by having an account with delete authority.
211
+ * The Sender is implied to be current_application_address.
231
212
* @param asset The asset to delete
232
213
*/
233
214
@abimethod ( )
0 commit comments