@@ -73,10 +73,15 @@ contract LicenseAttachmentWorkflows is
73
73
__Multicall_init ();
74
74
}
75
75
76
- /// @notice Register Programmable IP License Terms (if unregistered) and attach it to IP.
76
+ /// @notice Register Programmable IP License Terms (if unregistered), attach them to an IP, and optionally sets
77
+ /// licensing configurations.
78
+ /// @dev This function will register new PIL terms if they don't exist, and only sets licensing configurations
79
+ /// for each term where the corresponding licensing config has `isSet` set to true. The function also requires
80
+ /// appropriate permissions.
77
81
/// @param ipId The ID of the IP.
78
82
/// @param licenseTermsData The PIL terms and licensing configuration data to be attached to the IP.
79
- /// @param sigAttachAndConfig Signature data for attachLicenseTerms and setLicensingConfig to the IP via the Licensing Module.
83
+ /// @param sigAttachAndConfig Signature data for attachLicenseTerms and setLicensingConfig to the IP via the
84
+ /// Licensing Module.
80
85
/// @return licenseTermsIds The IDs of the newly registered PIL terms.
81
86
function registerPILTermsAndAttach (
82
87
address ipId ,
@@ -109,9 +114,11 @@ contract LicenseAttachmentWorkflows is
109
114
});
110
115
}
111
116
112
- /// @notice Mint an NFT from a SPGNFT collection, register it with metadata as an IP,
113
- /// register Programmable IP License Terms (if unregistered), and attach it to the registered IP.
114
- /// @dev Requires caller to have the minter role or the SPG NFT to allow public minting.
117
+ /// @notice Mint an NFT from a SPGNFT collection, register it with metadata as an IP, register Programmable IP
118
+ /// License Terms (if unregistered), attach it to the registered IP, and optionally sets licensing configurations.
119
+ /// @dev Requires caller to have the minter role or the SPG NFT to allow public minting. This function will
120
+ /// register new PIL terms if they don't exist, and only sets licensing configurations for each term where the
121
+ /// corresponding licensing config has `isSet` set to true.
115
122
/// @param spgNftContract The address of the SPGNFT collection.
116
123
/// @param recipient The address of the recipient of the minted NFT.
117
124
/// @param ipMetadata OPTIONAL. The desired metadata for the newly minted NFT and registered IP.
@@ -154,9 +161,12 @@ contract LicenseAttachmentWorkflows is
154
161
ISPGNFT (spgNftContract).safeTransferFrom (address (this ), recipient, tokenId, "" );
155
162
}
156
163
157
- /// @notice Register a given NFT as an IP and attach Programmable IP License Terms.
158
- /// @dev Because IP Account is created in this function, we need to set the permission via signature to allow this
159
- /// contract to attach PIL Terms to the newly created IP Account in the same function.
164
+ /// @notice Register a given NFT as an IP and attach Programmable IP License Terms, and optionally sets licensing
165
+ /// configurations.
166
+ /// @dev Since this contract doesn't own the IP Account when IP is registered, a signature is required to grant
167
+ /// permission for this contract to attach PIL Terms and set licensing configurations to the newly created IP
168
+ /// Account in the same transaction. This function will also register new PIL terms if they don't exist, and only
169
+ /// sets licensing configurations for each term where the corresponding licensing config has `isSet` set to true.
160
170
/// @param nftContract The address of the NFT collection.
161
171
/// @param tokenId The ID of the NFT.
162
172
/// @param ipMetadata OPTIONAL. The desired metadata for the newly registered IP.
0 commit comments