You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement batch minting and registering of IP assets with PIL terms attached, based on TypeScript SDK implementation. This method uses multicall to batch multiple mint and register operations in a single transaction.
Changes:
- Add batch_mint_and_register_ip_asset_with_pil_terms to IPAsset resource
- Support encodedTxDataOnly option in mint_and_register_ip_asset_with_pil_terms for multicall batching
- Add _parse_tx_license_terms_attached_event_for_ip helper to parse license terms for specific IPs
- Add unit tests covering successful batch minting, metadata, recipient, and empty args scenarios
- Add integration tests for batch minting with PIL terms and metadata/recipient options
- Use allow_duplicates=True in tests to handle duplicate license terms in same NFT collection
Batch mint NFTs from collections and register them as IPs with PIL terms attached.
755
+
756
+
:param args list[dict]: List of mint and register configurations, each containing:
757
+
:param spg_nft_contract str: The address of the NFT collection.
758
+
:param terms list: An array of license terms to attach.
759
+
:param terms dict: The license terms configuration.
760
+
:param transferable bool: Transferability of the license.
761
+
:param royalty_policy str: Address of the royalty policy contract.
762
+
:param default_minting_fee int: Fee for minting a license.
763
+
:param expiration int: License expiration.
764
+
:param commercial_use bool: Whether commercial use is allowed.
765
+
:param commercial_attribution bool: Whether attribution is needed for commercial use.
766
+
:param commercializer_checker str: Allowed commercializers or zero address for none.
767
+
:param commercializer_checker_data str: Data for checker contract.
768
+
:param commercial_rev_share int: Percentage of revenue that must be shared with the licensor. Must be between 0 and 100 (where 100% represents 100,000,000).
769
+
:param commercial_rev_ceiling int: Maximum commercial revenue.
770
+
:param derivatives_allowed bool: Whether derivatives are allowed.
771
+
:param derivatives_attribution bool: Whether attribution is needed for derivatives.
772
+
:param derivatives_approval bool: Whether licensor approval is required for derivatives.
773
+
:param derivatives_reciprocal bool: Whether derivatives must use the same license terms.
774
+
:param derivative_rev_ceiling int: Max derivative revenue.
775
+
:param currency str: ERC20 token for the minting fee.
776
+
:param uri str: URI for offchain license terms.
777
+
:param licensing_config dict: The configuration for the license.
778
+
:param is_set bool: Whether the configuration is set or not.
779
+
:param minting_fee int: The fee to be paid when minting tokens.
780
+
:param hook_data str: The data used by the licensing hook.
781
+
:param licensing_hook str: The licensing hook contract address or address(0) if none.
782
+
:param commercial_rev_share int: Percentage of revenue that must be shared with the licensor. Must be between 0 and 100 (where 100% represents 100,000,000).
783
+
:param disabled bool: Whether the license is disabled.
784
+
:param expect_minimum_group_reward_share int: Minimum group reward share percentage. Must be between 0 and 100 (where 100% represents 100,000,000).
785
+
:param expect_group_reward_pool str: Address of the expected group reward pool.
786
+
:param ip_metadata dict: [Optional] NFT and IP metadata.
787
+
:param ip_metadata_uri str: [Optional] IP metadata URI.
788
+
:param ip_metadata_hash str: [Optional] IP metadata hash.
0 commit comments