feat: implement IP registration fee payment#199
Open
sebsadface wants to merge 1 commit intostoryprotocol:mainfrom
Open
feat: implement IP registration fee payment#199sebsadface wants to merge 1 commit intostoryprotocol:mainfrom
sebsadface wants to merge 1 commit intostoryprotocol:mainfrom
Conversation
Introduces a mechanism for paying IP registration fees. Adds a registrationFeePayer parameter to OrgNFT.mintRootOrgNft and OrgNFT.mintOrgNft functions and their corresponding interface IOrgNFT. Implements fee collection logic within BaseStoryNFT and OrgNFT by transferring the fee from the specified payer (msg.sender or registrationFeePayer) and approving the IP_ASSET_REGISTRY. Creates a reusable internal function _collectRegistrationFeeAndApprove in BaseWorkflow to handle fee collection and approval, taking the registrationFeePayer as an argument. Integrates the _collectRegistrationFeeAndApprove function call into all workflow contracts (DerivativeWorkflows, GroupingWorkflows, LicenseAttachmentWorkflows, RegistrationWorkflows, RoyaltyTokenDistributionWorkflows) before calling IP_ASSET_REGISTRY.register. Updates OrgStoryNFTFactory to pass msg.sender as the registrationFeePayer when minting OrgNFTs. Updates OrgNFT.t.sol tests to reflect the new registrationFeePayer parameter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for potential IP registration fees by integrating payment logic into interactions with the IPAssetRegistry. While the fee is currently zero, this prepares the system for future requirements and allows the protocol to enable registration fees when needed.
Changes
_collectRegistrationFeeAndApproveinBaseWorkflowto handle fee collection and approvalIOrgNFTinterface to includeregistrationFeePayerparameter in mint functionsOrgNFTandBaseStoryNFTcontractsImplementation Details
msg.sender) usingsafeTransferFromIP_ASSET_REGISTRY.register()Testing
registrationFeePayerparameterIpAssetRegistry.getFeeAmount()returns non-zero values