@meantjs/profile 0.2.0 → 0.3.0
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.
- package/CHANGELOG.md +15 -0
- package/README.md +12 -4
- package/data/packs/dai-permit.profile.json +113 -0
- package/data/packs/erc2612.profile.json +196 -0
- package/data/packs/permit2.profile.json +436 -0
- package/data/profile-v0.schema.json +151 -9
- package/data/profile-v0.validate.mjs +11 -2
- package/package.json +1 -1
- package/src/abi-iface.mjs +49 -7
- package/src/abi-pack.mjs +5 -2
- package/src/abi.mjs +111 -4
- package/src/analyze.mjs +13 -3
- package/src/browser.mjs +6 -1
- package/src/checks.mjs +21 -1
- package/src/evm.d.mts +18 -3
- package/src/evm.mjs +5 -1
- package/src/resolve.mjs +45 -7
- package/src/resolved.mjs +14 -2
- package/src/validate.mjs +8 -4
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "candid-profile",
|
|
3
|
+
"format_version": 0,
|
|
4
|
+
"kind": "contract",
|
|
5
|
+
"name": "permit2",
|
|
6
|
+
"origin": "third_party",
|
|
7
|
+
"language": "en",
|
|
8
|
+
"description": "Uniswap's Permit2 (spec section 15.9, experimental): its AllowanceTransfer messages (PermitSingle, PermitBatch), which set allowances, and its SignatureTransfer messages (PermitTransferFrom, PermitBatchTransferFrom), which authorize one transfer. Witness messages (PermitWitnessTransferFrom) are left out: each protocol adds its own witness type (O1). Bound to the deployments ERC-7730's own Permit2 example lists, so a look-alike contract named \"Permit2\" gets none of these words. Amounts are in the token the message names: a consumer supplies that token's decimals() and symbol(), and shows its address beside the symbol.",
|
|
9
|
+
"binds": {
|
|
10
|
+
"eip712": {
|
|
11
|
+
"domain": {
|
|
12
|
+
"name": "Permit2"
|
|
13
|
+
},
|
|
14
|
+
"types": {
|
|
15
|
+
"PermitBatch": [
|
|
16
|
+
{
|
|
17
|
+
"name": "details",
|
|
18
|
+
"type": "PermitDetails[]"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "spender",
|
|
22
|
+
"type": "address"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "sigDeadline",
|
|
26
|
+
"type": "uint256"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"PermitBatchTransferFrom": [
|
|
30
|
+
{
|
|
31
|
+
"name": "permitted",
|
|
32
|
+
"type": "TokenPermissions[]"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "spender",
|
|
36
|
+
"type": "address"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "nonce",
|
|
40
|
+
"type": "uint256"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "deadline",
|
|
44
|
+
"type": "uint256"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"PermitDetails": [
|
|
48
|
+
{
|
|
49
|
+
"name": "token",
|
|
50
|
+
"type": "address"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "amount",
|
|
54
|
+
"type": "uint160"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "expiration",
|
|
58
|
+
"type": "uint48"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "nonce",
|
|
62
|
+
"type": "uint48"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"PermitSingle": [
|
|
66
|
+
{
|
|
67
|
+
"name": "details",
|
|
68
|
+
"type": "PermitDetails"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "spender",
|
|
72
|
+
"type": "address"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "sigDeadline",
|
|
76
|
+
"type": "uint256"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"PermitTransferFrom": [
|
|
80
|
+
{
|
|
81
|
+
"name": "permitted",
|
|
82
|
+
"type": "TokenPermissions"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "spender",
|
|
86
|
+
"type": "address"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "nonce",
|
|
90
|
+
"type": "uint256"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "deadline",
|
|
94
|
+
"type": "uint256"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"TokenPermissions": [
|
|
98
|
+
{
|
|
99
|
+
"name": "token",
|
|
100
|
+
"type": "address"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "amount",
|
|
104
|
+
"type": "uint256"
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"deployments": [
|
|
110
|
+
{
|
|
111
|
+
"chain_id": 1,
|
|
112
|
+
"address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"chain_id": 42161,
|
|
116
|
+
"address": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
"annotations": [
|
|
121
|
+
{
|
|
122
|
+
"at": "PermitSingle",
|
|
123
|
+
"tag": "intent",
|
|
124
|
+
"args": {
|
|
125
|
+
"title": "Permit2: allow token spending",
|
|
126
|
+
"template": "Let {spender} spend up to {details.amount}. Allowance expires: {details.expiration}. Signature expires: {sigDeadline}."
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"at": "PermitSingle",
|
|
131
|
+
"tag": "effect",
|
|
132
|
+
"args": {
|
|
133
|
+
"kind": "approve",
|
|
134
|
+
"irreversible": false
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"at": "PermitSingle(0).details.token",
|
|
139
|
+
"tag": "describe",
|
|
140
|
+
"args": {
|
|
141
|
+
"label": "Token"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"at": "PermitSingle(0).details.amount",
|
|
146
|
+
"tag": "amount",
|
|
147
|
+
"args": {
|
|
148
|
+
"token": "details.token",
|
|
149
|
+
"threshold": "1461501637330902918203684832716283019655932542975"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"at": "PermitSingle(0).details.amount",
|
|
154
|
+
"tag": "describe",
|
|
155
|
+
"args": {
|
|
156
|
+
"label": "Amount"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"at": "PermitSingle(0).details.expiration",
|
|
161
|
+
"tag": "timestamp",
|
|
162
|
+
"args": {
|
|
163
|
+
"unit": "s",
|
|
164
|
+
"epoch": "unix",
|
|
165
|
+
"threshold": "281474976710655",
|
|
166
|
+
"message": "Never",
|
|
167
|
+
"labels": {
|
|
168
|
+
"0": "Only in the block it is used"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"at": "PermitSingle(0).details.expiration",
|
|
174
|
+
"tag": "describe",
|
|
175
|
+
"args": {
|
|
176
|
+
"label": "Allowance expires"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"at": "PermitSingle(0).details.nonce",
|
|
181
|
+
"tag": "describe",
|
|
182
|
+
"args": {
|
|
183
|
+
"label": "Nonce"
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"at": "PermitSingle(0).spender",
|
|
188
|
+
"tag": "describe",
|
|
189
|
+
"args": {
|
|
190
|
+
"label": "Spender"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"at": "PermitSingle(0).sigDeadline",
|
|
195
|
+
"tag": "timestamp",
|
|
196
|
+
"args": {
|
|
197
|
+
"unit": "s",
|
|
198
|
+
"epoch": "unix",
|
|
199
|
+
"threshold": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
|
|
200
|
+
"message": "Never"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"at": "PermitSingle(0).sigDeadline",
|
|
205
|
+
"tag": "describe",
|
|
206
|
+
"args": {
|
|
207
|
+
"label": "Signature expires"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"at": "PermitBatch",
|
|
212
|
+
"tag": "intent",
|
|
213
|
+
"args": {
|
|
214
|
+
"title": "Permit2: allow spending of several tokens",
|
|
215
|
+
"template": "Let {spender} spend up to {details[].amount}. Allowances expire, in the same order: {details[].expiration}. Signature expires: {sigDeadline}."
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"at": "PermitBatch",
|
|
220
|
+
"tag": "effect",
|
|
221
|
+
"args": {
|
|
222
|
+
"kind": "approve",
|
|
223
|
+
"irreversible": false
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"at": "PermitBatch(0).details[].token",
|
|
228
|
+
"tag": "describe",
|
|
229
|
+
"args": {
|
|
230
|
+
"label": "Token"
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"at": "PermitBatch(0).details[].amount",
|
|
235
|
+
"tag": "amount",
|
|
236
|
+
"args": {
|
|
237
|
+
"token": "details[].token",
|
|
238
|
+
"threshold": "1461501637330902918203684832716283019655932542975"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"at": "PermitBatch(0).details[].amount",
|
|
243
|
+
"tag": "describe",
|
|
244
|
+
"args": {
|
|
245
|
+
"label": "Amount"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"at": "PermitBatch(0).details[].expiration",
|
|
250
|
+
"tag": "timestamp",
|
|
251
|
+
"args": {
|
|
252
|
+
"unit": "s",
|
|
253
|
+
"epoch": "unix",
|
|
254
|
+
"threshold": "281474976710655",
|
|
255
|
+
"message": "Never",
|
|
256
|
+
"labels": {
|
|
257
|
+
"0": "Only in the block it is used"
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"at": "PermitBatch(0).details[].expiration",
|
|
263
|
+
"tag": "describe",
|
|
264
|
+
"args": {
|
|
265
|
+
"label": "Allowance expires"
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"at": "PermitBatch(0).details[].nonce",
|
|
270
|
+
"tag": "describe",
|
|
271
|
+
"args": {
|
|
272
|
+
"label": "Nonce"
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"at": "PermitBatch(0).spender",
|
|
277
|
+
"tag": "describe",
|
|
278
|
+
"args": {
|
|
279
|
+
"label": "Spender"
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"at": "PermitBatch(0).sigDeadline",
|
|
284
|
+
"tag": "timestamp",
|
|
285
|
+
"args": {
|
|
286
|
+
"unit": "s",
|
|
287
|
+
"epoch": "unix",
|
|
288
|
+
"threshold": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
|
|
289
|
+
"message": "Never"
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"at": "PermitBatch(0).sigDeadline",
|
|
294
|
+
"tag": "describe",
|
|
295
|
+
"args": {
|
|
296
|
+
"label": "Signature expires"
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"at": "PermitTransferFrom",
|
|
301
|
+
"tag": "intent",
|
|
302
|
+
"args": {
|
|
303
|
+
"title": "Permit2: allow one transfer",
|
|
304
|
+
"template": "Let {spender} transfer up to {permitted.amount} from you, once. Signature expires: {deadline}."
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"at": "PermitTransferFrom",
|
|
309
|
+
"tag": "effect",
|
|
310
|
+
"args": {
|
|
311
|
+
"kind": "transfer",
|
|
312
|
+
"irreversible": true
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"at": "PermitTransferFrom(0).permitted.token",
|
|
317
|
+
"tag": "describe",
|
|
318
|
+
"args": {
|
|
319
|
+
"label": "Token"
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"at": "PermitTransferFrom(0).permitted.amount",
|
|
324
|
+
"tag": "amount",
|
|
325
|
+
"args": {
|
|
326
|
+
"token": "permitted.token"
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"at": "PermitTransferFrom(0).permitted.amount",
|
|
331
|
+
"tag": "describe",
|
|
332
|
+
"args": {
|
|
333
|
+
"label": "Up to"
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"at": "PermitTransferFrom(0).spender",
|
|
338
|
+
"tag": "describe",
|
|
339
|
+
"args": {
|
|
340
|
+
"label": "Spender"
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"at": "PermitTransferFrom(0).nonce",
|
|
345
|
+
"tag": "describe",
|
|
346
|
+
"args": {
|
|
347
|
+
"label": "Nonce"
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"at": "PermitTransferFrom(0).deadline",
|
|
352
|
+
"tag": "timestamp",
|
|
353
|
+
"args": {
|
|
354
|
+
"unit": "s",
|
|
355
|
+
"epoch": "unix",
|
|
356
|
+
"threshold": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
|
|
357
|
+
"message": "Never"
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"at": "PermitTransferFrom(0).deadline",
|
|
362
|
+
"tag": "describe",
|
|
363
|
+
"args": {
|
|
364
|
+
"label": "Signature expires"
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"at": "PermitBatchTransferFrom",
|
|
369
|
+
"tag": "intent",
|
|
370
|
+
"args": {
|
|
371
|
+
"title": "Permit2: allow one transfer of several tokens",
|
|
372
|
+
"template": "Let {spender} transfer up to {permitted[].amount} from you, once. Signature expires: {deadline}."
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"at": "PermitBatchTransferFrom",
|
|
377
|
+
"tag": "effect",
|
|
378
|
+
"args": {
|
|
379
|
+
"kind": "transfer",
|
|
380
|
+
"irreversible": true
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"at": "PermitBatchTransferFrom(0).permitted[].token",
|
|
385
|
+
"tag": "describe",
|
|
386
|
+
"args": {
|
|
387
|
+
"label": "Token"
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"at": "PermitBatchTransferFrom(0).permitted[].amount",
|
|
392
|
+
"tag": "amount",
|
|
393
|
+
"args": {
|
|
394
|
+
"token": "permitted[].token"
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"at": "PermitBatchTransferFrom(0).permitted[].amount",
|
|
399
|
+
"tag": "describe",
|
|
400
|
+
"args": {
|
|
401
|
+
"label": "Up to"
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"at": "PermitBatchTransferFrom(0).spender",
|
|
406
|
+
"tag": "describe",
|
|
407
|
+
"args": {
|
|
408
|
+
"label": "Spender"
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"at": "PermitBatchTransferFrom(0).nonce",
|
|
413
|
+
"tag": "describe",
|
|
414
|
+
"args": {
|
|
415
|
+
"label": "Nonce"
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"at": "PermitBatchTransferFrom(0).deadline",
|
|
420
|
+
"tag": "timestamp",
|
|
421
|
+
"args": {
|
|
422
|
+
"unit": "s",
|
|
423
|
+
"epoch": "unix",
|
|
424
|
+
"threshold": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
|
|
425
|
+
"message": "Never"
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"at": "PermitBatchTransferFrom(0).deadline",
|
|
430
|
+
"tag": "describe",
|
|
431
|
+
"args": {
|
|
432
|
+
"label": "Signature expires"
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
]
|
|
436
|
+
}
|
|
@@ -150,6 +150,10 @@
|
|
|
150
150
|
"abi": {
|
|
151
151
|
"$ref": "#/$defs/evm_abi",
|
|
152
152
|
"description": "An EVM pack (spec section 15, experimental): the functions it applies to. The pack applies to a contract that has each of them, with the same selector, outputs and kind of call."
|
|
153
|
+
},
|
|
154
|
+
"eip712": {
|
|
155
|
+
"$ref": "#/$defs/eip712",
|
|
156
|
+
"description": "An EVM pack's EIP-712 messages (spec section 15.9), beside its binds.abi."
|
|
153
157
|
}
|
|
154
158
|
},
|
|
155
159
|
"oneOf": [
|
|
@@ -169,7 +173,12 @@
|
|
|
169
173
|
"abi": true
|
|
170
174
|
}
|
|
171
175
|
}
|
|
172
|
-
]
|
|
176
|
+
],
|
|
177
|
+
"dependentRequired": {
|
|
178
|
+
"eip712": [
|
|
179
|
+
"abi"
|
|
180
|
+
]
|
|
181
|
+
}
|
|
173
182
|
},
|
|
174
183
|
"canister_binds": {
|
|
175
184
|
"type": "object",
|
|
@@ -194,10 +203,7 @@
|
|
|
194
203
|
},
|
|
195
204
|
"contract_binds": {
|
|
196
205
|
"type": "object",
|
|
197
|
-
"description": "An EVM contract (spec section 15, experimental): its ABI, and where it is deployed.",
|
|
198
|
-
"required": [
|
|
199
|
-
"abi"
|
|
200
|
-
],
|
|
206
|
+
"description": "An EVM contract (spec section 15, experimental): its ABI, the EIP-712 messages it verifies (section 15.9), and where it is deployed.",
|
|
201
207
|
"additionalProperties": false,
|
|
202
208
|
"properties": {
|
|
203
209
|
"abi": {
|
|
@@ -225,8 +231,29 @@
|
|
|
225
231
|
}
|
|
226
232
|
}
|
|
227
233
|
}
|
|
234
|
+
},
|
|
235
|
+
"eip712": {
|
|
236
|
+
"$ref": "#/$defs/eip712"
|
|
228
237
|
}
|
|
229
|
-
}
|
|
238
|
+
},
|
|
239
|
+
"anyOf": [
|
|
240
|
+
{
|
|
241
|
+
"required": [
|
|
242
|
+
"abi"
|
|
243
|
+
],
|
|
244
|
+
"properties": {
|
|
245
|
+
"abi": true
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"required": [
|
|
250
|
+
"eip712"
|
|
251
|
+
],
|
|
252
|
+
"properties": {
|
|
253
|
+
"eip712": true
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
]
|
|
230
257
|
},
|
|
231
258
|
"evm_abi": {
|
|
232
259
|
"type": "array",
|
|
@@ -259,6 +286,61 @@
|
|
|
259
286
|
]
|
|
260
287
|
}
|
|
261
288
|
},
|
|
289
|
+
"eip712": {
|
|
290
|
+
"type": "object",
|
|
291
|
+
"description": "EIP-712 typed messages (spec section 15.9, experimental): the struct types, in the JSON shape of an eth_signTypedData request without EIP712Domain, and the domain's name and version. A type whose name the profile tags with intent is a message; chainId and verifyingContract come from binds.deployments.",
|
|
292
|
+
"required": [
|
|
293
|
+
"types"
|
|
294
|
+
],
|
|
295
|
+
"additionalProperties": false,
|
|
296
|
+
"properties": {
|
|
297
|
+
"domain": {
|
|
298
|
+
"type": "object",
|
|
299
|
+
"minProperties": 1,
|
|
300
|
+
"additionalProperties": false,
|
|
301
|
+
"description": "Each value must equal the request's domain value of the same name (ERC-7730 context.eip712.domain).",
|
|
302
|
+
"properties": {
|
|
303
|
+
"name": {
|
|
304
|
+
"type": "string",
|
|
305
|
+
"minLength": 1
|
|
306
|
+
},
|
|
307
|
+
"version": {
|
|
308
|
+
"type": "string",
|
|
309
|
+
"minLength": 1
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
"types": {
|
|
314
|
+
"type": "object",
|
|
315
|
+
"minProperties": 1,
|
|
316
|
+
"propertyNames": {
|
|
317
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
|
|
318
|
+
},
|
|
319
|
+
"additionalProperties": {
|
|
320
|
+
"type": "array",
|
|
321
|
+
"minItems": 1,
|
|
322
|
+
"items": {
|
|
323
|
+
"type": "object",
|
|
324
|
+
"required": [
|
|
325
|
+
"name",
|
|
326
|
+
"type"
|
|
327
|
+
],
|
|
328
|
+
"additionalProperties": false,
|
|
329
|
+
"properties": {
|
|
330
|
+
"name": {
|
|
331
|
+
"type": "string",
|
|
332
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
|
|
333
|
+
},
|
|
334
|
+
"type": {
|
|
335
|
+
"type": "string",
|
|
336
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_]*(\\[([1-9][0-9]*)?\\])*$"
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
},
|
|
262
344
|
"value_address": {
|
|
263
345
|
"type": "string",
|
|
264
346
|
"description": "METHOD(i)path | METHOD->(i)path | type:DECL path. Paths: .label, .#id, [] (vec element). opt is transparent.",
|
|
@@ -746,9 +828,6 @@
|
|
|
746
828
|
},
|
|
747
829
|
"args_amount": {
|
|
748
830
|
"type": "object",
|
|
749
|
-
"required": [
|
|
750
|
-
"decimals"
|
|
751
|
-
],
|
|
752
831
|
"additionalProperties": false,
|
|
753
832
|
"properties": {
|
|
754
833
|
"decimals": {
|
|
@@ -775,6 +854,10 @@
|
|
|
775
854
|
}
|
|
776
855
|
]
|
|
777
856
|
},
|
|
857
|
+
"token": {
|
|
858
|
+
"$ref": "#/$defs/relpath",
|
|
859
|
+
"description": "An EVM amount in a token another field names (spec section 15.9): the relative path to that address, in the same array element as the amount. Its decimals and symbol are the token's, which the consumer supplies; decimals and symbol are then left out."
|
|
860
|
+
},
|
|
778
861
|
"threshold": {
|
|
779
862
|
"type": "string",
|
|
780
863
|
"pattern": "^(0|[1-9][0-9]{0,77})$",
|
|
@@ -791,6 +874,32 @@
|
|
|
791
874
|
"message": [
|
|
792
875
|
"threshold"
|
|
793
876
|
]
|
|
877
|
+
},
|
|
878
|
+
"anyOf": [
|
|
879
|
+
{
|
|
880
|
+
"required": [
|
|
881
|
+
"decimals"
|
|
882
|
+
],
|
|
883
|
+
"properties": {
|
|
884
|
+
"decimals": true
|
|
885
|
+
}
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
"required": [
|
|
889
|
+
"token"
|
|
890
|
+
],
|
|
891
|
+
"properties": {
|
|
892
|
+
"token": true
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
],
|
|
896
|
+
"dependentSchemas": {
|
|
897
|
+
"token": {
|
|
898
|
+
"properties": {
|
|
899
|
+
"decimals": false,
|
|
900
|
+
"symbol": false
|
|
901
|
+
}
|
|
902
|
+
}
|
|
794
903
|
}
|
|
795
904
|
},
|
|
796
905
|
"args_timestamp": {
|
|
@@ -805,7 +914,40 @@
|
|
|
805
914
|
},
|
|
806
915
|
"epoch": {
|
|
807
916
|
"const": "unix"
|
|
917
|
+
},
|
|
918
|
+
"threshold": {
|
|
919
|
+
"type": "string",
|
|
920
|
+
"pattern": "^(0|[1-9][0-9]{0,77})$",
|
|
921
|
+
"description": "Display only: a value at or above this (in the tagged unit, a decimal string) displays as `message`, for example \"Never\" for a deadline of uint256 max (spec section 15.9)."
|
|
922
|
+
},
|
|
923
|
+
"message": {
|
|
924
|
+
"type": "string",
|
|
925
|
+
"minLength": 1,
|
|
926
|
+
"maxLength": 32,
|
|
927
|
+
"description": "What a value at or above `threshold` displays as."
|
|
928
|
+
},
|
|
929
|
+
"labels": {
|
|
930
|
+
"type": "object",
|
|
931
|
+
"minProperties": 1,
|
|
932
|
+
"maxProperties": 16,
|
|
933
|
+
"propertyNames": {
|
|
934
|
+
"pattern": "^(0|[1-9][0-9]{0,77})$"
|
|
935
|
+
},
|
|
936
|
+
"additionalProperties": {
|
|
937
|
+
"type": "string",
|
|
938
|
+
"minLength": 1,
|
|
939
|
+
"maxLength": 32
|
|
940
|
+
},
|
|
941
|
+
"description": "Display only: words for exact values (in the tagged unit), for example { \"0\": \"Only in the block it is used\" } (spec section 15.9)."
|
|
808
942
|
}
|
|
943
|
+
},
|
|
944
|
+
"dependentRequired": {
|
|
945
|
+
"message": [
|
|
946
|
+
"threshold"
|
|
947
|
+
],
|
|
948
|
+
"threshold": [
|
|
949
|
+
"message"
|
|
950
|
+
]
|
|
809
951
|
}
|
|
810
952
|
},
|
|
811
953
|
"args_duration": {
|