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

Fix Caller Parameter in PFM verify #119

Merged
merged 3 commits into from
Feb 18, 2024

Conversation

jdubpark
Copy link
Contributor

@jdubpark jdubpark commented Feb 18, 2024

  1. Adds an extra parameter address holder to internal function _linkIpToParent
!IPolicyFrameworkManager(pol.policyFramework).verifyLink(
    licenseId,
    licensee, // originally msg.sender
    childIpId,
    licensor,
    pol.frameworkData
)
  1. Replaces msg.sender to receiver in verifyMint called inside LicensingModule.mintLicense()
// When verifying mint via PFM, pass in `receiver` as the `licensee` since the receiver is the one who will own
// the license NFT after minting.
if (!pfm.verifyMint(receiver, isInherited, licensorIpId, receiver, amount, pol.frameworkData)) {
    revert Errors.LicensingModule__MintLicenseParamFailed();
}

Closes #117

@jdubpark jdubpark marked this pull request as ready for review February 18, 2024 02:07
@jdubpark jdubpark marked this pull request as draft February 18, 2024 02:08
@jdubpark jdubpark marked this pull request as ready for review February 18, 2024 03:46
@jdubpark jdubpark requested a review from a team February 18, 2024 03:47
Copy link
Contributor

@Ramarti Ramarti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@LeoHChen LeoHChen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @kingster-will can you review please?

Copy link
Member

@LeoHChen LeoHChen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

block it for now, need further clarification

@kingster-will
Copy link
Contributor

The current title of the PR does not accurately convey the nature of the changes made. These modifications are not directly related to the HookModule. Instead, the primary focus is on ensuring the correct NFT holder is identified during the process of commercializer verification. A more descriptive title would better reflect this specific change.

@jdubpark jdubpark changed the title Fix PFM parameter for HookModule verification Fix Caller Parameter in PFM verify Feb 18, 2024
@LeoHChen LeoHChen merged commit ef6f71c into storyprotocol:main Feb 18, 2024
1 check passed
LeoHChen pushed a commit that referenced this pull request Feb 18, 2024
* feat: Deployment script for latest contracts
* nit: New Deployment after rebase #119
kingster-will referenced this pull request in kingster-will/protocol-core-v1-dev Mar 19, 2024
* fix: pass in licensee (license holder) to verify calls in PFM
* test: Commercializer checker test in Integration
* fix: verifyMint caller parameter in license minting
kingster-will referenced this pull request in kingster-will/protocol-core-v1-dev Mar 19, 2024
* feat: Deployment script for latest contracts
* nit: New Deployment after rebase storyprotocol#119
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid Parameter caller for HookModule verification
4 participants