Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Commit

Permalink
add comment and fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Spablob authored and LeoHChen committed Feb 17, 2024
1 parent 81dd9ce commit 0ba59ad
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ contract RoyaltyPolicyLAP is IRoyaltyPolicyLAP, Governable, ERC1155Holder, Reent
InitParams memory params = abi.decode(_externalData, (InitParams));
// If the policy is already initialized and an ipId has the maximum number of ancestors
// it can not have any derivative and therefore is not allowed to mint any license
if (params.targetAncestors.length == MAX_ANCESTORS) revert Errors.RoyaltyPolicyLAP__LastPositionNotAbleToMintLicense();
if (params.targetAncestors.length >= MAX_ANCESTORS) revert Errors.RoyaltyPolicyLAP__LastPositionNotAbleToMintLicense();
// the check below ensures that the ancestors hash is the same as the one stored in the royalty data
// and that the targetAncestors passed in by the user matches the record stored in state on policy initialization
if (
keccak256(abi.encodePacked(params.targetAncestors, params.targetRoyaltyAmount)) !=
royaltyData[_ipId].ancestorsHash
Expand Down

0 comments on commit 0ba59ad

Please sign in to comment.