From 6725a5eba27a5425487cbb1d0e371fc76f8c0143 Mon Sep 17 00:00:00 2001 From: Gino Date: Thu, 27 Jun 2024 14:58:53 +0100 Subject: [PATCH 1/4] feat(wiki): create a guide for getting NFTs in a collection --- .../nft/get-nft-in-collection.mdx | 108 ++++++++++++++++++ docs/build/isc/v1.1/sidebars.js | 5 + 2 files changed, 113 insertions(+) create mode 100644 docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx b/docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx new file mode 100644 index 00000000000..d146479f6dc --- /dev/null +++ b/docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx @@ -0,0 +1,108 @@ +--- +description: How to get the L2 NFTs in a collection. +image: /img/logo/WASP_logo_dark.png +tags: + - EVM + - how-to + - native tokens + - L2 NFTs + - Collection +--- +import GetNftMetadata from '../../../_partials/how-tos/token/_get-nft-metadata.md'; + +# Get NFTs of a Given Collection + +This guide will show you how to get the L2 NFTs of a given collection owned by an account using the [`ISCAccounts.getL2NFTsInCollection`](../../../reference/magic-contract/ISCAccounts.md#getl2nftsincollection) function from the [`ISCAccounts.getL2NFTsInCollection`](../../../reference/magic-contract/ISCAccounts.md) [magic contract](../../../reference/magic-contract/introduction.md). + + + +## Understanding the `getL2NFTsInCollection` Function + +The `getL2NFTsInCollection` function is a view function provided by the `ISCAccounts` interface. It takes two parameters: an `ISCAgentID` representing the owner of the NFTs, and an `NFTID` representing the collection. It returns an array of `NFTID` objects, representing the NFTs in the specified collection owned by the agent. + +## Why Retrieve NFTs in a Collection? + +Retrieving the NFTs in a collection can serve several purposes: + +- ### Portfolio Management: + + - Helps users manage their NFT collections effectively. + +- ### Market Analysis: + + - Enables users to analyze the contents of their collections for trading or valuation purposes. + +- ### Display Collections: + + - Users can display specific collections on platforms or personal galleries. + +- ### Organization: + + - Helps in organizing NFTs into different categories or collections for better accessibility and management. + +## Prerequisites + +### 1. Install the ISC Magic Library: + +Ensure you have the ISC Magic library installed in your project. + +```bash +npm install @iota/iscmagic +``` + +### 2. Import the ISCAccounts Interface: + +In your Solidity file, import the ISCAccounts interface. + +```Solidity +pragma solidity >=0.8.24; + +import "@iota/iscmagic/ISCAccounts.sol"; +// Import the ISCTypes where ISCAgentID and NFTID are defined +import "@iota/iscmagic/ISCTypes.sol"; +``` + +## Implement the `getL2NFTsInCollection` Function + +Here’s a sample implementation to retrieve L2 NFTs within a specific collection owned by an account: + +```solidity +function getNFTsInCollection(bytes memory agentData, NFTID memory collectionId) public view returns (NFTID[] memory) { + // Create the ISCAgentID object + ISCAgentID memory agentID = ISCAgentID({ + data: agentData + }); + // Call the getL2NFTsInCollection function from the ISCAccounts contract + NFTID[] memory nftsInCollection = ISC.accounts.getL2NFTsInCollection(agentID, collectionId); + + return nftsInCollection; +} +``` + +## Full Example Contract + +```solidity +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.24; + +import "@iota/iscmagic/ISCAccounts.sol"; +import "@iota/iscmagic/ISCTypes.sol"; + +contract MyNFTContract { + +function getNFTsInCollection(bytes memory agentData, NFTID memory collectionId) public view returns (NFTID[] memory) { + // Create the ISCAgentID object + ISCAgentID memory agentID = ISCAgentID({ + data: agentData + }); + // Call the getL2NFTsInCollection function from the ISCAccounts contract + NFTID[] memory nftsInCollection = ISC.accounts.getL2NFTsInCollection(agentID, collectionId); + + return nftsInCollection; + } +} +``` + +## Conclusion + +Using the `getL2NFTsInCollection` function from the `ISCAccounts` interface provides an efficient way to retrieve and manage NFTs within a specific collection owned by an account. By integrating this functionality into your smart contracts, you can enhance user experience by enabling features such as [portfolio management](#portfolio-management), [market analysis](#market-analysis), and [display collections](#display-collections). With this guide, you now have the foundational knowledge to implement and utilize the `getL2NFTsInCollection` function in your own projects, allowing for seamless interaction with `ISC` Magic and its associated NFTs. \ No newline at end of file diff --git a/docs/build/isc/v1.1/sidebars.js b/docs/build/isc/v1.1/sidebars.js index 675779b89b5..b3072e4b5bc 100644 --- a/docs/build/isc/v1.1/sidebars.js +++ b/docs/build/isc/v1.1/sidebars.js @@ -215,6 +215,11 @@ module.exports = { label: 'Get NFT Metadata', id: 'how-tos/core-contracts/nft/get-nft-metadata', }, + { + type: 'doc', + label: 'Get NFTs in Collection', + id: 'how-tos/core-contracts/nft/get-nft-in-collection', + }, ], }, { From 2007ee9323ddad079242d015a22fb5a7572a529f Mon Sep 17 00:00:00 2001 From: Gino Date: Thu, 27 Jun 2024 15:03:02 +0100 Subject: [PATCH 2/4] feat(wiki): duplicate on v1.3 --- .../nft/get-nft-in-collection.mdx | 108 ++++++++++++++++++ docs/build/isc/v1.3/sidebars.js | 5 + 2 files changed, 113 insertions(+) create mode 100644 docs/build/isc/v1.3/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx diff --git a/docs/build/isc/v1.3/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx b/docs/build/isc/v1.3/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx new file mode 100644 index 00000000000..d146479f6dc --- /dev/null +++ b/docs/build/isc/v1.3/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx @@ -0,0 +1,108 @@ +--- +description: How to get the L2 NFTs in a collection. +image: /img/logo/WASP_logo_dark.png +tags: + - EVM + - how-to + - native tokens + - L2 NFTs + - Collection +--- +import GetNftMetadata from '../../../_partials/how-tos/token/_get-nft-metadata.md'; + +# Get NFTs of a Given Collection + +This guide will show you how to get the L2 NFTs of a given collection owned by an account using the [`ISCAccounts.getL2NFTsInCollection`](../../../reference/magic-contract/ISCAccounts.md#getl2nftsincollection) function from the [`ISCAccounts.getL2NFTsInCollection`](../../../reference/magic-contract/ISCAccounts.md) [magic contract](../../../reference/magic-contract/introduction.md). + + + +## Understanding the `getL2NFTsInCollection` Function + +The `getL2NFTsInCollection` function is a view function provided by the `ISCAccounts` interface. It takes two parameters: an `ISCAgentID` representing the owner of the NFTs, and an `NFTID` representing the collection. It returns an array of `NFTID` objects, representing the NFTs in the specified collection owned by the agent. + +## Why Retrieve NFTs in a Collection? + +Retrieving the NFTs in a collection can serve several purposes: + +- ### Portfolio Management: + + - Helps users manage their NFT collections effectively. + +- ### Market Analysis: + + - Enables users to analyze the contents of their collections for trading or valuation purposes. + +- ### Display Collections: + + - Users can display specific collections on platforms or personal galleries. + +- ### Organization: + + - Helps in organizing NFTs into different categories or collections for better accessibility and management. + +## Prerequisites + +### 1. Install the ISC Magic Library: + +Ensure you have the ISC Magic library installed in your project. + +```bash +npm install @iota/iscmagic +``` + +### 2. Import the ISCAccounts Interface: + +In your Solidity file, import the ISCAccounts interface. + +```Solidity +pragma solidity >=0.8.24; + +import "@iota/iscmagic/ISCAccounts.sol"; +// Import the ISCTypes where ISCAgentID and NFTID are defined +import "@iota/iscmagic/ISCTypes.sol"; +``` + +## Implement the `getL2NFTsInCollection` Function + +Here’s a sample implementation to retrieve L2 NFTs within a specific collection owned by an account: + +```solidity +function getNFTsInCollection(bytes memory agentData, NFTID memory collectionId) public view returns (NFTID[] memory) { + // Create the ISCAgentID object + ISCAgentID memory agentID = ISCAgentID({ + data: agentData + }); + // Call the getL2NFTsInCollection function from the ISCAccounts contract + NFTID[] memory nftsInCollection = ISC.accounts.getL2NFTsInCollection(agentID, collectionId); + + return nftsInCollection; +} +``` + +## Full Example Contract + +```solidity +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.24; + +import "@iota/iscmagic/ISCAccounts.sol"; +import "@iota/iscmagic/ISCTypes.sol"; + +contract MyNFTContract { + +function getNFTsInCollection(bytes memory agentData, NFTID memory collectionId) public view returns (NFTID[] memory) { + // Create the ISCAgentID object + ISCAgentID memory agentID = ISCAgentID({ + data: agentData + }); + // Call the getL2NFTsInCollection function from the ISCAccounts contract + NFTID[] memory nftsInCollection = ISC.accounts.getL2NFTsInCollection(agentID, collectionId); + + return nftsInCollection; + } +} +``` + +## Conclusion + +Using the `getL2NFTsInCollection` function from the `ISCAccounts` interface provides an efficient way to retrieve and manage NFTs within a specific collection owned by an account. By integrating this functionality into your smart contracts, you can enhance user experience by enabling features such as [portfolio management](#portfolio-management), [market analysis](#market-analysis), and [display collections](#display-collections). With this guide, you now have the foundational knowledge to implement and utilize the `getL2NFTsInCollection` function in your own projects, allowing for seamless interaction with `ISC` Magic and its associated NFTs. \ No newline at end of file diff --git a/docs/build/isc/v1.3/sidebars.js b/docs/build/isc/v1.3/sidebars.js index 675779b89b5..b3072e4b5bc 100644 --- a/docs/build/isc/v1.3/sidebars.js +++ b/docs/build/isc/v1.3/sidebars.js @@ -215,6 +215,11 @@ module.exports = { label: 'Get NFT Metadata', id: 'how-tos/core-contracts/nft/get-nft-metadata', }, + { + type: 'doc', + label: 'Get NFTs in Collection', + id: 'how-tos/core-contracts/nft/get-nft-in-collection', + }, ], }, { From 1120b1f7579a093a5bebe900b337786154b51759 Mon Sep 17 00:00:00 2001 From: Gino Date: Fri, 5 Jul 2024 13:13:01 +0100 Subject: [PATCH 3/4] feat(wiki): implement review suggestions --- .../nft/get-nft-in-collection.mdx | 45 ++----------------- .../nft/get-nft-in-collection.mdx | 45 ++----------------- 2 files changed, 6 insertions(+), 84 deletions(-) diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx b/docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx index d146479f6dc..7f686020cb9 100644 --- a/docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx +++ b/docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx @@ -12,45 +12,10 @@ import GetNftMetadata from '../../../_partials/how-tos/token/_get-nft-metadata.m # Get NFTs of a Given Collection -This guide will show you how to get the L2 NFTs of a given collection owned by an account using the [`ISCAccounts.getL2NFTsInCollection`](../../../reference/magic-contract/ISCAccounts.md#getl2nftsincollection) function from the [`ISCAccounts.getL2NFTsInCollection`](../../../reference/magic-contract/ISCAccounts.md) [magic contract](../../../reference/magic-contract/introduction.md). - +This guide will show you how to get the L2 NFTs of a given collection owned by an account using the [`ISCAccounts.getL2NFTsInCollection`](../../../reference/magic-contract/ISCAccounts.md#getl2nftsincollection) function from the [`ISCAccounts`](../../../reference/magic-contract/ISCAccounts.md) [magic contract](../../../reference/magic-contract/introduction.md). -## Understanding the `getL2NFTsInCollection` Function - -The `getL2NFTsInCollection` function is a view function provided by the `ISCAccounts` interface. It takes two parameters: an `ISCAgentID` representing the owner of the NFTs, and an `NFTID` representing the collection. It returns an array of `NFTID` objects, representing the NFTs in the specified collection owned by the agent. - -## Why Retrieve NFTs in a Collection? - -Retrieving the NFTs in a collection can serve several purposes: - -- ### Portfolio Management: - - - Helps users manage their NFT collections effectively. - -- ### Market Analysis: - - - Enables users to analyze the contents of their collections for trading or valuation purposes. - -- ### Display Collections: - - - Users can display specific collections on platforms or personal galleries. - -- ### Organization: - - - Helps in organizing NFTs into different categories or collections for better accessibility and management. - -## Prerequisites - -### 1. Install the ISC Magic Library: - -Ensure you have the ISC Magic library installed in your project. - -```bash -npm install @iota/iscmagic -``` - -### 2. Import the ISCAccounts Interface: +### Import the ISCAccounts Interface: In your Solidity file, import the ISCAccounts interface. @@ -101,8 +66,4 @@ function getNFTsInCollection(bytes memory agentData, NFTID memory collectionId) return nftsInCollection; } } -``` - -## Conclusion - -Using the `getL2NFTsInCollection` function from the `ISCAccounts` interface provides an efficient way to retrieve and manage NFTs within a specific collection owned by an account. By integrating this functionality into your smart contracts, you can enhance user experience by enabling features such as [portfolio management](#portfolio-management), [market analysis](#market-analysis), and [display collections](#display-collections). With this guide, you now have the foundational knowledge to implement and utilize the `getL2NFTsInCollection` function in your own projects, allowing for seamless interaction with `ISC` Magic and its associated NFTs. \ No newline at end of file +``` \ No newline at end of file diff --git a/docs/build/isc/v1.3/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx b/docs/build/isc/v1.3/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx index d146479f6dc..7f686020cb9 100644 --- a/docs/build/isc/v1.3/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx +++ b/docs/build/isc/v1.3/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx @@ -12,45 +12,10 @@ import GetNftMetadata from '../../../_partials/how-tos/token/_get-nft-metadata.m # Get NFTs of a Given Collection -This guide will show you how to get the L2 NFTs of a given collection owned by an account using the [`ISCAccounts.getL2NFTsInCollection`](../../../reference/magic-contract/ISCAccounts.md#getl2nftsincollection) function from the [`ISCAccounts.getL2NFTsInCollection`](../../../reference/magic-contract/ISCAccounts.md) [magic contract](../../../reference/magic-contract/introduction.md). - +This guide will show you how to get the L2 NFTs of a given collection owned by an account using the [`ISCAccounts.getL2NFTsInCollection`](../../../reference/magic-contract/ISCAccounts.md#getl2nftsincollection) function from the [`ISCAccounts`](../../../reference/magic-contract/ISCAccounts.md) [magic contract](../../../reference/magic-contract/introduction.md). -## Understanding the `getL2NFTsInCollection` Function - -The `getL2NFTsInCollection` function is a view function provided by the `ISCAccounts` interface. It takes two parameters: an `ISCAgentID` representing the owner of the NFTs, and an `NFTID` representing the collection. It returns an array of `NFTID` objects, representing the NFTs in the specified collection owned by the agent. - -## Why Retrieve NFTs in a Collection? - -Retrieving the NFTs in a collection can serve several purposes: - -- ### Portfolio Management: - - - Helps users manage their NFT collections effectively. - -- ### Market Analysis: - - - Enables users to analyze the contents of their collections for trading or valuation purposes. - -- ### Display Collections: - - - Users can display specific collections on platforms or personal galleries. - -- ### Organization: - - - Helps in organizing NFTs into different categories or collections for better accessibility and management. - -## Prerequisites - -### 1. Install the ISC Magic Library: - -Ensure you have the ISC Magic library installed in your project. - -```bash -npm install @iota/iscmagic -``` - -### 2. Import the ISCAccounts Interface: +### Import the ISCAccounts Interface: In your Solidity file, import the ISCAccounts interface. @@ -101,8 +66,4 @@ function getNFTsInCollection(bytes memory agentData, NFTID memory collectionId) return nftsInCollection; } } -``` - -## Conclusion - -Using the `getL2NFTsInCollection` function from the `ISCAccounts` interface provides an efficient way to retrieve and manage NFTs within a specific collection owned by an account. By integrating this functionality into your smart contracts, you can enhance user experience by enabling features such as [portfolio management](#portfolio-management), [market analysis](#market-analysis), and [display collections](#display-collections). With this guide, you now have the foundational knowledge to implement and utilize the `getL2NFTsInCollection` function in your own projects, allowing for seamless interaction with `ISC` Magic and its associated NFTs. \ No newline at end of file +``` \ No newline at end of file From f6695149b7842dcb63f9a33f0e45c83e630e6768 Mon Sep 17 00:00:00 2001 From: Gino Date: Fri, 5 Jul 2024 15:20:33 +0100 Subject: [PATCH 4/4] feat(wiki): remove import section and update how to get agentID --- .../nft/get-nft-in-collection.mdx | 40 ++++++------------- .../nft/get-nft-in-collection.mdx | 40 ++++++------------- 2 files changed, 26 insertions(+), 54 deletions(-) diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx b/docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx index 7f686020cb9..4bd64dac9df 100644 --- a/docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx +++ b/docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx @@ -15,30 +15,17 @@ import GetNftMetadata from '../../../_partials/how-tos/token/_get-nft-metadata.m This guide will show you how to get the L2 NFTs of a given collection owned by an account using the [`ISCAccounts.getL2NFTsInCollection`](../../../reference/magic-contract/ISCAccounts.md#getl2nftsincollection) function from the [`ISCAccounts`](../../../reference/magic-contract/ISCAccounts.md) [magic contract](../../../reference/magic-contract/introduction.md). -### Import the ISCAccounts Interface: - -In your Solidity file, import the ISCAccounts interface. - -```Solidity -pragma solidity >=0.8.24; - -import "@iota/iscmagic/ISCAccounts.sol"; -// Import the ISCTypes where ISCAgentID and NFTID are defined -import "@iota/iscmagic/ISCTypes.sol"; -``` - ## Implement the `getL2NFTsInCollection` Function Here’s a sample implementation to retrieve L2 NFTs within a specific collection owned by an account: ```solidity -function getNFTsInCollection(bytes memory agentData, NFTID memory collectionId) public view returns (NFTID[] memory) { - // Create the ISCAgentID object - ISCAgentID memory agentID = ISCAgentID({ - data: agentData - }); - // Call the getL2NFTsInCollection function from the ISCAccounts contract - NFTID[] memory nftsInCollection = ISC.accounts.getL2NFTsInCollection(agentID, collectionId); +function getNFTsInCollection(NFTID memory collectionId) public view returns (NFTID[] memory) { + // Get the ISCAgentID + ISCAgentID memory agentID = ISC.sandbox.getSenderAccount(); + + // Call the getL2NFTsInCollection function from the ISCAccounts contract + NFTID[] memory nftsInCollection = ISC.accounts.getL2NFTsInCollection(agentID, collectionId); return nftsInCollection; } @@ -51,17 +38,16 @@ function getNFTsInCollection(bytes memory agentData, NFTID memory collectionId) pragma solidity >=0.8.24; import "@iota/iscmagic/ISCAccounts.sol"; -import "@iota/iscmagic/ISCTypes.sol"; +import "@iota/iscmagic/ISCSandbox.sol"; contract MyNFTContract { -function getNFTsInCollection(bytes memory agentData, NFTID memory collectionId) public view returns (NFTID[] memory) { - // Create the ISCAgentID object - ISCAgentID memory agentID = ISCAgentID({ - data: agentData - }); - // Call the getL2NFTsInCollection function from the ISCAccounts contract - NFTID[] memory nftsInCollection = ISC.accounts.getL2NFTsInCollection(agentID, collectionId); +function getNFTsInCollection(NFTID memory collectionId) public view returns (NFTID[] memory) { + // Get the ISCAgentID + ISCAgentID memory agentID = ISC.sandbox.getSenderAccount(); + + // Call the getL2NFTsInCollection function from the ISCAccounts contract + NFTID[] memory nftsInCollection = ISC.accounts.getL2NFTsInCollection(agentID, collectionId); return nftsInCollection; } diff --git a/docs/build/isc/v1.3/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx b/docs/build/isc/v1.3/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx index 7f686020cb9..4bd64dac9df 100644 --- a/docs/build/isc/v1.3/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx +++ b/docs/build/isc/v1.3/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx @@ -15,30 +15,17 @@ import GetNftMetadata from '../../../_partials/how-tos/token/_get-nft-metadata.m This guide will show you how to get the L2 NFTs of a given collection owned by an account using the [`ISCAccounts.getL2NFTsInCollection`](../../../reference/magic-contract/ISCAccounts.md#getl2nftsincollection) function from the [`ISCAccounts`](../../../reference/magic-contract/ISCAccounts.md) [magic contract](../../../reference/magic-contract/introduction.md). -### Import the ISCAccounts Interface: - -In your Solidity file, import the ISCAccounts interface. - -```Solidity -pragma solidity >=0.8.24; - -import "@iota/iscmagic/ISCAccounts.sol"; -// Import the ISCTypes where ISCAgentID and NFTID are defined -import "@iota/iscmagic/ISCTypes.sol"; -``` - ## Implement the `getL2NFTsInCollection` Function Here’s a sample implementation to retrieve L2 NFTs within a specific collection owned by an account: ```solidity -function getNFTsInCollection(bytes memory agentData, NFTID memory collectionId) public view returns (NFTID[] memory) { - // Create the ISCAgentID object - ISCAgentID memory agentID = ISCAgentID({ - data: agentData - }); - // Call the getL2NFTsInCollection function from the ISCAccounts contract - NFTID[] memory nftsInCollection = ISC.accounts.getL2NFTsInCollection(agentID, collectionId); +function getNFTsInCollection(NFTID memory collectionId) public view returns (NFTID[] memory) { + // Get the ISCAgentID + ISCAgentID memory agentID = ISC.sandbox.getSenderAccount(); + + // Call the getL2NFTsInCollection function from the ISCAccounts contract + NFTID[] memory nftsInCollection = ISC.accounts.getL2NFTsInCollection(agentID, collectionId); return nftsInCollection; } @@ -51,17 +38,16 @@ function getNFTsInCollection(bytes memory agentData, NFTID memory collectionId) pragma solidity >=0.8.24; import "@iota/iscmagic/ISCAccounts.sol"; -import "@iota/iscmagic/ISCTypes.sol"; +import "@iota/iscmagic/ISCSandbox.sol"; contract MyNFTContract { -function getNFTsInCollection(bytes memory agentData, NFTID memory collectionId) public view returns (NFTID[] memory) { - // Create the ISCAgentID object - ISCAgentID memory agentID = ISCAgentID({ - data: agentData - }); - // Call the getL2NFTsInCollection function from the ISCAccounts contract - NFTID[] memory nftsInCollection = ISC.accounts.getL2NFTsInCollection(agentID, collectionId); +function getNFTsInCollection(NFTID memory collectionId) public view returns (NFTID[] memory) { + // Get the ISCAgentID + ISCAgentID memory agentID = ISC.sandbox.getSenderAccount(); + + // Call the getL2NFTsInCollection function from the ISCAccounts contract + NFTID[] memory nftsInCollection = ISC.accounts.getL2NFTsInCollection(agentID, collectionId); return nftsInCollection; }