@@ -4,73 +4,45 @@ pragma solidity 0.8.26;
4
4
/// @title Royalty Workflows Interface
5
5
/// @notice Interface for IP royalty workflows.
6
6
interface IRoyaltyWorkflows {
7
- /// @notice Details for claiming royalties from a child IP.
8
- /// @param childIpId The address of the child IP.
9
- /// @param royaltyPolicy The address of the royalty policy.
10
- /// @param currencyToken The address of the currency (revenue) token to claim.
11
- /// @param amount The amount of currency (revenue) token to claim.
12
- struct RoyaltyClaimDetails {
13
- address childIpId;
14
- address royaltyPolicy;
15
- address currencyToken;
16
- uint256 amount;
17
- }
18
-
19
- /// @notice Transfers royalties from royalty policy to the ancestor IP's royalty vault, takes a snapshot,
20
- /// and claims revenue on that snapshot for each specified currency token.
21
- /// @param ancestorIpId The address of the ancestor IP.
22
- /// @param claimer The address of the claimer of the revenue tokens (must be a royalty token holder).
23
- /// @param royaltyClaimDetails The details of the royalty claim from child IPs,
24
- /// see {IRoyaltyWorkflows-RoyaltyClaimDetails}.
25
- /// @return snapshotId The ID of the snapshot taken.
26
- /// @return amountsClaimed The amount of revenue claimed for each currency token.
27
- function transferToVaultAndSnapshotAndClaimByTokenBatch (
7
+ /// @notice Transfers specified amounts of royalties from various royalty policies to the royalty
8
+ /// vault of an ancestor IP, and claims all the revenue for each currency token from the
9
+ /// ancestor IP's royalty vault to the claimer.
10
+ /// @param ancestorIpId The address of the ancestor IP from which the revenue is being claimed.
11
+ /// @param claimer The address of the claimer of the currency (revenue) tokens.
12
+ /// @param childIpIds The addresses of the child IPs from which royalties are derived.
13
+ /// @param royaltyPolicies The addresses of the royalty policies, where royaltyPolicies[i] governs
14
+ /// the royalty flow for childIpIds[i].
15
+ /// @param currencyTokens The addresses of the currency tokens in which royalties will be claimed,
16
+ /// where currencyTokens[i] is the token used for royalties from childIpIds[i].
17
+ /// @param amounts The amounts to transfer and claim, where amounts[i] represents the amount of
18
+ /// royalties in currencyTokens[i] to transfer from childIpIds[i]'s royaltyPolicies[i] to the ancestor's
19
+ /// royalty vault.
20
+ /// @return amountsClaimed The amounts of successfully claimed revenue for each specified currency token.
21
+ function transferToVaultAndClaimByTokenBatch (
28
22
address ancestorIpId ,
29
23
address claimer ,
30
- RoyaltyClaimDetails[] calldata royaltyClaimDetails
31
- ) external returns (uint256 snapshotId , uint256 [] memory amountsClaimed );
24
+ address [] calldata childIpIds ,
25
+ address [] calldata royaltyPolicies ,
26
+ address [] calldata currencyTokens ,
27
+ uint256 [] calldata amounts
28
+ ) external returns (uint256 [] memory amountsClaimed );
32
29
33
- /// @notice Transfers royalties to the ancestor IP's royalty vault, takes a snapshot, claims revenue for each
34
- /// specified currency token both on the new snapshot and on each specified unclaimed snapshots.
35
- /// @param ancestorIpId The address of the ancestor IP.
36
- /// @param claimer The address of the claimer of the revenue tokens (must be a royalty token holder).
37
- /// @param unclaimedSnapshotIds The IDs of unclaimed snapshots to include in the claim.
38
- /// @param royaltyClaimDetails The details of the royalty claim from child IPs,
39
- /// see {IRoyaltyWorkflows-RoyaltyClaimDetails}.
40
- /// @return snapshotId The ID of the snapshot taken.
41
- /// @return amountsClaimed The amounts of revenue claimed for each currency token.
42
- function transferToVaultAndSnapshotAndClaimBySnapshotBatch (
30
+ /// @notice Transfers all avaiable royalties from various royalty policies to the royalty
31
+ /// vault of an ancestor IP, and claims all the revenue for each currency token
32
+ /// from the ancestor IP's royalty vault to the claimer.
33
+ /// @param ancestorIpId The address of the ancestor IP from which the revenue is being claimed.
34
+ /// @param claimer The address of the claimer of the currency (revenue) tokens.
35
+ /// @param childIpIds The addresses of the child IPs from which royalties are derived.
36
+ /// @param royaltyPolicies The addresses of the royalty policies, where royaltyPolicies[i] governs
37
+ /// the royalty flow for childIpIds[i].
38
+ /// @param currencyTokens The addresses of the currency tokens in which royalties will be claimed,
39
+ /// where currencyTokens[i] is the token used for royalties from childIpIds[i].
40
+ /// @return amountsClaimed The amounts of successfully claimed revenue for each specified currency token.
41
+ function claimAllRevenue (
43
42
address ancestorIpId ,
44
43
address claimer ,
45
- uint256 [] calldata unclaimedSnapshotIds ,
46
- RoyaltyClaimDetails[] calldata royaltyClaimDetails
47
- ) external returns (uint256 snapshotId , uint256 [] memory amountsClaimed );
48
-
49
- /// @notice Takes a snapshot of the IP's royalty vault and claims revenue on that snapshot for each
50
- /// specified currency token.
51
- /// @param ipId The address of the IP.
52
- /// @param claimer The address of the claimer of the revenue tokens (must be a royalty token holder).
53
- /// @param currencyTokens The addresses of the currency (revenue) tokens to claim.
54
- /// @return snapshotId The ID of the snapshot taken.
55
- /// @return amountsClaimed The amounts of revenue claimed for each currency token.
56
- function snapshotAndClaimByTokenBatch (
57
- address ipId ,
58
- address claimer ,
59
- address [] calldata currencyTokens
60
- ) external returns (uint256 snapshotId , uint256 [] memory amountsClaimed );
61
-
62
- /// @notice Takes a snapshot of the IP's royalty vault and claims revenue for each specified currency token
63
- /// both on the new snapshot and on each specified unclaimed snapshot.
64
- /// @param ipId The address of the IP.
65
- /// @param claimer The address of the claimer of the revenue tokens (must be a royalty token holder).
66
- /// @param unclaimedSnapshotIds The IDs of unclaimed snapshots to include in the claim.
67
- /// @param currencyTokens The addresses of the currency (revenue) tokens to claim.
68
- /// @return snapshotId The ID of the snapshot taken.
69
- /// @return amountsClaimed The amounts of revenue claimed for each currency token.
70
- function snapshotAndClaimBySnapshotBatch (
71
- address ipId ,
72
- address claimer ,
73
- uint256 [] calldata unclaimedSnapshotIds ,
44
+ address [] calldata childIpIds ,
45
+ address [] calldata royaltyPolicies ,
74
46
address [] calldata currencyTokens
75
- ) external returns (uint256 snapshotId , uint256 [] memory amountsClaimed );
47
+ ) external returns (uint256 [] memory amountsClaimed );
76
48
}
0 commit comments