@openzeppelin/compact-contracts 0.5.0-alpha.1 → 0.5.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 (51) hide show
  1. package/README.md +9 -4
  2. package/access/AccessControl.compact +8 -9
  3. package/access/Ownable.compact +19 -20
  4. package/access/ShieldedAccessControl.compact +1 -1
  5. package/access/ZOwnablePK.compact +3 -3
  6. package/crypto/Ecdh.compact +1 -1
  7. package/crypto/EcdhMask.compact +61 -22
  8. package/crypto/Ecdsa.compact +1 -1
  9. package/crypto/Eip712.compact +1 -1
  10. package/crypto/ElGamal.compact +13 -13
  11. package/math/UintN.compact +82 -0
  12. package/multisig/ForwarderPrivate.compact +1 -1
  13. package/multisig/ForwarderShielded.compact +1 -1
  14. package/multisig/ForwarderUnshielded.compact +1 -1
  15. package/multisig/ProposalManager.compact +3 -3
  16. package/multisig/Secp256k1EcdsaMultisig.compact +1 -1
  17. package/multisig/ShieldedTreasury.compact +1 -1
  18. package/multisig/ShieldedTreasuryStateless.compact +5 -11
  19. package/multisig/Signer.compact +1 -1
  20. package/multisig/UnshieldedTreasury.compact +1 -1
  21. package/multisig/examples/ForwarderPrivateExample.compact +1 -1
  22. package/multisig/examples/ForwarderShieldedExample.compact +1 -1
  23. package/multisig/examples/ForwarderUnshieldedExample.compact +1 -1
  24. package/multisig/examples/{ShieldedMultiSigV2Example.compact → NativeShieldedStatelessTreasuryExample.compact} +23 -23
  25. package/multisig/examples/NativeShieldedTokenIssuerExample.compact +1 -1
  26. package/multisig/presets/NativeShieldedStatelessTreasury.compact +443 -0
  27. package/multisig/presets/NativeShieldedTokenIssuer.compact +1 -1
  28. package/package.json +11 -11
  29. package/security/Allowlist.compact +1 -1
  30. package/security/Blocklist.compact +1 -1
  31. package/security/Initializable.compact +1 -1
  32. package/security/Pausable.compact +1 -1
  33. package/token/ConfidentialFungibleToken.compact +1 -1
  34. package/token/ConfidentialNoteFungibleToken.compact +1 -1
  35. package/token/FungibleToken.compact +34 -30
  36. package/token/MultiToken.compact +25 -21
  37. package/token/NativeShieldedToken.compact +2 -2
  38. package/token/NativeShieldedTokenCore.compact +1 -1
  39. package/token/NativeShieldedTokenFamily.compact +4 -4
  40. package/token/NonFungibleToken.compact +26 -22
  41. package/token/examples/ZOwnableNativeShieldedTokenExample.compact +1 -1
  42. package/token/extensions/ConfidentialFungibleTokenPublicSupply.compact +1 -1
  43. package/token/extensions/ConfidentialNoteFungibleTokenDelivery.compact +274 -0
  44. package/token/extensions/NativeShieldedTokenDerivedNonce.compact +1 -1
  45. package/token/extensions/NativeShieldedTokenFamilyPublicSupply.compact +1 -1
  46. package/token/extensions/NativeShieldedTokenPublicSupply.compact +1 -1
  47. package/token/extensions/NativeShieldedTokenPublicSupplyCore.compact +1 -1
  48. package/token/presets/ZOwnableNativeShieldedToken.compact +1 -1
  49. package/utils/EvmAbi.compact +1 -1
  50. package/utils/Utils.compact +1 -1
  51. package/multisig/presets/ShieldedMultiSigV2.compact +0 -289
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // OpenZeppelin Compact Contracts v0.5.0-alpha.1 (token/ConfidentialNoteFungibleToken.compact)
2
+ // OpenZeppelin Compact Contracts v0.5.0-alpha.2 (token/ConfidentialNoteFungibleToken.compact)
3
3
 
4
4
  pragma language_version >= 0.26.0;
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // OpenZeppelin Compact Contracts v0.5.0-alpha.1 (token/FungibleToken.compact)
2
+ // OpenZeppelin Compact Contracts v0.5.0-alpha.2 (token/FungibleToken.compact)
3
3
 
4
4
  pragma language_version >= 0.26.0;
5
5
 
@@ -22,12 +22,12 @@ pragma language_version >= 0.26.0;
22
22
  * canonicalized in `balanceOf` and `allowance`. `_spendAllowance` canonicalizes
23
23
  * independently to ensure consistent lookups before delegating to `_approve`.
24
24
  *
25
- * @notice At the moment Midnight does not support contract-to-contract (C2C) communication, but
26
- * there are ongoing efforts to enable this in the future. Thus, the main circuits of this module
27
- * (`transfer`, `transferFrom`, `_transfer`, `_mint`) reject `ContractAddress` recipients via an
28
- * `isContract` guard, because a contract that receives tokens currently cannot move them back out.
29
- * Developers who need to experiment with contract recipients can use the `_unsafe` variants, which
30
- * skip the guard (the caller accepts that such tokens are stranded until C2C lands).
25
+ * @notice This library has not yet migrated to contract-to-contract (C2C) calls. Thus, the main
26
+ * circuits of this module (`transfer`, `transferFrom`, `_transfer`, `_mint`) reject
27
+ * `ContractAddress` recipients via an `isContract` guard, because a contract that receives tokens
28
+ * currently cannot move them back out. Developers who need to experiment with contract recipients
29
+ * can use the `_unsafe` variants, which skip the guard (the caller accepts that such tokens are
30
+ * stranded until the C2C migration lands).
31
31
  *
32
32
  * @dev Migration plan (safe -> C2C-capable transfers)
33
33
  *
@@ -39,9 +39,9 @@ pragma language_version >= 0.26.0;
39
39
  * which is the only kind of upgrade the CMA supports. Widening the types later would instead force
40
40
  * a ledger-layout rewrite, which the CMA cannot perform.
41
41
  *
42
- * When C2C lands, an already-deployed token migrates without changing its address or ledger state.
43
- * Below, `FN` stands for each guarded circuit (`transfer`, `transferFrom`, `_transfer`, `_mint`)
44
- * and `_unsafeFN` for its unsafe counterpart:
42
+ * When the C2C migration lands, an already-deployed token migrates without changing its address or
43
+ * ledger state. Below, `FN` stands for each guarded circuit (`transfer`, `transferFrom`,
44
+ * `_transfer`, `_mint`) and `_unsafeFN` for its unsafe counterpart:
45
45
  *
46
46
  * - Minor release: mark `_unsafeFN` deprecated (and emit a warning if possible); keep its
47
47
  * implementation intact so existing callers continue to work.
@@ -269,8 +269,8 @@ module FungibleToken {
269
269
  *
270
270
  * @constraints k=13, rows=3743
271
271
  *
272
- * @notice Transfers to contract addresses are currently disallowed until contract-to-contract
273
- * interactions are supported in Compact. This restriction prevents assets from
272
+ * @notice Transfers to contract addresses are disallowed until this library migrates to
273
+ * contract-to-contract calls. This restriction prevents assets from
274
274
  * being inadvertently locked in contracts that cannot currently handle token receipt.
275
275
  *
276
276
  * Requirements:
@@ -300,9 +300,10 @@ module FungibleToken {
300
300
  *
301
301
  * @constraints k=13, rows=3740
302
302
  *
303
- * @warning Transfers to contract addresses are considered unsafe because contract-to-contract
304
- * calls are not currently supported. Tokens sent to a contract address may become irretrievable.
305
- * Once contract-to-contract calls are supported, this circuit may be deprecated.
303
+ * @warning Transfers to contract addresses are considered unsafe because this library has not yet
304
+ * migrated to contract-to-contract calls.
305
+ * Tokens sent to a contract address may become irretrievable.
306
+ * Once this library migrates to contract-to-contract calls, this circuit may be deprecated.
306
307
  *
307
308
  * Requirements:
308
309
  *
@@ -385,8 +386,8 @@ module FungibleToken {
385
386
  *
386
387
  * @constraints k=13, rows=4906
387
388
  *
388
- * @notice Transfers to contract addresses are currently disallowed until contract-to-contract
389
- * interactions are supported in Compact. This restriction prevents assets from
389
+ * @notice Transfers to contract addresses are disallowed until this library migrates to
390
+ * contract-to-contract calls. This restriction prevents assets from
390
391
  * being inadvertently locked in contracts that cannot currently handle token receipt.
391
392
  *
392
393
  * Requirements:
@@ -419,9 +420,10 @@ module FungibleToken {
419
420
  *
420
421
  * @constraints k=13, rows=4903
421
422
  *
422
- * @warning Transfers to contract addresses are considered unsafe because contract-to-contract
423
- * calls are not currently supported. Tokens sent to a contract address may become irretrievable.
424
- * Once contract-to-contract calls are supported, this circuit may be deprecated.
423
+ * @warning Transfers to contract addresses are considered unsafe because this library has not yet
424
+ * migrated to contract-to-contract calls.
425
+ * Tokens sent to a contract address may become irretrievable.
426
+ * Once this library migrates to contract-to-contract calls, this circuit may be deprecated.
425
427
  *
426
428
  * Requirements:
427
429
  *
@@ -456,8 +458,8 @@ module FungibleToken {
456
458
  *
457
459
  * @constraints k=12, rows=2125
458
460
  *
459
- * @notice Transfers to contract addresses are currently disallowed until contract-to-contract
460
- * interactions are supported in Compact. This restriction prevents assets from
461
+ * @notice Transfers to contract addresses are disallowed until this library migrates to
462
+ * contract-to-contract calls. This restriction prevents assets from
461
463
  * being inadvertently locked in contracts that cannot currently handle token receipt.
462
464
  *
463
465
  * Requirements:
@@ -489,9 +491,10 @@ module FungibleToken {
489
491
  *
490
492
  * @constraints k=12, rows=2122
491
493
  *
492
- * @warning Transfers to contract addresses are considered unsafe because contract-to-contract
493
- * calls are not currently supported. Tokens sent to a contract address may become irretrievable.
494
- * Once contract-to-contract calls are supported, this circuit may be deprecated.
494
+ * @warning Transfers to contract addresses are considered unsafe because this library has not yet
495
+ * migrated to contract-to-contract calls.
496
+ * Tokens sent to a contract address may become irretrievable.
497
+ * Once this library migrates to contract-to-contract calls, this circuit may be deprecated.
495
498
  *
496
499
  * Requirements:
497
500
  *
@@ -567,8 +570,8 @@ module FungibleToken {
567
570
  *
568
571
  * @constraints k=11, rows=1328
569
572
  *
570
- * @notice Transfers to contract addresses are currently disallowed until contract-to-contract
571
- * interactions are supported in Compact. This restriction prevents assets from
573
+ * @notice Transfers to contract addresses are disallowed until this library migrates to
574
+ * contract-to-contract calls. This restriction prevents assets from
572
575
  * being inadvertently locked in contracts that cannot currently handle token receipt.
573
576
  *
574
577
  * Requirements:
@@ -593,9 +596,10 @@ module FungibleToken {
593
596
  *
594
597
  * @constraints k=11, rows=1325
595
598
  *
596
- * @warning Transfers to contract addresses are considered unsafe because contract-to-contract
597
- * calls are not currently supported. Tokens sent to a contract address may become irretrievable.
598
- * Once contract-to-contract calls are supported, this circuit may be deprecated.
599
+ * @warning Transfers to contract addresses are considered unsafe because this library has not yet
600
+ * migrated to contract-to-contract calls.
601
+ * Tokens sent to a contract address may become irretrievable.
602
+ * Once this library migrates to contract-to-contract calls, this circuit may be deprecated.
599
603
  *
600
604
  * Requirements:
601
605
  *
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // OpenZeppelin Compact Contracts v0.5.0-alpha.1 (token/MultiToken.compact)
2
+ // OpenZeppelin Compact Contracts v0.5.0-alpha.2 (token/MultiToken.compact)
3
3
 
4
4
  pragma language_version >= 0.26.0;
5
5
 
@@ -49,8 +49,8 @@ pragma language_version >= 0.26.0;
49
49
  * Since this module does not offer mint or transfer batching,
50
50
  * balance batching is also not included at this time.
51
51
  *
52
- * 3. Introspection - Compact currently cannot support contract-to-contract
53
- * queries for introspection. ERC165 (or an equivalent thereof) is NOT
52
+ * 3. Introspection - This library has not yet migrated to contract-to-contract
53
+ * calls, so there are no introspection queries. ERC165 (or an equivalent thereof) is NOT
54
54
  * included in the contract.
55
55
  *
56
56
  * 4. Safe transfers - The lack of an introspection mechanism means
@@ -93,7 +93,7 @@ pragma language_version >= 0.26.0;
93
93
  * an `isContract` guard, because a contract that receives tokens currently cannot move them back
94
94
  * out. The `_unsafe` variants (`_unsafeTransferFrom`, `_unsafeTransfer`, `_unsafeMint`) skip the
95
95
  * guard for callers who need contract recipients (accepting that such tokens are stranded until
96
- * C2C lands).
96
+ * the C2C migration lands).
97
97
  *
98
98
  * The recipient type is the final `Either<Bytes<32>, ContractAddress>` from day one, in both
99
99
  * circuit signatures and ledger maps. This is deliberate. Midnight's upgrade mechanism, the
@@ -103,7 +103,8 @@ pragma language_version >= 0.26.0;
103
103
  * which is the only kind of upgrade the CMA supports. Widening the types later would instead force
104
104
  * a ledger-layout rewrite, which the CMA cannot perform.
105
105
  *
106
- * When C2C lands, an already-deployed token migrates without changing its address or ledger state:
106
+ * When the C2C migration lands, an already-deployed token migrates without changing its address or
107
+ * ledger state:
107
108
  *
108
109
  * - Minor release: mark the `_unsafe` variants deprecated (and emit a warning if possible); keep
109
110
  * their implementation intact so existing callers continue to work.
@@ -120,7 +121,7 @@ pragma language_version >= 0.26.0;
120
121
  *
121
122
  * - Consider changing the underscore in the internal methods to `unsafe` or
122
123
  * adopting dot notation for prefixing imports.
123
- * - Revise logic once contract-to-contract interactions are available on midnight.
124
+ * - Revise logic once this library migrates to contract-to-contract calls.
124
125
  */
125
126
  module MultiToken {
126
127
  import CompactStandardLibrary;
@@ -328,8 +329,8 @@ module MultiToken {
328
329
  * In the case of an external (non-contract) caller, the caller's identity is derived from the `wit_MultiTokenSK`
329
330
  * witness as `persistentHash(secretKey)`.
330
331
  *
331
- * @notice Transfers to contract addresses are currently disallowed until contract-to-contract
332
- * interactions are supported in Compact. This restriction prevents assets from
332
+ * @notice Transfers to contract addresses are disallowed until this library migrates to
333
+ * contract-to-contract calls. This restriction prevents assets from
333
334
  * being inadvertently locked in contracts that cannot currently handle token receipt.
334
335
  *
335
336
  * @constraints k=13, rows=4833
@@ -365,8 +366,8 @@ module MultiToken {
365
366
  * Does not impose restrictions on the caller, making it suitable for composition
366
367
  * in higher-level contract logic.
367
368
  *
368
- * @notice Transfers to contract addresses are currently disallowed until contract-to-contract
369
- * interactions are supported in Compact. This restriction prevents assets from
369
+ * @notice Transfers to contract addresses are disallowed until this library migrates to
370
+ * contract-to-contract calls. This restriction prevents assets from
370
371
  * being inadvertently locked in contracts that cannot currently handle token receipt.
371
372
  *
372
373
  * @constraints k=12, rows=2381
@@ -458,9 +459,10 @@ module MultiToken {
458
459
  * In the case of an external (non-contract) caller, the caller's identity is derived from the `wit_MultiTokenSK`
459
460
  * witness as `persistentHash(secretKey)`.
460
461
  *
461
- * @warning Transfers to contract addresses are considered unsafe because contract-to-contract
462
- * calls are not currently supported. Tokens sent to a contract address may become irretrievable.
463
- * Once contract-to-contract calls are supported, this circuit may be deprecated.
462
+ * @warning Transfers to contract addresses are considered unsafe because this library has not yet
463
+ * migrated to contract-to-contract calls.
464
+ * Tokens sent to a contract address may become irretrievable.
465
+ * Once this library migrates to contract-to-contract calls, this circuit may be deprecated.
464
466
  *
465
467
  * @constraints k=13, rows=4832
466
468
  *
@@ -500,9 +502,10 @@ module MultiToken {
500
502
  * Does not impose restrictions on the caller, making it suitable as a low-level
501
503
  * building block for advanced contract logic.
502
504
  *
503
- * @warning Transfers to contract addresses are considered unsafe because contract-to-contract
504
- * calls are not currently supported. Tokens sent to a contract address may become irretrievable.
505
- * Once contract-to-contract calls are supported, this circuit may be deprecated.
505
+ * @warning Transfers to contract addresses are considered unsafe because this library has not yet
506
+ * migrated to contract-to-contract calls.
507
+ * Tokens sent to a contract address may become irretrievable.
508
+ * Once this library migrates to contract-to-contract calls, this circuit may be deprecated.
506
509
  *
507
510
  * @constraints k=12, rows=2380
508
511
  *
@@ -563,8 +566,8 @@ module MultiToken {
563
566
  /**
564
567
  * @description Creates a `value` amount of tokens of type `id`, and assigns them to `to`.
565
568
  *
566
- * @notice Transfers to contract addresses are currently disallowed until contract-to-contract
567
- * interactions are supported in Compact. This restriction prevents assets from
569
+ * @notice Transfers to contract addresses are disallowed until this library migrates to
570
+ * contract-to-contract calls. This restriction prevents assets from
568
571
  * being inadvertently locked in contracts that cannot currently handle token receipt.
569
572
  *
570
573
  * @constraints k=11, rows=1449
@@ -592,9 +595,10 @@ module MultiToken {
592
595
  /**
593
596
  * @description Unsafe variant of `_mint` which allows transfers to contract addresses.
594
597
  *
595
- * @warning Transfers to contract addresses are considered unsafe because contract-to-contract
596
- * calls are not currently supported. Tokens sent to a contract address may become irretrievable.
597
- * Once contract-to-contract calls are supported, this circuit may be deprecated.
598
+ * @warning Transfers to contract addresses are considered unsafe because this library has not yet
599
+ * migrated to contract-to-contract calls.
600
+ * Tokens sent to a contract address may become irretrievable.
601
+ * Once this library migrates to contract-to-contract calls, this circuit may be deprecated.
598
602
  *
599
603
  * @constraints k=11, rows=1448
600
604
  *
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // OpenZeppelin Compact Contracts v0.5.0-alpha.1 (token/NativeShieldedToken.compact)
2
+ // OpenZeppelin Compact Contracts v0.5.0-alpha.2 (token/NativeShieldedToken.compact)
3
3
 
4
4
  pragma language_version >= 0.26.0;
5
5
 
@@ -62,7 +62,7 @@ pragma language_version >= 0.26.0;
62
62
  * shared-`Initializable`-flag "one `initialize` per contract" limit no longer
63
63
  * applies.)
64
64
  *
65
- * @notice Out of scope (phase two, pending contract-to-contract support):
65
+ * @notice Out of scope (phase two, pending this library's contract-to-contract migration):
66
66
  * `balanceOf`, `allowance`, and transfer mediation are not representable for
67
67
  * native shielded UTXOs — once a user holds a coin, the contract cannot observe
68
68
  * or restrict its movement.
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // OpenZeppelin Compact Contracts v0.5.0-alpha.1 (token/NativeShieldedTokenCore.compact)
2
+ // OpenZeppelin Compact Contracts v0.5.0-alpha.2 (token/NativeShieldedTokenCore.compact)
3
3
 
4
4
  pragma language_version >= 0.26.0;
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // OpenZeppelin Compact Contracts v0.5.0-alpha.1 (token/NativeShieldedTokenFamily.compact)
2
+ // OpenZeppelin Compact Contracts v0.5.0-alpha.2 (token/NativeShieldedTokenFamily.compact)
3
3
 
4
4
  pragma language_version >= 0.26.0;
5
5
 
@@ -8,8 +8,8 @@ pragma language_version >= 0.26.0;
8
8
  * @description A module for issuing a FAMILY of native shielded (Zswap)
9
9
  * token types from one contract, discriminated by a per-call domain.
10
10
  *
11
- * This flavor exists because of Midnight's composition model: there is no
12
- * contract-to-contract interaction and no way for a contract to deploy
11
+ * This flavor exists because of Midnight's composition model: this library has no
12
+ * contract-to-contract interaction yet and a contract cannot deploy
13
13
  * another, so the Ethereum pattern of one token contract per asset (stamped
14
14
  * out by a factory) is unavailable. A protocol that issues many related
15
15
  * tokens — e.g. a DEX minting one liquidity-share token per pair — must do
@@ -61,7 +61,7 @@ pragma language_version >= 0.26.0;
61
61
  * need an on-chain `totalSupply(domain)`; see it for the privacy trade-off it
62
62
  * introduces (it makes contract-mediated burn amounts public).
63
63
  *
64
- * @notice Out of scope (phase two, pending contract-to-contract support):
64
+ * @notice Out of scope (phase two, pending this library's contract-to-contract migration):
65
65
  * `balanceOf`, `allowance`, transfer mediation, batch operations, and operator
66
66
  * approvals are not representable for native shielded UTXOs — once a user holds
67
67
  * a coin, the contract cannot observe or restrict its movement.
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // OpenZeppelin Compact Contracts v0.5.0-alpha.1 (token/NonFungibleToken.compact)
2
+ // OpenZeppelin Compact Contracts v0.5.0-alpha.2 (token/NonFungibleToken.compact)
3
3
 
4
4
  pragma language_version >= 0.26.0;
5
5
 
@@ -24,12 +24,12 @@ pragma language_version >= 0.26.0;
24
24
  * This is due to encoding limits on the midnight circuit backend:
25
25
  * https://github.com/midnightntwrk/compactc/issues/929
26
26
  *
27
- * @notice At the moment Midnight does not support contract-to-contract (C2C) communication, but
28
- * there are ongoing efforts to enable this in the future. Thus, the main circuits of this module
29
- * (`transfer`, `transferFrom`, `_transfer`, `_mint`) reject `ContractAddress` recipients via an
30
- * `isContract` guard, because a contract that receives a token currently cannot move it back out.
31
- * Developers who need to experiment with contract recipients can use the `_unsafe` variants, which
32
- * skip the guard (the caller accepts that such tokens are stranded until C2C lands).
27
+ * @notice This library has not yet migrated to contract-to-contract (C2C) calls. Thus, the main
28
+ * circuits of this module (`transfer`, `transferFrom`, `_transfer`, `_mint`) reject
29
+ * `ContractAddress` recipients via an `isContract` guard, because a contract that receives a token
30
+ * currently cannot move it back out. Developers who need to experiment with contract recipients can
31
+ * use the `_unsafe` variants, which skip the guard (the caller accepts that such tokens are
32
+ * stranded until the C2C migration lands).
33
33
  *
34
34
  * @dev Migration plan (safe -> C2C-capable `transfer`)
35
35
  *
@@ -41,7 +41,8 @@ pragma language_version >= 0.26.0;
41
41
  * which is the only kind of upgrade the CMA supports. Widening the types later would instead force
42
42
  * a ledger-layout rewrite, which the CMA cannot perform.
43
43
  *
44
- * When C2C lands, an already-deployed token migrates without changing its address or ledger state:
44
+ * When the C2C migration lands, an already-deployed token migrates without changing its address or
45
+ * ledger state:
45
46
  *
46
47
  * - Minor release: mark `_unsafeTransfer` deprecated (and emit a warning if possible); keep its
47
48
  * implementation intact so existing callers continue to work.
@@ -437,9 +438,9 @@ module NonFungibleToken {
437
438
  /**
438
439
  * @description Transfers `tokenId` token from `fromAddress` to `to`.
439
440
  *
440
- * @notice Transfers to contract addresses are currently disallowed until contract-to-contract interactions
441
- * are supported in Compact. This restriction prevents assets from being inadvertently locked in contracts that cannot
442
- * currently handle token receipt.
441
+ * @notice Transfers to contract addresses are disallowed until this library migrates to
442
+ * contract-to-contract calls. This restriction prevents assets from being inadvertently
443
+ * locked in contracts that cannot currently handle token receipt.
443
444
  *
444
445
  * In the case of an external (non-contract) caller, the caller's identity is derived from the `wit_NonFungibleTokenSK`
445
446
  * witness as `persistentHash(secretKey)`.
@@ -478,9 +479,10 @@ module NonFungibleToken {
478
479
  * In the case of an external (non-contract) caller, the caller's identity is derived from the `wit_NonFungibleTokenSK`
479
480
  * witness as `persistentHash(secretKey)`.
480
481
  *
481
- * @warning Transfers to contract addresses are considered unsafe because contract-to-contract calls
482
- * are not currently supported. Tokens sent to a contract address may become irretrievable.
483
- * Once contract-to-contract calls are supported, this circuit may be deprecated.
482
+ * @warning Transfers to contract addresses are considered unsafe because this library has not yet
483
+ * migrated to contract-to-contract calls.
484
+ * Tokens sent to a contract address may become irretrievable.
485
+ * Once this library migrates to contract-to-contract calls, this circuit may be deprecated.
484
486
  *
485
487
  * @constraints k=13, rows=4699
486
488
  *
@@ -706,9 +708,10 @@ module NonFungibleToken {
706
708
  * - `tokenId` must not exist.
707
709
  * - `to` is not zero.
708
710
  *
709
- * @warning Transfers to contract addresses are considered unsafe because contract-to-contract
710
- * calls are not currently supported. Tokens sent to a contract address may become irretrievable.
711
- * Once contract-to-contract calls are supported, this circuit may be deprecated.
711
+ * @warning Transfers to contract addresses are considered unsafe because this library has not yet
712
+ * migrated to contract-to-contract calls.
713
+ * Tokens sent to a contract address may become irretrievable.
714
+ * Once this library migrates to contract-to-contract calls, this circuit may be deprecated.
712
715
  *
713
716
  * @param {Either<Bytes<32>, ContractAddress>} to - The account receiving `tokenId`
714
717
  * @param {Uint<128>} tokenId - The token to transfer
@@ -752,8 +755,8 @@ module NonFungibleToken {
752
755
  * @description Transfers `tokenId` from `fromAddress` to `to`.
753
756
  * As opposed to {transferFrom}, this imposes no restrictions on the caller's identity.
754
757
  *
755
- * @notice Transfers to contract addresses are currently disallowed until contract-to-contract
756
- * interactions are supported in Compact. This restriction prevents assets from being inadvertently
758
+ * @notice Transfers to contract addresses are disallowed until this library migrates to
759
+ * contract-to-contract calls. This restriction prevents assets from being inadvertently
757
760
  * locked in contracts that cannot currently handle token receipt.
758
761
  *
759
762
  * @constraints k=11, rows=1982
@@ -795,9 +798,10 @@ module NonFungibleToken {
795
798
  * - `to` is not zero.
796
799
  * - `tokenId` token must be owned by `fromAddress`.
797
800
  *
798
- * @warning Transfers to contract addresses are considered unsafe because contract-to-contract
799
- * calls are not currently supported. Tokens sent to a contract address may become irretrievable.
800
- * Once contract-to-contract calls are supported, this circuit may be deprecated.
801
+ * @warning Transfers to contract addresses are considered unsafe because this library has not yet
802
+ * migrated to contract-to-contract calls.
803
+ * Tokens sent to a contract address may become irretrievable.
804
+ * Once this library migrates to contract-to-contract calls, this circuit may be deprecated.
801
805
  *
802
806
  * @param {Either<Bytes<32>, ContractAddress>} fromAddress - The source account of the token transfer
803
807
  * @param {Either<Bytes<32>, ContractAddress>} to - The target account of the token transfer
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // OpenZeppelin Compact Contracts v0.5.0-alpha.1 (token/examples/ZOwnableNativeShieldedTokenExample.compact)
2
+ // OpenZeppelin Compact Contracts v0.5.0-alpha.2 (token/examples/ZOwnableNativeShieldedTokenExample.compact)
3
3
 
4
4
  pragma language_version >= 0.26.0;
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // OpenZeppelin Compact Contracts v0.5.0-alpha.1 (token/extensions/ConfidentialFungibleTokenPublicSupply.compact)
2
+ // OpenZeppelin Compact Contracts v0.5.0-alpha.2 (token/extensions/ConfidentialFungibleTokenPublicSupply.compact)
3
3
 
4
4
  pragma language_version >= 0.26.0;
5
5