@@ -44,6 +44,7 @@ import { getFunctionSignature } from "../utils/getFunctionSignature";
4444import { validateLicenseConfig } from "../utils/validateLicenseConfig" ;
4545import { getIpMetadataForWorkflow } from "../utils/getIpMetadataForWorkflow" ;
4646import { getRevenueShare } from "../utils/licenseTermsHelper" ;
47+ import { RevShareType } from "../types/common" ;
4748
4849export class GroupClient {
4950 public groupingWorkflowsClient : GroupingWorkflowsClient ;
@@ -108,7 +109,7 @@ export class GroupClient {
108109 }
109110 }
110111 /** Mint an NFT from a SPGNFT collection, register it with metadata as an IP, attach license terms to the registered IP, and add it to a group IP.
111- * @see {@link https://github.com/storyprotocol/protocol-core-v1/blob/main /contracts/interfaces/registries/IIPAssetRegistry.sol | IIPAssetRegistry }
112+ * @see {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1 /contracts/interfaces/registries/IIPAssetRegistry.sol#L17 | IIPAssetRegistry }
112113 * for a list of on-chain events emitted when an IP is minted and registered, license terms are attached to an IP, and it is added to a group.
113114 */
114115 public async mintAndRegisterIpAndAttachLicenseAndAddToGroup (
@@ -144,10 +145,13 @@ export class GroupClient {
144145 } ) ;
145146 const object : GroupingWorkflowsMintAndRegisterIpAndAttachLicenseAndAddToGroupRequest = {
146147 ...request ,
148+ allowDuplicates : request . allowDuplicates || true ,
147149 spgNftContract : getAddress ( spgNftContract , "request.spgNftContract" ) ,
148150 recipient :
149151 ( recipient && getAddress ( recipient , "request.recipient" ) ) || this . wallet . account ! . address ,
150- maxAllowedRewardShare : BigInt ( getRevenueShare ( request . maxAllowedRewardShare ) ) ,
152+ maxAllowedRewardShare : BigInt (
153+ getRevenueShare ( request . maxAllowedRewardShare , RevShareType . MAX_ALLOWED_REWARD_SHARE ) ,
154+ ) ,
151155 licensesData : this . getLicenseData ( request . licenseData ) ,
152156 ipMetadata : getIpMetadataForWorkflow ( request . ipMetadata ) ,
153157 sigAddToGroup : {
@@ -182,7 +186,7 @@ export class GroupClient {
182186 }
183187
184188 /** Register an NFT as IP with metadata, attach license terms to the registered IP, and add it to a group IP.
185- * @see {@link https://github.com/storyprotocol/protocol-core-v1/blob/main /contracts/interfaces/registries/IIPAssetRegistry.sol | IIPAssetRegistry }
189+ * @see {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1 /contracts/interfaces/registries/IIPAssetRegistry.sol#L17 | IIPAssetRegistry }
186190 * for a list of on-chain events emitted when an IP is registered, license terms are attached to an IP, and it is added to a group.
187191 */
188192 public async registerIpAndAttachLicenseAndAddToGroup (
@@ -257,7 +261,9 @@ export class GroupClient {
257261 licensesData : this . getLicenseData ( request . licenseData ) ,
258262 ipMetadata : getIpMetadataForWorkflow ( request . ipMetadata ) ,
259263 tokenId : BigInt ( request . tokenId ) ,
260- maxAllowedRewardShare : BigInt ( getRevenueShare ( request . maxAllowedRewardShare ) ) ,
264+ maxAllowedRewardShare : BigInt (
265+ getRevenueShare ( request . maxAllowedRewardShare , RevShareType . MAX_ALLOWED_REWARD_SHARE ) ,
266+ ) ,
261267 sigAddToGroup : {
262268 signer : getAddress ( this . wallet . account ! . address , "wallet.account.address" ) ,
263269 deadline : calculatedDeadline ,
@@ -292,7 +298,7 @@ export class GroupClient {
292298 }
293299 }
294300 /** Register a group IP with a group reward pool and attach license terms to the group IP.
295- * @see {@link https://github.com/storyprotocol/protocol-core-v1/blob/main /contracts/interfaces/modules/grouping/IGroupingModule.sol | IGroupingModule }
301+ * @see {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1 /contracts/interfaces/modules/grouping/IGroupingModule.sol#L14 | IGroupingModule }
296302 * for a list of on-chain events emitted when a group IP is registered, license terms are attached to a group IP .
297303 */
298304 public async registerGroupAndAttachLicense (
@@ -324,7 +330,7 @@ export class GroupClient {
324330 }
325331 }
326332 /** Register a group IP with a group reward pool, attach license terms to the group IP, and add individual IPs to the group IP.
327- * @see {@link https://github.com/storyprotocol/protocol-core-v1/blob/main /contracts/interfaces/modules/grouping/IGroupingModule.sol | IGroupingModule }
333+ * @see {@link https://github.com/storyprotocol/protocol-core-v1/blob/v1.3.1 /contracts/interfaces/modules/grouping/IGroupingModule.sol#L14 | IGroupingModule }
328334 * for a list of on-chain events emitted when a group IP is registered, license terms are attached to a group IP, and individual IPs are added to a group.
329335 */
330336 public async registerGroupAndAttachLicenseAndAddIps (
0 commit comments