-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Description
Is your feature request related to a problem? Please describe.
The batchRegisterIpAssetsWithOptimizedWorkflows method currently needs to handle a large number of arguments. In some scenarios, token payments must occur simultaneously.
For example:
- We create two
spgNftContractinstances using different ERC20 tokens (spgNftContractForERC201andspgNftContractForERC202):
const publicMintingCollectionResult = await client.nftClient.createNFTCollection({
name: "Public Minting Collection",
symbol: "PMC",
isPublicMinting: true,
mintOpen: true,
mintFeeRecipient: TEST_WALLET_ADDRESS,
mintFee: 10n,
mintFeeToken: erc20Token, // different ERC20 token
contractURI: "",
});- Then we call
batchRegisterIpAssetsWithOptimizedWorkflowsas follows:
const result = await client.ipAsset.batchRegisterIpAssetsWithOptimizedWorkflows({
requests: [
{
spgNftContract: spgNftContractForERC201,
derivData,
},
{
spgNftContract: spgNftContractForERC202,
derivData,
},
],
});Because both requests share the same structure, they are grouped and executed via multicall in the DerivativeWorkflows contract.
However, the current method does not support paying multiple ERC20 tokens within a single multicall, nor does it support auto-approval for multiple tokens. This prevents the workflow from being executed successfully when different token payments are involved.
Describe the solution you'd like
Enhance the method so that it can:
- Support multiple ERC20 token payments within the same batch request.
Metadata
Metadata
Assignees
Labels
No labels