algokit-utils 3.0.0b10__py3-none-any.whl → 3.0.0b12__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of algokit-utils might be problematic. Click here for more details.
- algokit_utils/_legacy_v2/_ensure_funded.py +3 -7
- algokit_utils/_legacy_v2/_transfer.py +4 -2
- algokit_utils/_legacy_v2/account.py +5 -5
- algokit_utils/_legacy_v2/deploy.py +1 -1
- algokit_utils/_legacy_v2/network_clients.py +10 -6
- algokit_utils/accounts/account_manager.py +71 -67
- algokit_utils/algorand.py +105 -11
- algokit_utils/application_specification.py +1 -1
- algokit_utils/applications/abi.py +8 -12
- algokit_utils/applications/app_client.py +132 -44
- algokit_utils/applications/app_deployer.py +93 -2
- algokit_utils/applications/app_factory.py +315 -1
- algokit_utils/applications/app_manager.py +110 -2
- algokit_utils/applications/app_spec/arc56.py +131 -190
- algokit_utils/assets/asset_manager.py +47 -31
- algokit_utils/clients/client_manager.py +76 -0
- algokit_utils/clients/dispenser_api_client.py +32 -3
- algokit_utils/models/application.py +30 -0
- algokit_utils/models/state.py +9 -0
- algokit_utils/transactions/transaction_composer.py +366 -182
- algokit_utils/transactions/transaction_creator.py +550 -18
- algokit_utils/transactions/transaction_sender.py +645 -0
- {algokit_utils-3.0.0b10.dist-info → algokit_utils-3.0.0b12.dist-info}/METADATA +1 -1
- {algokit_utils-3.0.0b10.dist-info → algokit_utils-3.0.0b12.dist-info}/RECORD +26 -26
- {algokit_utils-3.0.0b10.dist-info → algokit_utils-3.0.0b12.dist-info}/WHEEL +1 -1
- {algokit_utils-3.0.0b10.dist-info → algokit_utils-3.0.0b12.dist-info}/LICENSE +0 -0
|
@@ -58,14 +58,12 @@ class _ActionType(str, Enum):
|
|
|
58
58
|
|
|
59
59
|
@dataclass
|
|
60
60
|
class StructField:
|
|
61
|
-
"""Represents a field in a struct type.
|
|
62
|
-
|
|
63
|
-
:ivar name: Name of the struct field
|
|
64
|
-
:ivar type: Type of the struct field, either a string or list of StructFields
|
|
65
|
-
"""
|
|
61
|
+
"""Represents a field in a struct type."""
|
|
66
62
|
|
|
67
63
|
name: str
|
|
64
|
+
"""The name of the struct field"""
|
|
68
65
|
type: list[StructField] | str
|
|
66
|
+
"""The type of the struct field, either a string or list of StructFields"""
|
|
69
67
|
|
|
70
68
|
@staticmethod
|
|
71
69
|
def from_dict(data: dict[str, Any]) -> StructField:
|
|
@@ -95,14 +93,12 @@ class CreateEnum(str, Enum):
|
|
|
95
93
|
|
|
96
94
|
@dataclass
|
|
97
95
|
class BareActions:
|
|
98
|
-
"""Represents bare call and create actions for an application.
|
|
99
|
-
|
|
100
|
-
:ivar call: List of allowed call actions
|
|
101
|
-
:ivar create: List of allowed create actions
|
|
102
|
-
"""
|
|
96
|
+
"""Represents bare call and create actions for an application."""
|
|
103
97
|
|
|
104
98
|
call: list[CallEnum]
|
|
99
|
+
"""The list of allowed call actions"""
|
|
105
100
|
create: list[CreateEnum]
|
|
101
|
+
"""The list of allowed create actions"""
|
|
106
102
|
|
|
107
103
|
@staticmethod
|
|
108
104
|
def from_dict(data: dict[str, Any]) -> BareActions:
|
|
@@ -111,14 +107,12 @@ class BareActions:
|
|
|
111
107
|
|
|
112
108
|
@dataclass
|
|
113
109
|
class ByteCode:
|
|
114
|
-
"""Represents the approval and clear program bytecode.
|
|
115
|
-
|
|
116
|
-
:ivar approval: Base64 encoded approval program bytecode
|
|
117
|
-
:ivar clear: Base64 encoded clear program bytecode
|
|
118
|
-
"""
|
|
110
|
+
"""Represents the approval and clear program bytecode."""
|
|
119
111
|
|
|
120
112
|
approval: str
|
|
113
|
+
"""The base64 encoded approval program bytecode"""
|
|
121
114
|
clear: str
|
|
115
|
+
"""The base64 encoded clear program bytecode"""
|
|
122
116
|
|
|
123
117
|
@staticmethod
|
|
124
118
|
def from_dict(data: dict[str, Any]) -> ByteCode:
|
|
@@ -134,18 +128,16 @@ class Compiler(str, Enum):
|
|
|
134
128
|
|
|
135
129
|
@dataclass
|
|
136
130
|
class CompilerVersion:
|
|
137
|
-
"""Represents compiler version information.
|
|
138
|
-
|
|
139
|
-
:ivar commit_hash: Git commit hash of the compiler
|
|
140
|
-
:ivar major: Major version number
|
|
141
|
-
:ivar minor: Minor version number
|
|
142
|
-
:ivar patch: Patch version number
|
|
143
|
-
"""
|
|
131
|
+
"""Represents compiler version information."""
|
|
144
132
|
|
|
145
133
|
commit_hash: str | None = None
|
|
134
|
+
"""The git commit hash of the compiler"""
|
|
146
135
|
major: int | None = None
|
|
136
|
+
"""The major version number"""
|
|
147
137
|
minor: int | None = None
|
|
138
|
+
"""The minor version number"""
|
|
148
139
|
patch: int | None = None
|
|
140
|
+
"""The patch version number"""
|
|
149
141
|
|
|
150
142
|
@staticmethod
|
|
151
143
|
def from_dict(data: dict[str, Any]) -> CompilerVersion:
|
|
@@ -154,14 +146,12 @@ class CompilerVersion:
|
|
|
154
146
|
|
|
155
147
|
@dataclass
|
|
156
148
|
class CompilerInfo:
|
|
157
|
-
"""Information about the compiler used.
|
|
158
|
-
|
|
159
|
-
:ivar compiler: Type of compiler used
|
|
160
|
-
:ivar compiler_version: Version information for the compiler
|
|
161
|
-
"""
|
|
149
|
+
"""Information about the compiler used."""
|
|
162
150
|
|
|
163
151
|
compiler: Compiler
|
|
152
|
+
"""The type of compiler used"""
|
|
164
153
|
compiler_version: CompilerVersion
|
|
154
|
+
"""Version information for the compiler"""
|
|
165
155
|
|
|
166
156
|
@staticmethod
|
|
167
157
|
def from_dict(data: dict[str, Any]) -> CompilerInfo:
|
|
@@ -171,12 +161,10 @@ class CompilerInfo:
|
|
|
171
161
|
|
|
172
162
|
@dataclass
|
|
173
163
|
class Network:
|
|
174
|
-
"""Network-specific application information.
|
|
175
|
-
|
|
176
|
-
:ivar app_id: Application ID on the network
|
|
177
|
-
"""
|
|
164
|
+
"""Network-specific application information."""
|
|
178
165
|
|
|
179
166
|
app_id: int
|
|
167
|
+
"""The application ID on the network"""
|
|
180
168
|
|
|
181
169
|
@staticmethod
|
|
182
170
|
def from_dict(data: dict[str, Any]) -> Network:
|
|
@@ -185,14 +173,12 @@ class Network:
|
|
|
185
173
|
|
|
186
174
|
@dataclass
|
|
187
175
|
class ScratchVariables:
|
|
188
|
-
"""Information about scratch space variables.
|
|
189
|
-
|
|
190
|
-
:ivar slot: Scratch slot number
|
|
191
|
-
:ivar type: Type of the scratch variable
|
|
192
|
-
"""
|
|
176
|
+
"""Information about scratch space variables."""
|
|
193
177
|
|
|
194
178
|
slot: int
|
|
179
|
+
"""The scratch slot number"""
|
|
195
180
|
type: str
|
|
181
|
+
"""The type of the scratch variable"""
|
|
196
182
|
|
|
197
183
|
@staticmethod
|
|
198
184
|
def from_dict(data: dict[str, Any]) -> ScratchVariables:
|
|
@@ -201,14 +187,12 @@ class ScratchVariables:
|
|
|
201
187
|
|
|
202
188
|
@dataclass
|
|
203
189
|
class Source:
|
|
204
|
-
"""Source code for approval and clear programs.
|
|
205
|
-
|
|
206
|
-
:ivar approval: Base64 encoded approval program source
|
|
207
|
-
:ivar clear: Base64 encoded clear program source
|
|
208
|
-
"""
|
|
190
|
+
"""Source code for approval and clear programs."""
|
|
209
191
|
|
|
210
192
|
approval: str
|
|
193
|
+
"""The base64 encoded approval program source"""
|
|
211
194
|
clear: str
|
|
195
|
+
"""The base64 encoded clear program source"""
|
|
212
196
|
|
|
213
197
|
@staticmethod
|
|
214
198
|
def from_dict(data: dict[str, Any]) -> Source:
|
|
@@ -234,14 +218,12 @@ class Source:
|
|
|
234
218
|
|
|
235
219
|
@dataclass
|
|
236
220
|
class Global:
|
|
237
|
-
"""Global state schema.
|
|
238
|
-
|
|
239
|
-
:ivar bytes: Number of byte slices in global state
|
|
240
|
-
:ivar ints: Number of integers in global state
|
|
241
|
-
"""
|
|
221
|
+
"""Global state schema."""
|
|
242
222
|
|
|
243
223
|
bytes: int
|
|
224
|
+
"""The number of byte slices in global state"""
|
|
244
225
|
ints: int
|
|
226
|
+
"""The number of integers in global state"""
|
|
245
227
|
|
|
246
228
|
@staticmethod
|
|
247
229
|
def from_dict(data: dict[str, Any]) -> Global:
|
|
@@ -250,14 +232,12 @@ class Global:
|
|
|
250
232
|
|
|
251
233
|
@dataclass
|
|
252
234
|
class Local:
|
|
253
|
-
"""Local state schema.
|
|
254
|
-
|
|
255
|
-
:ivar bytes: Number of byte slices in local state
|
|
256
|
-
:ivar ints: Number of integers in local state
|
|
257
|
-
"""
|
|
235
|
+
"""Local state schema."""
|
|
258
236
|
|
|
259
237
|
bytes: int
|
|
238
|
+
"""The number of byte slices in local state"""
|
|
260
239
|
ints: int
|
|
240
|
+
"""The number of integers in local state"""
|
|
261
241
|
|
|
262
242
|
@staticmethod
|
|
263
243
|
def from_dict(data: dict[str, Any]) -> Local:
|
|
@@ -266,14 +246,12 @@ class Local:
|
|
|
266
246
|
|
|
267
247
|
@dataclass
|
|
268
248
|
class Schema:
|
|
269
|
-
"""Application state schema.
|
|
270
|
-
|
|
271
|
-
:ivar global_state: Global state schema
|
|
272
|
-
:ivar local_state: Local state schema
|
|
273
|
-
"""
|
|
249
|
+
"""Application state schema."""
|
|
274
250
|
|
|
275
251
|
global_state: Global # actual schema field is "global" since it's a reserved word
|
|
252
|
+
"""The global state schema"""
|
|
276
253
|
local_state: Local # actual schema field is "local" for consistency with renamed "global"
|
|
254
|
+
"""The local state schema"""
|
|
277
255
|
|
|
278
256
|
@staticmethod
|
|
279
257
|
def from_dict(data: dict[str, Any]) -> Schema:
|
|
@@ -284,14 +262,12 @@ class Schema:
|
|
|
284
262
|
|
|
285
263
|
@dataclass
|
|
286
264
|
class TemplateVariables:
|
|
287
|
-
"""Template variable information.
|
|
288
|
-
|
|
289
|
-
:ivar type: Type of the template variable
|
|
290
|
-
:ivar value: Optional value of the template variable
|
|
291
|
-
"""
|
|
265
|
+
"""Template variable information."""
|
|
292
266
|
|
|
293
267
|
type: str
|
|
268
|
+
"""The type of the template variable"""
|
|
294
269
|
value: str | None = None
|
|
270
|
+
"""The optional value of the template variable"""
|
|
295
271
|
|
|
296
272
|
@staticmethod
|
|
297
273
|
def from_dict(data: dict[str, Any]) -> TemplateVariables:
|
|
@@ -300,18 +276,16 @@ class TemplateVariables:
|
|
|
300
276
|
|
|
301
277
|
@dataclass
|
|
302
278
|
class EventArg:
|
|
303
|
-
"""Event argument information.
|
|
304
|
-
|
|
305
|
-
:ivar type: Type of the event argument
|
|
306
|
-
:ivar desc: Optional description of the argument
|
|
307
|
-
:ivar name: Optional name of the argument
|
|
308
|
-
:ivar struct: Optional struct type name
|
|
309
|
-
"""
|
|
279
|
+
"""Event argument information."""
|
|
310
280
|
|
|
311
281
|
type: str
|
|
282
|
+
"""The type of the event argument"""
|
|
312
283
|
desc: str | None = None
|
|
284
|
+
"""The optional description of the argument"""
|
|
313
285
|
name: str | None = None
|
|
286
|
+
"""The optional name of the argument"""
|
|
314
287
|
struct: str | None = None
|
|
288
|
+
"""The optional struct type name"""
|
|
315
289
|
|
|
316
290
|
@staticmethod
|
|
317
291
|
def from_dict(data: dict[str, Any]) -> EventArg:
|
|
@@ -320,16 +294,14 @@ class EventArg:
|
|
|
320
294
|
|
|
321
295
|
@dataclass
|
|
322
296
|
class Event:
|
|
323
|
-
"""Event information.
|
|
324
|
-
|
|
325
|
-
:ivar args: List of event arguments
|
|
326
|
-
:ivar name: Name of the event
|
|
327
|
-
:ivar desc: Optional description of the event
|
|
328
|
-
"""
|
|
297
|
+
"""Event information."""
|
|
329
298
|
|
|
330
299
|
args: list[EventArg]
|
|
300
|
+
"""The list of event arguments"""
|
|
331
301
|
name: str
|
|
302
|
+
"""The name of the event"""
|
|
332
303
|
desc: str | None = None
|
|
304
|
+
"""The optional description of the event"""
|
|
333
305
|
|
|
334
306
|
@staticmethod
|
|
335
307
|
def from_dict(data: dict[str, Any]) -> Event:
|
|
@@ -339,14 +311,12 @@ class Event:
|
|
|
339
311
|
|
|
340
312
|
@dataclass
|
|
341
313
|
class Actions:
|
|
342
|
-
"""Method actions information.
|
|
343
|
-
|
|
344
|
-
:ivar call: Optional list of allowed call actions
|
|
345
|
-
:ivar create: Optional list of allowed create actions
|
|
346
|
-
"""
|
|
314
|
+
"""Method actions information."""
|
|
347
315
|
|
|
348
316
|
call: list[CallEnum] | None = None
|
|
317
|
+
"""The optional list of allowed call actions"""
|
|
349
318
|
create: list[CreateEnum] | None = None
|
|
319
|
+
"""The optional list of allowed create actions"""
|
|
350
320
|
|
|
351
321
|
@staticmethod
|
|
352
322
|
def from_dict(data: dict[str, Any]) -> Actions:
|
|
@@ -355,16 +325,14 @@ class Actions:
|
|
|
355
325
|
|
|
356
326
|
@dataclass
|
|
357
327
|
class DefaultValue:
|
|
358
|
-
"""Default value information for method arguments.
|
|
359
|
-
|
|
360
|
-
:ivar data: Default value data
|
|
361
|
-
:ivar source: Source of the default value
|
|
362
|
-
:ivar type: Optional type of the default value
|
|
363
|
-
"""
|
|
328
|
+
"""Default value information for method arguments."""
|
|
364
329
|
|
|
365
330
|
data: str
|
|
331
|
+
"""The default value data"""
|
|
366
332
|
source: Literal["box", "global", "local", "literal", "method"]
|
|
333
|
+
"""The source of the default value"""
|
|
367
334
|
type: str | None = None
|
|
335
|
+
"""The optional type of the default value"""
|
|
368
336
|
|
|
369
337
|
@staticmethod
|
|
370
338
|
def from_dict(data: dict[str, Any]) -> DefaultValue:
|
|
@@ -373,20 +341,18 @@ class DefaultValue:
|
|
|
373
341
|
|
|
374
342
|
@dataclass
|
|
375
343
|
class MethodArg:
|
|
376
|
-
"""Method argument information.
|
|
377
|
-
|
|
378
|
-
:ivar type: Type of the argument
|
|
379
|
-
:ivar default_value: Optional default value
|
|
380
|
-
:ivar desc: Optional description
|
|
381
|
-
:ivar name: Optional name
|
|
382
|
-
:ivar struct: Optional struct type name
|
|
383
|
-
"""
|
|
344
|
+
"""Method argument information."""
|
|
384
345
|
|
|
385
346
|
type: str
|
|
347
|
+
"""The type of the argument"""
|
|
386
348
|
default_value: DefaultValue | None = None
|
|
349
|
+
"""The optional default value"""
|
|
387
350
|
desc: str | None = None
|
|
351
|
+
"""The optional description"""
|
|
388
352
|
name: str | None = None
|
|
353
|
+
"""The optional name"""
|
|
389
354
|
struct: str | None = None
|
|
355
|
+
"""The optional struct type name"""
|
|
390
356
|
|
|
391
357
|
@staticmethod
|
|
392
358
|
def from_dict(data: dict[str, Any]) -> MethodArg:
|
|
@@ -397,18 +363,16 @@ class MethodArg:
|
|
|
397
363
|
|
|
398
364
|
@dataclass
|
|
399
365
|
class Boxes:
|
|
400
|
-
"""Box storage requirements.
|
|
401
|
-
|
|
402
|
-
:ivar key: Box key
|
|
403
|
-
:ivar read_bytes: Number of bytes to read
|
|
404
|
-
:ivar write_bytes: Number of bytes to write
|
|
405
|
-
:ivar app: Optional application ID
|
|
406
|
-
"""
|
|
366
|
+
"""Box storage requirements."""
|
|
407
367
|
|
|
408
368
|
key: str
|
|
369
|
+
"""The box key"""
|
|
409
370
|
read_bytes: int
|
|
371
|
+
"""The number of bytes to read"""
|
|
410
372
|
write_bytes: int
|
|
373
|
+
"""The number of bytes to write"""
|
|
411
374
|
app: int | None = None
|
|
375
|
+
"""The optional application ID"""
|
|
412
376
|
|
|
413
377
|
@staticmethod
|
|
414
378
|
def from_dict(data: dict[str, Any]) -> Boxes:
|
|
@@ -417,20 +381,18 @@ class Boxes:
|
|
|
417
381
|
|
|
418
382
|
@dataclass
|
|
419
383
|
class Recommendations:
|
|
420
|
-
"""Method execution recommendations.
|
|
421
|
-
|
|
422
|
-
:ivar accounts: Optional list of accounts
|
|
423
|
-
:ivar apps: Optional list of applications
|
|
424
|
-
:ivar assets: Optional list of assets
|
|
425
|
-
:ivar boxes: Optional box storage requirements
|
|
426
|
-
:ivar inner_transaction_count: Optional inner transaction count
|
|
427
|
-
"""
|
|
384
|
+
"""Method execution recommendations."""
|
|
428
385
|
|
|
429
386
|
accounts: list[str] | None = None
|
|
387
|
+
"""The optional list of accounts"""
|
|
430
388
|
apps: list[int] | None = None
|
|
389
|
+
"""The optional list of applications"""
|
|
431
390
|
assets: list[int] | None = None
|
|
391
|
+
"""The optional list of assets"""
|
|
432
392
|
boxes: Boxes | None = None
|
|
393
|
+
"""The optional box storage requirements"""
|
|
433
394
|
inner_transaction_count: int | None = None
|
|
395
|
+
"""The optional inner transaction count"""
|
|
434
396
|
|
|
435
397
|
@staticmethod
|
|
436
398
|
def from_dict(data: dict[str, Any]) -> Recommendations:
|
|
@@ -441,16 +403,14 @@ class Recommendations:
|
|
|
441
403
|
|
|
442
404
|
@dataclass
|
|
443
405
|
class Returns:
|
|
444
|
-
"""Method return information.
|
|
445
|
-
|
|
446
|
-
:ivar type: Return type
|
|
447
|
-
:ivar desc: Optional description
|
|
448
|
-
:ivar struct: Optional struct type name
|
|
449
|
-
"""
|
|
406
|
+
"""Method return information."""
|
|
450
407
|
|
|
451
408
|
type: str
|
|
409
|
+
"""The type of the return value"""
|
|
452
410
|
desc: str | None = None
|
|
411
|
+
"""The optional description"""
|
|
453
412
|
struct: str | None = None
|
|
413
|
+
"""The optional struct type name"""
|
|
454
414
|
|
|
455
415
|
@staticmethod
|
|
456
416
|
def from_dict(data: dict[str, Any]) -> Returns:
|
|
@@ -459,26 +419,24 @@ class Returns:
|
|
|
459
419
|
|
|
460
420
|
@dataclass
|
|
461
421
|
class Method:
|
|
462
|
-
"""Method information.
|
|
463
|
-
|
|
464
|
-
:ivar actions: Allowed actions
|
|
465
|
-
:ivar args: Method arguments
|
|
466
|
-
:ivar name: Method name
|
|
467
|
-
:ivar returns: Return information
|
|
468
|
-
:ivar desc: Optional description
|
|
469
|
-
:ivar events: Optional list of events
|
|
470
|
-
:ivar readonly: Optional readonly flag
|
|
471
|
-
:ivar recommendations: Optional execution recommendations
|
|
472
|
-
"""
|
|
422
|
+
"""Method information."""
|
|
473
423
|
|
|
474
424
|
actions: Actions
|
|
425
|
+
"""The allowed actions"""
|
|
475
426
|
args: list[MethodArg]
|
|
427
|
+
"""The method arguments"""
|
|
476
428
|
name: str
|
|
429
|
+
"""The method name"""
|
|
477
430
|
returns: Returns
|
|
431
|
+
"""The return information"""
|
|
478
432
|
desc: str | None = None
|
|
433
|
+
"""The optional description"""
|
|
479
434
|
events: list[Event] | None = None
|
|
435
|
+
"""The optional list of events"""
|
|
480
436
|
readonly: bool | None = None
|
|
437
|
+
"""The optional readonly flag"""
|
|
481
438
|
recommendations: Recommendations | None = None
|
|
439
|
+
"""The optional execution recommendations"""
|
|
482
440
|
|
|
483
441
|
_abi_method: AlgosdkMethod | None = None
|
|
484
442
|
|
|
@@ -516,18 +474,16 @@ class PcOffsetMethod(str, Enum):
|
|
|
516
474
|
|
|
517
475
|
@dataclass
|
|
518
476
|
class SourceInfo:
|
|
519
|
-
"""Source code location information.
|
|
520
|
-
|
|
521
|
-
:ivar pc: List of program counter values
|
|
522
|
-
:ivar error_message: Optional error message
|
|
523
|
-
:ivar source: Optional source code
|
|
524
|
-
:ivar teal: Optional TEAL version
|
|
525
|
-
"""
|
|
477
|
+
"""Source code location information."""
|
|
526
478
|
|
|
527
479
|
pc: list[int]
|
|
480
|
+
"""The list of program counter values"""
|
|
528
481
|
error_message: str | None = None
|
|
482
|
+
"""The optional error message"""
|
|
529
483
|
source: str | None = None
|
|
484
|
+
"""The optional source code"""
|
|
530
485
|
teal: int | None = None
|
|
486
|
+
"""The optional TEAL version"""
|
|
531
487
|
|
|
532
488
|
@staticmethod
|
|
533
489
|
def from_dict(data: dict[str, Any]) -> SourceInfo:
|
|
@@ -536,18 +492,16 @@ class SourceInfo:
|
|
|
536
492
|
|
|
537
493
|
@dataclass
|
|
538
494
|
class StorageKey:
|
|
539
|
-
"""Storage key information.
|
|
540
|
-
|
|
541
|
-
:ivar key: Storage key
|
|
542
|
-
:ivar key_type: Type of the key
|
|
543
|
-
:ivar value_type: Type of the value
|
|
544
|
-
:ivar desc: Optional description
|
|
545
|
-
"""
|
|
495
|
+
"""Storage key information."""
|
|
546
496
|
|
|
547
497
|
key: str
|
|
498
|
+
"""The storage key"""
|
|
548
499
|
key_type: str
|
|
500
|
+
"""The type of the key"""
|
|
549
501
|
value_type: str
|
|
502
|
+
"""The type of the value"""
|
|
550
503
|
desc: str | None = None
|
|
504
|
+
"""The optional description"""
|
|
551
505
|
|
|
552
506
|
@staticmethod
|
|
553
507
|
def from_dict(data: dict[str, Any]) -> StorageKey:
|
|
@@ -556,18 +510,16 @@ class StorageKey:
|
|
|
556
510
|
|
|
557
511
|
@dataclass
|
|
558
512
|
class StorageMap:
|
|
559
|
-
"""Storage map information.
|
|
560
|
-
|
|
561
|
-
:ivar key_type: Type of map keys
|
|
562
|
-
:ivar value_type: Type of map values
|
|
563
|
-
:ivar desc: Optional description
|
|
564
|
-
:ivar prefix: Optional key prefix
|
|
565
|
-
"""
|
|
513
|
+
"""Storage map information."""
|
|
566
514
|
|
|
567
515
|
key_type: str
|
|
516
|
+
"""The type of the map keys"""
|
|
568
517
|
value_type: str
|
|
518
|
+
"""The type of the map values"""
|
|
569
519
|
desc: str | None = None
|
|
520
|
+
"""The optional description"""
|
|
570
521
|
prefix: str | None = None
|
|
522
|
+
"""The optional key prefix"""
|
|
571
523
|
|
|
572
524
|
@staticmethod
|
|
573
525
|
def from_dict(data: dict[str, Any]) -> StorageMap:
|
|
@@ -576,16 +528,14 @@ class StorageMap:
|
|
|
576
528
|
|
|
577
529
|
@dataclass
|
|
578
530
|
class Keys:
|
|
579
|
-
"""Storage keys for different storage types.
|
|
580
|
-
|
|
581
|
-
:ivar box: Box storage keys
|
|
582
|
-
:ivar global_state: Global state storage keys
|
|
583
|
-
:ivar local_state: Local state storage keys
|
|
584
|
-
"""
|
|
531
|
+
"""Storage keys for different storage types."""
|
|
585
532
|
|
|
586
533
|
box: dict[str, StorageKey]
|
|
534
|
+
"""The box storage keys"""
|
|
587
535
|
global_state: dict[str, StorageKey] # actual schema field is "global" since it's a reserved word
|
|
536
|
+
"""The global state storage keys"""
|
|
588
537
|
local_state: dict[str, StorageKey] # actual schema field is "local" for consistency with renamed "global"
|
|
538
|
+
"""The local state storage keys"""
|
|
589
539
|
|
|
590
540
|
@staticmethod
|
|
591
541
|
def from_dict(data: dict[str, Any]) -> Keys:
|
|
@@ -597,16 +547,14 @@ class Keys:
|
|
|
597
547
|
|
|
598
548
|
@dataclass
|
|
599
549
|
class Maps:
|
|
600
|
-
"""Storage maps for different storage types.
|
|
601
|
-
|
|
602
|
-
:ivar box: Box storage maps
|
|
603
|
-
:ivar global_state: Global state storage maps
|
|
604
|
-
:ivar local_state: Local state storage maps
|
|
605
|
-
"""
|
|
550
|
+
"""Storage maps for different storage types."""
|
|
606
551
|
|
|
607
552
|
box: dict[str, StorageMap]
|
|
553
|
+
"""The box storage maps"""
|
|
608
554
|
global_state: dict[str, StorageMap] # actual schema field is "global" since it's a reserved word
|
|
555
|
+
"""The global state storage maps"""
|
|
609
556
|
local_state: dict[str, StorageMap] # actual schema field is "local" for consistency with renamed "global"
|
|
557
|
+
"""The local state storage maps"""
|
|
610
558
|
|
|
611
559
|
@staticmethod
|
|
612
560
|
def from_dict(data: dict[str, Any]) -> Maps:
|
|
@@ -618,16 +566,14 @@ class Maps:
|
|
|
618
566
|
|
|
619
567
|
@dataclass
|
|
620
568
|
class State:
|
|
621
|
-
"""Application state information.
|
|
622
|
-
|
|
623
|
-
:ivar keys: Storage keys
|
|
624
|
-
:ivar maps: Storage maps
|
|
625
|
-
:ivar schema: State schema
|
|
626
|
-
"""
|
|
569
|
+
"""Application state information."""
|
|
627
570
|
|
|
628
571
|
keys: Keys
|
|
572
|
+
"""The storage keys"""
|
|
629
573
|
maps: Maps
|
|
574
|
+
"""The storage maps"""
|
|
630
575
|
schema: Schema
|
|
576
|
+
"""The state schema"""
|
|
631
577
|
|
|
632
578
|
@staticmethod
|
|
633
579
|
def from_dict(data: dict[str, Any]) -> State:
|
|
@@ -639,14 +585,12 @@ class State:
|
|
|
639
585
|
|
|
640
586
|
@dataclass
|
|
641
587
|
class ProgramSourceInfo:
|
|
642
|
-
"""Program source information.
|
|
643
|
-
|
|
644
|
-
:ivar pc_offset_method: PC offset method
|
|
645
|
-
:ivar source_info: List of source info entries
|
|
646
|
-
"""
|
|
588
|
+
"""Program source information."""
|
|
647
589
|
|
|
648
590
|
pc_offset_method: PcOffsetMethod
|
|
591
|
+
"""The PC offset method"""
|
|
649
592
|
source_info: list[SourceInfo]
|
|
593
|
+
"""The list of source info entries"""
|
|
650
594
|
|
|
651
595
|
@staticmethod
|
|
652
596
|
def from_dict(data: dict[str, Any]) -> ProgramSourceInfo:
|
|
@@ -656,14 +600,12 @@ class ProgramSourceInfo:
|
|
|
656
600
|
|
|
657
601
|
@dataclass
|
|
658
602
|
class SourceInfoModel:
|
|
659
|
-
"""Source information for approval and clear programs.
|
|
660
|
-
|
|
661
|
-
:ivar approval: Approval program source info
|
|
662
|
-
:ivar clear: Clear program source info
|
|
663
|
-
"""
|
|
603
|
+
"""Source information for approval and clear programs."""
|
|
664
604
|
|
|
665
605
|
approval: ProgramSourceInfo
|
|
606
|
+
"""The approval program source info"""
|
|
666
607
|
clear: ProgramSourceInfo
|
|
608
|
+
"""The clear program source info"""
|
|
667
609
|
|
|
668
610
|
@staticmethod
|
|
669
611
|
def from_dict(data: dict[str, Any]) -> SourceInfoModel:
|
|
@@ -912,39 +854,38 @@ class Arc56Contract:
|
|
|
912
854
|
"""ARC-0056 application specification.
|
|
913
855
|
|
|
914
856
|
See https://github.com/algorandfoundation/ARCs/blob/main/ARCs/arc-0056.md
|
|
915
|
-
|
|
916
|
-
:ivar arcs: List of supported ARC version numbers
|
|
917
|
-
:ivar bare_actions: Bare call and create actions
|
|
918
|
-
:ivar methods: List of contract methods
|
|
919
|
-
:ivar name: Contract name
|
|
920
|
-
:ivar state: Contract state information
|
|
921
|
-
:ivar structs: Contract struct definitions
|
|
922
|
-
:ivar byte_code: Optional bytecode for approval and clear programs
|
|
923
|
-
:ivar compiler_info: Optional compiler information
|
|
924
|
-
:ivar desc: Optional contract description
|
|
925
|
-
:ivar events: Optional list of contract events
|
|
926
|
-
:ivar networks: Optional network deployment information
|
|
927
|
-
:ivar scratch_variables: Optional scratch variable information
|
|
928
|
-
:ivar source: Optional source code
|
|
929
|
-
:ivar source_info: Optional source code information
|
|
930
|
-
:ivar template_variables: Optional template variable information
|
|
931
857
|
"""
|
|
932
858
|
|
|
933
859
|
arcs: list[int]
|
|
860
|
+
"""The list of supported ARC version numbers"""
|
|
934
861
|
bare_actions: BareActions
|
|
862
|
+
"""The bare call and create actions"""
|
|
935
863
|
methods: list[Method]
|
|
864
|
+
"""The list of contract methods"""
|
|
936
865
|
name: str
|
|
866
|
+
"""The contract name"""
|
|
937
867
|
state: State
|
|
868
|
+
"""The contract state information"""
|
|
938
869
|
structs: dict[str, list[StructField]]
|
|
870
|
+
"""The contract struct definitions"""
|
|
939
871
|
byte_code: ByteCode | None = None
|
|
872
|
+
"""The optional bytecode for approval and clear programs"""
|
|
940
873
|
compiler_info: CompilerInfo | None = None
|
|
874
|
+
"""The optional compiler information"""
|
|
941
875
|
desc: str | None = None
|
|
876
|
+
"""The optional contract description"""
|
|
942
877
|
events: list[Event] | None = None
|
|
878
|
+
"""The optional list of contract events"""
|
|
943
879
|
networks: dict[str, Network] | None = None
|
|
880
|
+
"""The optional network deployment information"""
|
|
944
881
|
scratch_variables: dict[str, ScratchVariables] | None = None
|
|
882
|
+
"""The optional scratch variable information"""
|
|
945
883
|
source: Source | None = None
|
|
884
|
+
"""The optional source code"""
|
|
946
885
|
source_info: SourceInfoModel | None = None
|
|
886
|
+
"""The optional source code information"""
|
|
947
887
|
template_variables: dict[str, TemplateVariables] | None = None
|
|
888
|
+
"""The optional template variable information"""
|
|
948
889
|
|
|
949
890
|
@staticmethod
|
|
950
891
|
def from_dict(application_spec: dict) -> Arc56Contract:
|