{
    "Function": "slitherConstructorVariables",
    "File": "src/AAMintPass.sol",
    "Parent Contracts": [
        "lib/openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Burnable.sol",
        "lib/openzeppelin-contracts/contracts/token/ERC721/ERC721.sol",
        "lib/openzeppelin-contracts/contracts/token/ERC721/extensions/IERC721Metadata.sol",
        "lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol",
        "lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol",
        "lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol",
        "lib/openzeppelin-contracts/contracts/utils/Context.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "contract AAMintPass is ERC721, ERC721Burnable {\n    // The founder address is the address that deploys the smart contract\n    address public founderAddress;\n\n    // The fighterFarm address will have the ability at a future date to burn the mintpass in order\n    // to mint an AI Arena fighter (at the NFT owner's discretion)\n    address public fighterFarmContractAddress;\n\n    // The delegated address is responsible for signing messages to confirm someone is able to\n    // claim mint passes\n    address public delegatedAddress;\n    \n    // Mapping to check if an address has admin rights\n    mapping(address => bool) public isAdmin;\n\n    // Mapping that returns the tokenURI for a given id\n    mapping(uint256 => string) private tokenURIs;\n\n    // Mapping that returns how many passes an address has claimed already\n    mapping(address => mapping(uint8 => uint8)) public passesClaimed;\n\n    // Boolean that dictates whether or not users are able to mint (paused means they cannot)\n    bool public mintingPaused = true;\n\n    // Number of tokens outstanding (which have not been burned)\n    uint256 public numTokensOutstanding = 0;\n\n    // Number of tokens which have been burned\n    uint256 public numTokensBurned = 0;    \n\n    /// @dev Initializes the smart contract with the founder and delegated addresses\n    /// Also sets the founder as an admin by default \n    constructor(address _founderAddress, address _delegatedAddress) \n        ERC721(\"AI Arena Mint Pass\", \"AAMP\") \n    {\n        delegatedAddress = _delegatedAddress;\n        founderAddress = _founderAddress;\n        isAdmin[founderAddress] = true;\n    }\n\n    /// @dev This function gives the founder the ability to transfer ownership to another address\n    /// At the time of setting a new founder address, the old founder is removed as an admin\n    /// @param _newFounderAddress The new address which will have control over the smart contract\n    function transferOwnership(address _newFounderAddress) external {\n        require(msg.sender == founderAddress);\n        isAdmin[founderAddress] = false;\n        founderAddress = _newFounderAddress;\n        isAdmin[_newFounderAddress] = true;\n    }\n\n    /// @notice Adds a new admin\n    /// @param _newAdmin The address of the new admin\n    /// @dev This function can only be called by the contract founder to add a new admin.\n    function addAdmin(address _newAdmin) external {\n        require(msg.sender == founderAddress);\n        isAdmin[_newAdmin] = true;\n    }\n\n    /// @dev Remove existing admins from the mapping (Founder-Only)\n    /// @param adminAddress An address to remove from the mapping\n    function removeAdmin(address adminAddress) external {\n        require(msg.sender == founderAddress);\n        isAdmin[adminAddress] = false;\n    }\n\n    /// @dev Set the fighter farm address (Founder-Only)\n    /// @param _fighterFarmAddress The new address to set\n    function setFighterFarmAddress(address _fighterFarmAddress) external {\n        require(msg.sender == founderAddress);\n        fighterFarmContractAddress = _fighterFarmAddress;\n    }\n\n    /// @dev Set the delagated address (Founder-Only)\n    /// @param _delegatedAddress The new address to set\n    function setDelegatedAddress(address _delegatedAddress) external {\n        require(msg.sender == founderAddress);\n        delegatedAddress = _delegatedAddress;\n    }\n\n    /// @dev Change the 'paused' state of minting (Admin-Only)\n    /// @param _state The new paused state to set\n    function setPaused(bool _state) external {\n        require(isAdmin[msg.sender]);\n        mintingPaused = _state;\n    }\n\n    /// @notice This allows you to claim a mintpass which you have qualified for\n    /// @dev Users must provide the number of mintpasses they want to claim, along with the \n    /// tokenURIs and a signature from our delegated server address. We then verify that the \n    /// server did indeed sign a message approving them to claim the amount of mint passes.\n    /// We use passesClaimed as a part of the message and increment it to ensure they cannot use\n    /// the same signature multiple times.\n    /// @param numToMint The number of mintpasses to claim. The first element in the array is the\n    /// number of AI Champion mintpasses and the second element is the number of Dendroid \n    /// mintpasses.\n    /// @param signature The signature from the delegated server address\n    /// @param _tokenURIs Token URIs for each of the mintpasses a user claims \n    function claimMintPass(\n        uint8[2] calldata numToMint,\n        bytes calldata signature,\n        string[] calldata _tokenURIs\n    ) \n        external \n    {\n        require(!mintingPaused);\n        bytes32 msgHash = bytes32(keccak256(abi.encode(\n            msg.sender, \n            numToMint[0], \n            numToMint[1],\n            passesClaimed[msg.sender][0],\n            passesClaimed[msg.sender][1],\n            _tokenURIs\n        )));\n        require(Verification.verify(msgHash, signature, delegatedAddress));\n        uint16 totalToMint = uint16(numToMint[0] + numToMint[1]);\n        require(_tokenURIs.length == totalToMint);\n        passesClaimed[msg.sender][0] += numToMint[0];\n        passesClaimed[msg.sender][1] += numToMint[1];\n        for (uint16 i = 0; i < totalToMint; i++) {\n            createMintPass(msg.sender, _tokenURIs[i]);\n        }\n    }\n\n    /// @dev Burns the NFT and alters some counters\n    /// @param _tokenId The id for the NFT\n    function burn(uint256 _tokenId) public override {\n        require(msg.sender == fighterFarmContractAddress || msg.sender == ownerOf(_tokenId));\n        numTokensBurned++;\n        numTokensOutstanding--;\n        super.burn(_tokenId);\n    }\n\n    /// @dev Informs the user of the total number of NFTs outstanding (non-burned)\n    function totalSupply() public view returns (uint256) {\n        return numTokensOutstanding;\n    }\n\n    /// @notice The contract URI\n    function contractURI() public pure returns (string memory) {\n        return \"ipfs://bafybeifdvzwsjpxrkbyhqpz3y57j7nwm3eyyc3feqppqggslea3g5kk3jq\";\n    }\n\n    /// @dev Returns the tokenURI for a given token id \n    /// @param _tokenId The id for the NFT\n    function tokenURI(uint256 _tokenId) public view override(ERC721) returns (string memory) {\n        require(_exists(_tokenId), \"ERC721Metadata: URI query for nonexistent token\");\n        return tokenURIs[_tokenId];\n    }\n\n    /// @dev Mints the NFT for the mintpass and sets the tokenURI, while incrementing counter\n    /// @param _receiver The address receiving the mintpass\n    /// @param _tokenURI The tokenURI to attach to the mintpass\n    function createMintPass(address _receiver, string calldata _tokenURI) private {\n        numTokensOutstanding++;\n        uint256 tokenId = numTokensOutstanding + numTokensBurned;\n        tokenURIs[tokenId] = _tokenURI;\n        _safeMint(_receiver, tokenId);\n    }\n}"
}