Feat/legion conditions#114
Conversation
…hs only, lots of mocks)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d1f72ee0c8
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| FundInterestData memory data = abi.decode(extensionData, (FundInterestData)); | ||
| uint64 anchor = data.acquisitionDate; | ||
| if (data.tackedFromAcquisitionDate != 0 && data.tackedFromAcquisitionDate < anchor) { | ||
| anchor = data.tackedFromAcquisitionDate; | ||
| } | ||
| if (anchor == 0) return false; | ||
|
|
||
| return block.timestamp >= uint256(anchor) + holdingPeriod; |
There was a problem hiding this comment.
Reset buyer acquisition dates before enforcing holds
When a buyer later resells units acquired through the secondary path, this check reads the certificate extensionData that executeSecondaryTransfer currently copies from the seller onto the buyer token (src/storage/IssuanceManagerStorage.sol:811-823, and existing-token consolidation does not update extension data either). In that scenario the buyer inherits the seller's original acquisitionDate, so a seasoned seller can transfer to a new buyer who immediately satisfies the Rule 144 holding period (and the same stale field feeds the Reg S condition). The settlement path needs to stamp the buyer lot's acquisition/tacking data instead of reusing the seller's unchanged FundInterestData.
Useful? React with 👍 / 👎.
| uint256 currentCount = usResidentOnlyCount | ||
| ? _usResidentHolderCount(printer) | ||
| : printer.holderCount(); |
There was a problem hiding this comment.
Count legal owners instead of custodians for holder caps
In non-usResidentOnlyCount mode this uses holderCount(), but that count is maintained from ERC-721 custody transfers (recordHolderChange in CyberCertPrinterStorage) rather than the certificate legal owner. For administered secondary deliveries, the NFT is minted to adminMultisig while the buyer is recorded separately as legal owner (IssuanceManagerStorage.sol:815 and _mintAssignedCert's to, owner parameters), so many distinct legal investors behind one admin multisig are counted as one and the ICA holder cap can be exceeded. Use the legal-owner enumeration here, as the U.S.-resident branch already does via legalOwnerOf.
Useful? React with 👍 / 👎.
No description provided.