@@ -8,68 +8,54 @@ import { WorkflowStructs } from "../../lib/WorkflowStructs.sol";
8
8
/// @title License Attachment Workflows Interface
9
9
/// @notice Interface for IP license attachment workflows.
10
10
interface ILicenseAttachmentWorkflows {
11
- /// @notice Mint an NFT from a SPGNFT collection, register it as an IP, attach provided IP metadata,
12
- /// register Programmable IPLicense Terms (if unregistered), and attach it to the newly registered IP.
11
+ /// @notice Register Programmable IP License Terms (if unregistered) and attach it to IP.
12
+ /// @param ipId The ID of the IP.
13
+ /// @param terms The PIL terms to be registered.
14
+ /// @param sigAttach Signature data for attachLicenseTerms to the IP via the Licensing Module.
15
+ /// @return licenseTermsId The ID of the newly registered PIL terms.
16
+ function registerPILTermsAndAttach (
17
+ address ipId ,
18
+ PILTerms calldata terms ,
19
+ WorkflowStructs.SignatureData calldata sigAttach
20
+ ) external returns (uint256 licenseTermsId );
21
+
22
+ /// @notice Mint an NFT from a SPGNFT collection, register it with metadata as an IP,
23
+ /// register Programmable IPLicense
24
+ /// Terms (if unregistered), and attach it to the registered IP.
13
25
/// @dev Requires caller to have the minter role or the SPG NFT to allow public minting.
14
26
/// @param spgNftContract The address of the SPGNFT collection.
15
27
/// @param recipient The address of the recipient of the minted NFT.
16
28
/// @param ipMetadata OPTIONAL. The desired metadata for the newly minted NFT and registered IP.
17
- /// @param terms The PIL terms to be registered and attached to the newly registered IP .
29
+ /// @param terms The PIL terms to be registered.
18
30
/// @param allowDuplicates Set to true to allow minting an NFT with a duplicate metadata hash.
19
31
/// @return ipId The ID of the newly registered IP.
20
32
/// @return tokenId The ID of the newly minted NFT.
21
- /// @return licenseTermsIds The IDs of the newly registered PIL terms.
33
+ /// @return licenseTermsId The ID of the newly registered PIL terms.
22
34
function mintAndRegisterIpAndAttachPILTerms (
23
35
address spgNftContract ,
24
36
address recipient ,
25
37
WorkflowStructs.IPMetadata calldata ipMetadata ,
26
- PILTerms[] calldata terms ,
27
- bool allowDuplicates
28
- ) external returns (address ipId , uint256 tokenId , uint256 [] memory licenseTermsIds );
29
-
30
- /// @notice Mint an NFT from a SPGNFT collection, register as an IP, attach provided IP metadata,
31
- /// and attach the provided license terms to the newly registered IP.
32
- /// @dev Requires caller to have the minter role or the SPG NFT to allow public minting.
33
- /// @param spgNftContract The address of the SPGNFT collection.
34
- /// @param recipient The address of the recipient of the newly minted NFT.
35
- /// @param ipMetadata OPTIONAL. The desired metadata for the newly minted NFT and registered IP.
36
- /// @param licenseTemplates The addresses of the license templates used of the license terms to be attached.
37
- /// @param licenseTermsIds The IDs of the license terms to attach. The i th license terms ID must be a valid license
38
- /// terms that was registered in the i th license template.
39
- /// @param allowDuplicates Set to true to allow minting an NFT with a duplicate metadata hash.
40
- /// @return ipId The ID of the newly registered IP.
41
- /// @return tokenId The ID of the newly minted NFT.
42
- function mintAndRegisterIpAndAttachLicenseTerms (
43
- address spgNftContract ,
44
- address recipient ,
45
- WorkflowStructs.IPMetadata calldata ipMetadata ,
46
- address [] calldata licenseTemplates ,
47
- uint256 [] calldata licenseTermsIds ,
38
+ PILTerms calldata terms ,
48
39
bool allowDuplicates
49
- ) external returns (address ipId , uint256 tokenId );
40
+ ) external returns (address ipId , uint256 tokenId , uint256 licenseTermsId );
50
41
51
- /// @notice Register a given NFT as an IP, attach provided IP metadata, and attach the provided license terms to the
52
- /// newly registered IP.
53
- /// @dev Since IP Account is created in this function, we need signatures to allow this contract to set metadata
54
- /// and attach PIL Terms to the newly created IP Account on behalf of the owner.
42
+ /// @notice Register a given NFT as an IP and attach Programmable IP License Terms.
43
+ /// @dev Because IP Account is created in this function, we need to set the permission via signature to allow this
44
+ /// contract to attach PIL Terms to the newly created IP Account in the same function.
55
45
/// @param nftContract The address of the NFT collection.
56
46
/// @param tokenId The ID of the NFT.
57
47
/// @param ipMetadata OPTIONAL. The desired metadata for the newly registered IP.
58
- /// @param licenseTemplates The addresses of the license templates used of the license terms to be attached.
59
- /// @param licenseTermsIds The IDs of the license terms to attach. The i th license terms ID must be a valid license
60
- /// terms that was registered in the i th license template.
48
+ /// @param terms The PIL terms to be registered.
61
49
/// @param sigMetadata OPTIONAL. Signature data for setAll (metadata) for the IP via the Core Metadata Module.
62
- /// @param sigsAttach Signature data for attachLicenseTerms to the IP via the Licensing Module.
63
- /// The i th signature data is for attaching the i th license terms registered in the i th license template
64
- /// to the IP.
50
+ /// @param sigAttach Signature data for attachLicenseTerms to the IP via the Licensing Module.
65
51
/// @return ipId The ID of the newly registered IP.
66
- function registerIpAndAttachLicenseTerms (
52
+ /// @return licenseTermsId The ID of the newly registered PIL terms.
53
+ function registerIpAndAttachPILTerms (
67
54
address nftContract ,
68
55
uint256 tokenId ,
69
56
WorkflowStructs.IPMetadata calldata ipMetadata ,
70
- address [] calldata licenseTemplates ,
71
- uint256 [] calldata licenseTermsIds ,
57
+ PILTerms calldata terms ,
72
58
WorkflowStructs.SignatureData calldata sigMetadata ,
73
- WorkflowStructs.SignatureData[] calldata sigsAttach
74
- ) external returns (address ipId );
59
+ WorkflowStructs.SignatureData calldata sigAttach
60
+ ) external returns (address ipId , uint256 licenseTermsId );
75
61
}
0 commit comments