{
    "Function": "getDelegateInfo",
    "File": "src/DelegateToken.sol",
    "Parent Contracts": [
        "src/interfaces/IDelegateToken.sol",
        "lib/openzeppelin-contracts/contracts/interfaces/IERC2981.sol",
        "lib/openzeppelin-contracts/contracts/token/ERC1155/IERC1155Receiver.sol",
        "lib/openzeppelin-contracts/contracts/token/ERC721/IERC721Receiver.sol",
        "lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol",
        "lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol",
        "lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol",
        "lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol"
    ],
    "High-Level Calls": [
        "IERC721",
        "DelegateTokenStorageHelpers",
        "DelegateTokenRegistryHelpers",
        "DelegateTokenRegistryHelpers",
        "DelegateTokenStorageHelpers",
        "DelegateTokenStorageHelpers",
        "RegistryHashes",
        "DelegateTokenStorageHelpers",
        "DelegateTokenRegistryHelpers"
    ],
    "Internal Calls": [],
    "Library Calls": [
        "readExpiry",
        "decodeType",
        "revertNotMinted",
        "loadTokenId",
        "readRegistryHash",
        "loadTokenHolderAndContract",
        "loadRights",
        "readUnderlyingAmount"
    ],
    "Low-Level Calls": [],
    "Code": "function getDelegateInfo(uint256 delegateTokenId) external view returns (Structs.DelegateInfo memory delegateInfo) {\n        bytes32 registryHash = StorageHelpers.readRegistryHash(delegateTokenInfo, delegateTokenId);\n        StorageHelpers.revertNotMinted(registryHash, delegateTokenId);\n        delegateInfo.tokenType = RegistryHashes.decodeType(registryHash);\n        (delegateInfo.delegateHolder, delegateInfo.tokenContract) = RegistryHelpers.loadTokenHolderAndContract(delegateRegistry, registryHash);\n        delegateInfo.rights = RegistryHelpers.loadRights(delegateRegistry, registryHash);\n        delegateInfo.principalHolder = IERC721(principalToken).ownerOf(delegateTokenId);\n        delegateInfo.expiry = StorageHelpers.readExpiry(delegateTokenInfo, delegateTokenId);\n        if (delegateInfo.tokenType == IDelegateRegistry.DelegationType.ERC20) delegateInfo.tokenId = 0;\n        else delegateInfo.tokenId = RegistryHelpers.loadTokenId(delegateRegistry, registryHash);\n        if (delegateInfo.tokenType == IDelegateRegistry.DelegationType.ERC721) delegateInfo.amount = 0;\n        else delegateInfo.amount = StorageHelpers.readUnderlyingAmount(delegateTokenInfo, delegateTokenId);\n    }"
}