contract AccessControl {
    address payable public creatorAddress;
    mapping (address => bool) public admins;

    modifier onlyCREATOR() {
        require(msg.sender == creatorAddress, "You are not the creator of this contract");
        _;
    }

    modifier onlyADMINS() {
      
      require(admins[msg.sender] == true);
        _;
    }

    // Constructor
    constructor() {
        creatorAddress = 0x813dd04A76A716634968822f4D30Dfe359641194;
    }

    //Admins are contracts or addresses that have write access
    function addAdmin(address _newAdmin) onlyCREATOR public {
        if (admins[_newAdmin] == false) {
            admins[_newAdmin] = true;
        }
    }
    
    function removeAdmin(address _oldAdmin) onlyCREATOR public {
        if (admins[_oldAdmin] == true) {
            admins[_oldAdmin] = false;
        }
    }
}
//Control who can access various functions.
function addAdmin(address _newAdmin) onlyCREATOR public {
        if (admins[_newAdmin] == false) {
            admins[_newAdmin] = true;
        }
    }
//Admins are contracts or addresses that have write access