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

Commit

Permalink
better naming in verifyMint
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramarti committed Feb 17, 2024
1 parent ab923ea commit bb1fcb1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ interface IPolicyFrameworkManager is IERC165 {
/// @notice Verify policy parameters for minting a license.
/// @dev Enforced to be only callable by LicenseRegistry
/// @param caller the address executing the mint
/// @param policyWasInherited true if the policy was inherited (licensorIpId is not original IP owner)
/// @param mintingFromADerivative true if we verify minting a license from a derivative IP ID
/// @param receiver the address receiving the license
/// @param licensorIpId the IP id of the licensor
/// @param mintAmount the amount of licenses to mint
/// @param policyData the encoded framework policy data to verify
/// @return verified True if the link is verified
function verifyMint(
address caller,
bool policyWasInherited,
bool mintingFromADerivative,
address licensorIpId,
address receiver,
uint256 mintAmount,
Expand Down
8 changes: 4 additions & 4 deletions contracts/modules/licensing/UMLPolicyFrameworkManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -108,24 +108,24 @@ contract UMLPolicyFrameworkManager is
/// @notice Verify policy parameters for minting a license.
/// @dev Enforced to be only callable by LicenseRegistry
/// @param caller the address executing the mint
/// @param policyWasInherited true if the policy was inherited (licensorIpId is not original IP owner)
/// @param mintingFromADerivative true if the policy was inherited (licensorIpId is not original IP owner)
/// @param licensorIpId the IP id of the licensor
/// @param receiver the address receiving the license
/// @param mintAmount the amount of licenses to mint
/// @param policyData the encoded framework policy data to verify
/// @return verified True if the link is verified
function verifyMint(
address caller,
bool policyWasInherited,
bool mintingFromADerivative,
address licensorIpId,
address receiver,
uint256 mintAmount,
bytes memory policyData
) external nonReentrant onlyLicensingModule returns (bool) {
UMLPolicy memory policy = abi.decode(policyData, (UMLPolicy));
// If the policy defines no reciprocal derivatives are allowed (no derivatives of derivatives),
// and policy was inherited (so this is a derivative) we don't allow minting
if (!policy.derivativesReciprocal && policyWasInherited) {
//and we are mintingFromADerivative we don't allow minting
if (!policy.derivativesReciprocal && mintingFromADerivative) {
return false;
}

Expand Down

0 comments on commit bb1fcb1

Please sign in to comment.