Skip to content

Commit 6cb9439

Browse files
committed
docs: highlight optional licensing configuration
This commit clarifies that several functions in LicenseAttachmentWorkflows can optionally set licensing configurations in addition to attaching license terms.
1 parent b322d41 commit 6cb9439

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

contracts/workflows/LicenseAttachmentWorkflows.sol

+18-8
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,15 @@ contract LicenseAttachmentWorkflows is
7373
__Multicall_init();
7474
}
7575

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.
7781
/// @param ipId The ID of the IP.
7882
/// @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.
8085
/// @return licenseTermsIds The IDs of the newly registered PIL terms.
8186
function registerPILTermsAndAttach(
8287
address ipId,
@@ -109,9 +114,11 @@ contract LicenseAttachmentWorkflows is
109114
});
110115
}
111116

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.
115122
/// @param spgNftContract The address of the SPGNFT collection.
116123
/// @param recipient The address of the recipient of the minted NFT.
117124
/// @param ipMetadata OPTIONAL. The desired metadata for the newly minted NFT and registered IP.
@@ -154,9 +161,12 @@ contract LicenseAttachmentWorkflows is
154161
ISPGNFT(spgNftContract).safeTransferFrom(address(this), recipient, tokenId, "");
155162
}
156163

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.
160170
/// @param nftContract The address of the NFT collection.
161171
/// @param tokenId The ID of the NFT.
162172
/// @param ipMetadata OPTIONAL. The desired metadata for the newly registered IP.

0 commit comments

Comments
 (0)