@openzeppelin/compact-contracts 0.4.0-alpha.1 → 0.4.0-alpha.2

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.
Files changed (46) hide show
  1. package/README.md +9 -5
  2. package/access/AccessControl.compact +13 -13
  3. package/access/Ownable.compact +15 -9
  4. package/access/ShieldedAccessControl.compact +25 -1
  5. package/access/ZOwnablePK.compact +8 -8
  6. package/crypto/EcdhMask.compact +1 -1
  7. package/crypto/Ecdsa.compact +4 -4
  8. package/crypto/Eip712.compact +168 -0
  9. package/crypto/ElGamal.compact +1 -1
  10. package/multisig/EcdsaSignerManager.compact +32 -15
  11. package/multisig/ForwarderPrivate.compact +11 -5
  12. package/multisig/ForwarderShielded.compact +2 -2
  13. package/multisig/ForwarderUnshielded.compact +2 -2
  14. package/multisig/ProposalManager.compact +194 -22
  15. package/multisig/ShieldedTreasury.compact +28 -1
  16. package/multisig/ShieldedTreasuryStateless.compact +1 -1
  17. package/multisig/Signer.compact +27 -79
  18. package/multisig/UnshieldedTreasury.compact +9 -1
  19. package/multisig/{presets/forwarder/ForwarderPrivate.compact → examples/ForwarderPrivateExample.compact} +3 -3
  20. package/multisig/{presets/forwarder/ForwarderShielded.compact → examples/ForwarderShieldedExample.compact} +3 -3
  21. package/multisig/{presets/forwarder/ForwarderUnshielded.compact → examples/ForwarderUnshieldedExample.compact} +3 -3
  22. package/multisig/examples/NativeShieldedTokenIssuerExample.compact +143 -0
  23. package/multisig/examples/ShieldedMultiSigV2Example.compact +77 -0
  24. package/multisig/presets/NativeShieldedTokenIssuer.compact +542 -0
  25. package/multisig/presets/ShieldedMultiSigV2.compact +251 -188
  26. package/package.json +15 -11
  27. package/security/Allowlist.compact +5 -5
  28. package/security/Blocklist.compact +5 -5
  29. package/security/Initializable.compact +8 -4
  30. package/security/Pausable.compact +10 -6
  31. package/token/ConfidentialFungibleToken.compact +80 -21
  32. package/token/FungibleToken.compact +35 -21
  33. package/token/MultiToken.compact +15 -15
  34. package/token/NativeShieldedToken.compact +9 -9
  35. package/token/NativeShieldedTokenCore.compact +19 -9
  36. package/token/NativeShieldedTokenFamily.compact +9 -9
  37. package/token/NonFungibleToken.compact +32 -27
  38. package/token/extensions/ConfidentialFungibleTokenPublicSupply.compact +11 -6
  39. package/token/extensions/NativeShieldedTokenDerivedNonce.compact +2 -2
  40. package/token/extensions/NativeShieldedTokenFamilyPublicSupply.compact +5 -5
  41. package/token/extensions/NativeShieldedTokenPublicSupply.compact +5 -5
  42. package/token/extensions/NativeShieldedTokenPublicSupplyCore.compact +5 -5
  43. package/utils/EvmAbi.compact +134 -0
  44. package/utils/Utils.compact +1 -1
  45. package/multisig/presets/ShieldedMultiSig.compact +0 -227
  46. package/multisig/presets/ShieldedMultiSigV3.compact +0 -311
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // OpenZeppelin Compact Contracts v0.4.0-alpha.1 (token/NativeShieldedTokenCore.compact)
2
+ // OpenZeppelin Compact Contracts v0.4.0-alpha.2 (token/NativeShieldedTokenCore.compact)
3
3
 
4
4
  pragma language_version >= 0.26.0;
5
5
 
@@ -70,8 +70,18 @@ module NativeShieldedTokenCore {
70
70
  */
71
71
  export ledger _isInitialized: Boolean;
72
72
 
73
+ /**
74
+ * @description The token's human-readable name, set once at construction.
75
+ */
73
76
  export sealed ledger _name: Opaque<"string">;
77
+ /**
78
+ * @description The token's ticker symbol, set once at construction.
79
+ */
74
80
  export sealed ledger _symbol: Opaque<"string">;
81
+ /**
82
+ * @description The number of decimals used to display balances, set once at
83
+ * construction. Purely presentational; no circuit scales by it.
84
+ */
75
85
  export sealed ledger _decimals: Uint<8>;
76
86
 
77
87
  /**
@@ -130,7 +140,7 @@ module NativeShieldedTokenCore {
130
140
  * @dev Does not gate on init (it reports it), so it is safe to call before
131
141
  * `initialize`.
132
142
  *
133
- * @circuitInfo k=6, rows=26
143
+ * @constraints k=6, rows=24
134
144
  *
135
145
  * @return {Boolean} - True once `initialize` has run.
136
146
  */
@@ -141,7 +151,7 @@ module NativeShieldedTokenCore {
141
151
  /**
142
152
  * @description Returns the token name.
143
153
  *
144
- * @circuitInfo k=6, rows=28
154
+ * @constraints k=6, rows=26
145
155
  *
146
156
  * Requirements:
147
157
  *
@@ -157,7 +167,7 @@ module NativeShieldedTokenCore {
157
167
  /**
158
168
  * @description Returns the symbol of the token.
159
169
  *
160
- * @circuitInfo k=6, rows=28
170
+ * @constraints k=6, rows=26
161
171
  *
162
172
  * Requirements:
163
173
  *
@@ -175,7 +185,7 @@ module NativeShieldedTokenCore {
175
185
  * @dev This is a display convention only. The protocol stores and operates
176
186
  * on integer values without reference to decimals.
177
187
  *
178
- * @circuitInfo k=6, rows=28
188
+ * @constraints k=6, rows=26
179
189
  *
180
190
  * Requirements:
181
191
  *
@@ -192,7 +202,7 @@ module NativeShieldedTokenCore {
192
202
  * @description Returns the coin color for `domain` under this contract's
193
203
  * address: `tokenType(domain, kernel.self())`, computed at call time.
194
204
  *
195
- * @circuitInfo k=13, rows=4248
205
+ * @constraints k=13, rows=4239
196
206
  *
197
207
  * Requirements:
198
208
  *
@@ -218,7 +228,7 @@ module NativeShieldedTokenCore {
218
228
  * recipient; callers SHOULD deliver it out of band. Wallets cannot detect
219
229
  * contract-minted coins by scanning the chain.
220
230
  *
221
- * @circuitInfo k=14, rows=11119
231
+ * @constraints k=14, rows=11096
222
232
  *
223
233
  * Requirements:
224
234
  *
@@ -261,7 +271,7 @@ module NativeShieldedTokenCore {
261
271
  * `refundTo`; callers SHOULD deliver it out of band. Wallets cannot detect
262
272
  * contract-sent coins by scanning the chain.
263
273
  *
264
- * @circuitInfo k=16, rows=47932
274
+ * @constraints k=16, rows=47753
265
275
  *
266
276
  * Requirements:
267
277
  *
@@ -313,7 +323,7 @@ module NativeShieldedTokenCore {
313
323
  * ledger state: the change replaces `coin` as the contract's holding, and
314
324
  * its info is not otherwise recoverable.
315
325
  *
316
- * @circuitInfo k=15, rows=23583
326
+ * @constraints k=15, rows=23484
317
327
  *
318
328
  * Requirements:
319
329
  *
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // OpenZeppelin Compact Contracts v0.4.0-alpha.1 (token/NativeShieldedTokenFamily.compact)
2
+ // OpenZeppelin Compact Contracts v0.4.0-alpha.2 (token/NativeShieldedTokenFamily.compact)
3
3
 
4
4
  pragma language_version >= 0.26.0;
5
5
 
@@ -97,7 +97,7 @@ module NativeShieldedTokenFamily {
97
97
  /**
98
98
  * @description Returns whether the contract has been initialized.
99
99
  *
100
- * @circuitInfo k=6, rows=26
100
+ * @constraints k=6, rows=24
101
101
  *
102
102
  * @return {Boolean} - True once `initialize` has run.
103
103
  */
@@ -110,7 +110,7 @@ module NativeShieldedTokenFamily {
110
110
  * contract. Per-type identity belongs in the consumer's own state; see the
111
111
  * module notes.
112
112
  *
113
- * @circuitInfo k=6, rows=28
113
+ * @constraints k=6, rows=26
114
114
  *
115
115
  * Requirements:
116
116
  *
@@ -126,7 +126,7 @@ module NativeShieldedTokenFamily {
126
126
  * @description Returns the family symbol shared by all token types of this
127
127
  * contract.
128
128
  *
129
- * @circuitInfo k=6, rows=28
129
+ * @constraints k=6, rows=26
130
130
  *
131
131
  * Requirements:
132
132
  *
@@ -142,7 +142,7 @@ module NativeShieldedTokenFamily {
142
142
  * @description Returns the family-wide number of decimals used to get the
143
143
  * user representation.
144
144
  *
145
- * @circuitInfo k=6, rows=28
145
+ * @constraints k=6, rows=26
146
146
  *
147
147
  * Requirements:
148
148
  *
@@ -158,7 +158,7 @@ module NativeShieldedTokenFamily {
158
158
  * @description Returns the coin color (token type) for `domain` under this
159
159
  * contract's address, so integrators do not have to re-derive it by hand.
160
160
  *
161
- * @circuitInfo k=13, rows=4248
161
+ * @constraints k=13, rows=4239
162
162
  *
163
163
  * Requirements:
164
164
  *
@@ -186,7 +186,7 @@ module NativeShieldedTokenFamily {
186
186
  * recipient; callers SHOULD deliver it out of band. Wallets cannot detect
187
187
  * contract-minted coins by scanning the chain.
188
188
  *
189
- * @circuitInfo k=14, rows=11119
189
+ * @constraints k=14, rows=11096
190
190
  *
191
191
  * Requirements:
192
192
  *
@@ -227,7 +227,7 @@ module NativeShieldedTokenFamily {
227
227
  * `refundTo`; callers SHOULD deliver it out of band. Wallets cannot detect
228
228
  * contract-sent coins by scanning the chain.
229
229
  *
230
- * @circuitInfo k=16, rows=47932
230
+ * @constraints k=16, rows=47753
231
231
  *
232
232
  * Requirements:
233
233
  *
@@ -263,7 +263,7 @@ module NativeShieldedTokenFamily {
263
263
  * ledger state: the change replaces `coin` as the contract's holding, and
264
264
  * its info is not otherwise recoverable.
265
265
  *
266
- * @circuitInfo k=15, rows=23583
266
+ * @constraints k=15, rows=23484
267
267
  *
268
268
  * Requirements:
269
269
  *
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // OpenZeppelin Compact Contracts v0.4.0-alpha.1 (token/NonFungibleToken.compact)
2
+ // OpenZeppelin Compact Contracts v0.4.0-alpha.2 (token/NonFungibleToken.compact)
3
3
 
4
4
  pragma language_version >= 0.26.0;
5
5
 
@@ -85,8 +85,13 @@ module NonFungibleToken {
85
85
  import CompactStandardLibrary;
86
86
  import "../utils/Utils" prefix Utils_;
87
87
 
88
- /// Public state
88
+ /**
89
+ * @description The token's human-readable name, set once at construction.
90
+ */
89
91
  export sealed ledger _name: Opaque<"string">;
92
+ /**
93
+ * @description The token's ticker symbol, set once at construction.
94
+ */
90
95
  export sealed ledger _symbol: Opaque<"string">;
91
96
 
92
97
  /**
@@ -160,7 +165,7 @@ module NonFungibleToken {
160
165
  * This MUST be called in the implementing contract's constructor.
161
166
  * Failure to do so can lead to an irreparable contract.
162
167
  *
163
- * @circuitInfo k=6, rows=52
168
+ * @constraints k=6, rows=52
164
169
  *
165
170
  * Requirements:
166
171
  *
@@ -206,7 +211,7 @@ module NonFungibleToken {
206
211
  /**
207
212
  * @description Returns the number of tokens in `owner`'s account.
208
213
  *
209
- * @circuitInfo k=10, rows=673
214
+ * @constraints k=10, rows=671
210
215
  *
211
216
  * Requirements:
212
217
  *
@@ -229,7 +234,7 @@ module NonFungibleToken {
229
234
  /**
230
235
  * @description Returns the owner of the `tokenId` token.
231
236
  *
232
- * @circuitInfo k=9, rows=333
237
+ * @constraints k=9, rows=331
233
238
  *
234
239
  * Requirements:
235
240
  *
@@ -247,7 +252,7 @@ module NonFungibleToken {
247
252
  /**
248
253
  * @description Returns the token name.
249
254
  *
250
- * @circuitInfo k=6, rows=28
255
+ * @constraints k=6, rows=26
251
256
  *
252
257
  * Requirements:
253
258
  *
@@ -263,7 +268,7 @@ module NonFungibleToken {
263
268
  /**
264
269
  * @description Returns the symbol of the token.
265
270
  *
266
- * @circuitInfo k=6, rows=28
271
+ * @constraints k=6, rows=26
267
272
  *
268
273
  * Requirements:
269
274
  *
@@ -280,7 +285,7 @@ module NonFungibleToken {
280
285
  * @description Returns the token URI for the given `tokenId`. Returns the empty
281
286
  * string if a tokenURI does not exist.
282
287
  *
283
- * @circuitInfo k=9, rows=326
288
+ * @constraints k=9, rows=324
284
289
  *
285
290
  * Requirements:
286
291
  *
@@ -309,7 +314,7 @@ module NonFungibleToken {
309
314
  /**
310
315
  * @description Sets the URI as `tokenURI` for the given `tokenId`.
311
316
  *
312
- * @circuitInfo k=9, rows=289
317
+ * @constraints k=9, rows=287
313
318
  *
314
319
  * Requirements:
315
320
  *
@@ -338,7 +343,7 @@ module NonFungibleToken {
338
343
  * In the case of an external (non-contract) caller, the caller's identity is derived from the `wit_NonFungibleTokenSK`
339
344
  * witness as `persistentHash(secretKey)`.
340
345
  *
341
- * @circuitInfo k=13, rows=3468
346
+ * @constraints k=13, rows=3491
342
347
  *
343
348
  * Requirements:
344
349
  *
@@ -359,7 +364,7 @@ module NonFungibleToken {
359
364
  /**
360
365
  * @description Returns the account approved for `tokenId` token.
361
366
  *
362
- * @circuitInfo k=9, rows=422
367
+ * @constraints k=9, rows=420
363
368
  *
364
369
  * Requirements:
365
370
  *
@@ -383,7 +388,7 @@ module NonFungibleToken {
383
388
  * In the case of an external (non-contract) caller, the caller's identity is derived from the `wit_NonFungibleTokenSK`
384
389
  * witness as `persistentHash(secretKey)`.
385
390
  *
386
- * @circuitInfo k=13, rows=2936
391
+ * @constraints k=13, rows=2938
387
392
  *
388
393
  * Requirements:
389
394
  *
@@ -406,7 +411,7 @@ module NonFungibleToken {
406
411
  /**
407
412
  * @description Returns if the `operator` is allowed to manage all of the assets of `owner`.
408
413
  *
409
- * @circuitInfo k=11, rows=1343
414
+ * @constraints k=11, rows=1341
410
415
  *
411
416
  * Requirements:
412
417
  *
@@ -439,7 +444,7 @@ module NonFungibleToken {
439
444
  * In the case of an external (non-contract) caller, the caller's identity is derived from the `wit_NonFungibleTokenSK`
440
445
  * witness as `persistentHash(secretKey)`.
441
446
  *
442
- * @circuitInfo k=13, rows=4800
447
+ * @constraints k=13, rows=4701
443
448
  *
444
449
  * Requirements:
445
450
  *
@@ -477,7 +482,7 @@ module NonFungibleToken {
477
482
  * are not currently supported. Tokens sent to a contract address may become irretrievable.
478
483
  * Once contract-to-contract calls are supported, this circuit may be deprecated.
479
484
  *
480
- * @circuitInfo k=13, rows=4797
485
+ * @constraints k=13, rows=4698
481
486
  *
482
487
  * Requirements:
483
488
  *
@@ -511,7 +516,7 @@ module NonFungibleToken {
511
516
  /**
512
517
  * @description Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist.
513
518
  *
514
- * @circuitInfo k=9, rows=308
519
+ * @constraints k=9, rows=306
515
520
  *
516
521
  * Requirements:
517
522
  *
@@ -532,7 +537,7 @@ module NonFungibleToken {
532
537
  /**
533
538
  * @description Returns the approved address for `tokenId`. Returns the zero value if `tokenId` is not minted.
534
539
  *
535
- * @circuitInfo k=9, rows=308
540
+ * @constraints k=9, rows=306
536
541
  *
537
542
  * Requirements:
538
543
  *
@@ -553,7 +558,7 @@ module NonFungibleToken {
553
558
  * @description Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in
554
559
  * particular (ignoring whether it is owned by `owner`).
555
560
  *
556
- * @circuitInfo k=11, rows=1798
561
+ * @constraints k=11, rows=1796
557
562
  *
558
563
  * Requirements:
559
564
  *
@@ -585,7 +590,7 @@ module NonFungibleToken {
585
590
  /**
586
591
  * @description Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner.
587
592
  *
588
- * @circuitInfo k=11, rows=1804
593
+ * @constraints k=11, rows=1802
589
594
  *
590
595
  * Requirements:
591
596
  *
@@ -666,7 +671,7 @@ module NonFungibleToken {
666
671
  /**
667
672
  * @description Mints `tokenId` and transfers it to `to`.
668
673
  *
669
- * @circuitInfo k=11, rows=1473
674
+ * @constraints k=11, rows=1388
670
675
  *
671
676
  * Requirements:
672
677
  *
@@ -690,7 +695,7 @@ module NonFungibleToken {
690
695
  /**
691
696
  * @description Mints `tokenId` and transfers it to `to`. It does NOT check if the recipient is a ContractAddress.
692
697
  *
693
- * @circuitInfo k=11, rows=1470
698
+ * @constraints k=11, rows=1385
694
699
  *
695
700
  * Requirements:
696
701
  *
@@ -723,7 +728,7 @@ module NonFungibleToken {
723
728
  * The approval is cleared when the token is burned.
724
729
  * This circuit does not check if the sender is authorized to operate on the token.
725
730
  *
726
- * @circuitInfo k=10, rows=509
731
+ * @constraints k=10, rows=507
727
732
  *
728
733
  * Requirements:
729
734
  *
@@ -748,7 +753,7 @@ module NonFungibleToken {
748
753
  * interactions are supported in Compact. This restriction prevents assets from being inadvertently
749
754
  * locked in contracts that cannot currently handle token receipt.
750
755
  *
751
- * @circuitInfo k=12, rows=2067
756
+ * @constraints k=11, rows=1982
752
757
  *
753
758
  * Requirements:
754
759
  *
@@ -779,7 +784,7 @@ module NonFungibleToken {
779
784
  * As opposed to {_unsafeTransferFrom}, this imposes no restrictions on the caller's identity.
780
785
  * It does NOT check if the recipient is a ContractAddress.
781
786
  *
782
- * @circuitInfo k=12, rows=2064
787
+ * @constraints k=11, rows=1979
783
788
  *
784
789
  * Requirements:
785
790
  *
@@ -815,7 +820,7 @@ module NonFungibleToken {
815
820
  /**
816
821
  * @description Approve `to` to operate on `tokenId`.
817
822
  *
818
- * @circuitInfo k=11, rows=1810
823
+ * @constraints k=11, rows=1840
819
824
  *
820
825
  * Requirements:
821
826
  *
@@ -856,7 +861,7 @@ module NonFungibleToken {
856
861
  /**
857
862
  * @description Approve `operator` to operate on all of `owner` tokens.
858
863
  *
859
- * @circuitInfo k=11, rows=1261
864
+ * @constraints k=11, rows=1280
860
865
  *
861
866
  * Requirements:
862
867
  *
@@ -895,7 +900,7 @@ module NonFungibleToken {
895
900
  * @description Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned).
896
901
  * Returns the owner.
897
902
  *
898
- * @circuitInfo k=9, rows=331
903
+ * @constraints k=9, rows=329
899
904
  *
900
905
  * Requirements:
901
906
  *
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // OpenZeppelin Compact Contracts v0.4.0-alpha.1 (token/extensions/ConfidentialFungibleTokenPublicSupply.compact)
2
+ // OpenZeppelin Compact Contracts v0.4.0-alpha.2 (token/extensions/ConfidentialFungibleTokenPublicSupply.compact)
3
3
 
4
4
  pragma language_version >= 0.26.0;
5
5
 
@@ -33,15 +33,20 @@ pragma language_version >= 0.26.0;
33
33
  module ConfidentialFungibleTokenPublicSupply {
34
34
  import CompactStandardLibrary;
35
35
 
36
- // The public circulating supply. Mint and burn disclose their amounts
37
- // through the delta on this value.
36
+ /**
37
+ * @description Total tokens in circulation, tracked in the clear even though
38
+ * balances are encrypted. Raised by `_addSupply` and lowered by `_subSupply`,
39
+ * each rejecting over/underflow.
40
+ *
41
+ * @warning Mint and burn disclose their amounts through the delta on this value
42
+ */
38
43
  export ledger _totalSupply: Uint<128>;
39
44
 
40
45
  /**
41
46
  * @description Increases `totalSupply` by `value`. Call alongside the token
42
47
  * module's `_mint`. The added amount is disclosed via the supply delta.
43
48
  *
44
- * @circuitInfo k=9, rows=401
49
+ * @constraints k=9, rows=399
45
50
  *
46
51
  * Requirements:
47
52
  *
@@ -62,7 +67,7 @@ module ConfidentialFungibleTokenPublicSupply {
62
67
  * module's `_burn` or `_burnFrom`. The removed amount is disclosed via the
63
68
  * supply delta.
64
69
  *
65
- * @circuitInfo k=9, rows=256
70
+ * @constraints k=9, rows=254
66
71
  *
67
72
  * Requirements:
68
73
  *
@@ -80,7 +85,7 @@ module ConfidentialFungibleTokenPublicSupply {
80
85
  /**
81
86
  * @description Returns the public total token supply.
82
87
  *
83
- * @circuitInfo k=6, rows=26
88
+ * @constraints k=6, rows=24
84
89
  *
85
90
  * @return {Uint<128>} - The total supply.
86
91
  */
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // OpenZeppelin Compact Contracts v0.4.0-alpha.1 (token/extensions/NativeShieldedTokenDerivedNonce.compact)
2
+ // OpenZeppelin Compact Contracts v0.4.0-alpha.2 (token/extensions/NativeShieldedTokenDerivedNonce.compact)
3
3
 
4
4
  pragma language_version >= 0.26.0;
5
5
 
@@ -59,7 +59,7 @@ module NativeShieldedTokenDerivedNonce {
59
59
  * @notice The derivation input is public ledger state, so mints using this
60
60
  * nonce are recipient-public; see the module notes.
61
61
  *
62
- * @circuitInfo k=9, rows=451
62
+ * @constraints k=9, rows=447
63
63
  *
64
64
  * @return {Bytes<32>} - The next derived coin nonce.
65
65
  */
@@ -76,7 +76,7 @@ module NativeShieldedTokenFamilyPublicSupply {
76
76
  * @description Adds `amount` to the exact minted total for `domain`. Call
77
77
  * once per successful `NativeShieldedTokenFamily._mint`.
78
78
  *
79
- * @circuitInfo k=10, rows=653
79
+ * @constraints k=10, rows=645
80
80
  *
81
81
  * @param {Bytes<32>} domain - 32-byte token discriminator.
82
82
  * @param {Uint<64>} amount - The minted amount.
@@ -93,7 +93,7 @@ module NativeShieldedTokenFamilyPublicSupply {
93
93
  * @dev Enforces per-domain `burned <= minted`; an unpaired, duplicate, or
94
94
  * wrong-domain burn reverts.
95
95
  *
96
- * @circuitInfo k=10, rows=755
96
+ * @constraints k=10, rows=747
97
97
  *
98
98
  * @param {Bytes<32>} domain - 32-byte token discriminator.
99
99
  * @param {Uint<128>} amount - The burned amount.
@@ -106,7 +106,7 @@ module NativeShieldedTokenFamilyPublicSupply {
106
106
  /**
107
107
  * @description Returns the exact amount ever minted for `domain`.
108
108
  *
109
- * @circuitInfo k=9, rows=344
109
+ * @constraints k=9, rows=342
110
110
  *
111
111
  * @param {Bytes<32>} domain - 32-byte token discriminator.
112
112
  * @return {Uint<128>} - The total amount minted.
@@ -120,7 +120,7 @@ module NativeShieldedTokenFamilyPublicSupply {
120
120
  * @notice This is a lower bound: coins sent directly to the burn address
121
121
  * without going through the contract are not counted.
122
122
  *
123
- * @circuitInfo k=9, rows=341
123
+ * @constraints k=9, rows=339
124
124
  *
125
125
  * @param {Bytes<32>} domain - 32-byte token discriminator.
126
126
  * @return {Uint<128>} - The total amount burned through the contract.
@@ -134,7 +134,7 @@ module NativeShieldedTokenFamilyPublicSupply {
134
134
  * @notice This is an UPPER BOUND on circulating supply, not an exact value:
135
135
  * burns that bypass the contract are invisible. See the module notes.
136
136
  *
137
- * @circuitInfo k=9, rows=439
137
+ * @constraints k=9, rows=437
138
138
  *
139
139
  * @param {Bytes<32>} domain - 32-byte token discriminator.
140
140
  * @return {Uint<128>} - The upper bound on tokens in existence.
@@ -80,7 +80,7 @@ module NativeShieldedTokenPublicSupply {
80
80
  * @description Adds `amount` to the exact minted total. Call once per
81
81
  * successful `NativeShieldedToken._mint`.
82
82
  *
83
- * @circuitInfo k=9, rows=375
83
+ * @constraints k=9, rows=373
84
84
  *
85
85
  * @param {Uint<64>} amount - The minted amount.
86
86
  * @return {[]} - Empty tuple.
@@ -94,7 +94,7 @@ module NativeShieldedTokenPublicSupply {
94
94
  * per successful `NativeShieldedToken._burn` / `_burnFromSelf`.
95
95
  * @dev Enforces `burned <= minted`; an unpaired or duplicate burn reverts.
96
96
  *
97
- * @circuitInfo k=9, rows=477
97
+ * @constraints k=9, rows=475
98
98
  *
99
99
  * @param {Uint<128>} amount - The burned amount.
100
100
  * @return {[]} - Empty tuple.
@@ -106,7 +106,7 @@ module NativeShieldedTokenPublicSupply {
106
106
  /**
107
107
  * @description Returns the exact amount ever minted.
108
108
  *
109
- * @circuitInfo k=7, rows=65
109
+ * @constraints k=7, rows=63
110
110
  *
111
111
  * @return {Uint<128>} - The total amount minted.
112
112
  */
@@ -119,7 +119,7 @@ module NativeShieldedTokenPublicSupply {
119
119
  * @notice This is a lower bound: coins sent directly to the burn address
120
120
  * without going through the contract are not counted.
121
121
  *
122
- * @circuitInfo k=7, rows=62
122
+ * @constraints k=7, rows=60
123
123
  *
124
124
  * @return {Uint<128>} - The total amount burned through the contract.
125
125
  */
@@ -132,7 +132,7 @@ module NativeShieldedTokenPublicSupply {
132
132
  * @notice This is an UPPER BOUND on circulating supply, not an exact value:
133
133
  * burns that bypass the contract are invisible. See the module notes.
134
134
  *
135
- * @circuitInfo k=9, rows=160
135
+ * @constraints k=9, rows=158
136
136
  *
137
137
  * @return {Uint<128>} - The upper bound on tokens in existence.
138
138
  */
@@ -71,7 +71,7 @@ module NativeShieldedTokenPublicSupplyCore {
71
71
  * once per successful token `_mint`.
72
72
  * @dev Checks for overflow in order to output a readable error message.
73
73
  *
74
- * @circuitInfo k=10, rows=653
74
+ * @constraints k=10, rows=645
75
75
  *
76
76
  * @param {Bytes<32>} domain - 32-byte token discriminator.
77
77
  * @param {Uint<64>} amount - The minted amount.
@@ -91,7 +91,7 @@ module NativeShieldedTokenPublicSupplyCore {
91
91
  * The guard also keeps the add and the `totalSupply` subtraction within
92
92
  * bounds, so no separate overflow/underflow check is needed.
93
93
  *
94
- * @circuitInfo k=10, rows=755
94
+ * @constraints k=10, rows=747
95
95
  *
96
96
  * @param {Bytes<32>} domain - 32-byte token discriminator.
97
97
  * @param {Uint<128>} amount - The burned amount.
@@ -111,7 +111,7 @@ module NativeShieldedTokenPublicSupplyCore {
111
111
  /**
112
112
  * @description Returns the exact amount ever minted for `domain`.
113
113
  *
114
- * @circuitInfo k=9, rows=344
114
+ * @constraints k=9, rows=342
115
115
  *
116
116
  * @param {Bytes<32>} domain - 32-byte token discriminator.
117
117
  * @return {Uint<128>} - The total amount minted.
@@ -128,7 +128,7 @@ module NativeShieldedTokenPublicSupplyCore {
128
128
  * @notice This is a lower bound: coins sent directly to the burn address
129
129
  * without going through the contract are not counted.
130
130
  *
131
- * @circuitInfo k=9, rows=341
131
+ * @constraints k=9, rows=339
132
132
  *
133
133
  * @param {Bytes<32>} domain - 32-byte token discriminator.
134
134
  * @return {Uint<128>} - The total amount burned through the contract.
@@ -150,7 +150,7 @@ module NativeShieldedTokenPublicSupplyCore {
150
150
  * fires in normal operation. It is kept so the getter is a total function that
151
151
  * reads cleanly (returning 0) rather than reverting on an out-of-bound state.
152
152
  *
153
- * @circuitInfo k=9, rows=439
153
+ * @constraints k=9, rows=437
154
154
  *
155
155
  * @param {Bytes<32>} domain - 32-byte token discriminator.
156
156
  * @return {Uint<128>} - The upper bound on tokens in existence.