-
Notifications
You must be signed in to change notification settings - Fork 17
feat: Batch IP Asset Registration with Optimized Workflows #184
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
Open
bonnie57
wants to merge
52
commits into
main
Choose a base branch
from
PYSDK-65
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
…okenDistributionWorkflows clients, and update SPGNFTImpl client with publicMinting method
…Asset with batch registration methods for optimized workflows
…icense_terms_data utility for improved validation in IPAsset
…orts in IPAsset for cleaner codebase
…or improved clarity and maintainability
…tration requests with multicall support
…ding public minting checks and license terms validation
…and updating TransformedRegistrationRequest structure
…coverage for registration request transformations
…cates and enhance registration request handling with new helper functions
…g for improved data management
…nsform_request utility and enhancing ExtraData structure
…ens with transfer request
…royalty_tokens with transform_request
…ansform_request and improving error handling for license terms data
…alty_tokens with transfer_request
…alty_tokens with transform_request
…ating transform_request for improved request handling
…e transformed_request for improved request handling
…_metadata for cleaner code
… for cleaner code
… requests by target address
…ficient IP asset registration and royalty distribution
…t handling and remove contract_call references
…_mint_and_register_registration_request
…out_multicall to validate IP asset registration without multicall3
…w validation tests for license terms
… registration_utils
… unused imports and updating comments for clarity
…x fees for improved accuracy
…s in registration_utils and test files
…Input for improved type safety
…rence for consistency across registration requests
…ion and setting default value in MintAndRegisterRequest
…replacing loops with comprehensions and updating comments for clarity
…hOptimizedWorkflows for consistency and accuracy
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 introduces a new high-level batch registration method
batch_ip_asset_with_optimized_workflows()that intelligently selects the appropriate workflow based on input parameters and provides automatic transaction batching for better gas efficiency.Key Features
1. Intelligent Workflow Selection
The method automatically routes requests to the most appropriate workflow contract based on the combination of parameters provided:
For
MintAndRegisterRequest(mint new NFT + register as IP):license_terms_data + royalty_shares→mintAndRegisterIpAndAttachPILTermsAndDistributeRoyaltyTokenslicense_terms_dataonly →mintAndRegisterIpAndAttachPILTermsderiv_data + royalty_shares→mintAndRegisterIpAndMakeDerivativeAndDistributeRoyaltyTokensderiv_dataonly →mintAndRegisterIpAndMakeDerivativeFor RegisterRegistrationRequest (register existing NFT as IP):
license_terms_data + royalty_shares→registerIpAndAttachPILTermsAndDeployRoyaltyVaultderiv_data + royalty_shares→registerIpAndMakeDerivativeAndDeployRoyaltyVaultlicense_terms_dataonly →registerIpAndAttachPILTermsderiv_dataonly →registerIpAndMakeDerivative2. Smart Multicall Strategy
Multicall3: Used whenis_use_multicall=Truefor eligibleMintAndRegisterRequestoperations (whenspg_nft_contracthas public minting enabled exceptmintAndRegisterIpAndAttachPILTermsAndDistributeRoyaltyTokens)RegisterRegistrationRequestoperations (due to signature requirements) andMintAndRegisterRequestwith royalty shares (due tomsg.senderlimitations)3. Automatic Royalty Distribution
When
royalty_sharesare provided, the method automatically handles the two-step process:Code Example