contract FoxGameCarrot is IFoxGameCarrot, ERC20, Ownable {

  // Allowlist of addresses to mint or burn
  mapping(address => bool) public controllers;
  
  constructor() ERC20("FoxGame", "CARROT") {}

  /**
   * Mint $CARROT to a recipient.
   * @param to the recipient of the $CARROT
   * @param amount the amount of $CARROT to mint
   */
  function mint(address to, uint256 amount) external {
    require(controllers[msg.sender], "Only controllers can mint");
    _mint(to, amount);
  }

  /**
   * Burn $CARROT from a holder.
   * @param from the holder of the $CARROT
   * @param amount the amount of $CARROT to burn
   */
  function burn(address from, uint256 amount) external {
    require(controllers[msg.sender], "Only controllers can burn");
    _burn(from, amount);
  }

  /**
   * Enables an address to mint / burn.
   * @param controller the address to enable
   */
  function addController(address controller) external onlyOwner {
    controllers[controller] = true;
  }

  /**
   * Disables an address from minting / burning.
   * @param controller the address to disbale
   */
  function removeController(address controller) external onlyOwner {
    controllers[controller] = false;
  }
}
function mint(address to, uint256 amount) external {
  require(controllers[msg.sender], "Only controllers can mint");
  _mint(to, amount);
}

/**
 * Mint $CARROT to a recipient.
 * @param to the recipient of the $CARROT
 * @param amount the amount of $CARROT to mint
 */