{
    "Function": "getNfts",
    "File": "contracts/utils/NestedAssetBatcher.sol",
    "Parent Contracts": [],
    "High-Level Calls": [
        "INestedAsset",
        "INestedRecords",
        "INestedAsset"
    ],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function getNfts(address user) external view returns (Nft[] memory) {\n        unchecked {\n            uint256 numTokens = nestedAsset.balanceOf(user);\n            Nft[] memory nfts = new Nft[](numTokens);\n            for (uint256 i; i < numTokens; i++) {\n                uint256 nftId = nestedAsset.tokenOfOwnerByIndex(user, i);\n                (address[] memory tokens, uint256[] memory amounts) = nestedRecords.tokenHoldings(nftId);\n                uint256 tokenLength = tokens.length;\n                Asset[] memory nftAssets = new Asset[](tokenLength);\n                for (uint256 j; j < tokenLength; j++) {\n                    nftAssets[j] = Asset({ token: tokens[j], qty: amounts[j] });\n                }\n                nfts[i] = Nft({ id: nftId, assets: nftAssets });\n            }\n            return (nfts);\n        }\n    }"
}