Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(derivative): use licensing module's predictMintingLicenseFee for minting fee calculation #64

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

sebsadface
Copy link
Member

Description

This PR replaces the existing minting fee calculation logic for a single parent with a call to predictMintingLicenseFee function from the licensing module. This function allows minting fee prediction without triggering any state changes.

Test Plan

All existing tests pass locally.

Related Issue

@sebsadface sebsadface changed the title feat(derivative): use licensing module's predictMintingLicenseFee for mint fee calculation feat(derivative): use licensing module's predictMintingLicenseFee for minting fee calculation Sep 13, 2024
Copy link

@kingster-will kingster-will left a comment

Choose a reason for hiding this comment

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

Wonder whether we have unit test cover this function?

@sebsadface
Copy link
Member Author

Wonder whether we have unit test cover this function?

The minting fee calculation is only used when registering derivatives without license tokens. We already have a test case that covers this logic by testing derivative registration for a parent with a commercial license. More details here:

function test_SPG_registerIpAndMakeDerivativeWithCommercialLicense()
).

Copy link

@kingster-will kingster-will left a comment

Choose a reason for hiding this comment

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

LGTM.

@sebsadface sebsadface merged commit 802f82f into storyprotocol:main Sep 13, 2024
3 checks passed
@sebsadface sebsadface deleted the predict-minting-fee branch October 16, 2024 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Core Protocol’s License Minting Fee Functions in Periphery Contracts
2 participants