abstract contract ICXDToken is ERC20, Pausable, Ownable, HasMinters {
    uint256 private _maxSupply;

    function setMaxSupply(uint256 amount) internal onlyOwner {
        _maxSupply = amount;
    }

    function maxSupply() public view returns (uint256) {
        return _maxSupply;
    }

    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    function mint(address to, uint256 amount) public virtual onlyMinter {
        require(totalSupply() + amount <= _maxSupply, "over maxSupply");
        _mint(to, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        uint256 currentAllowance = allowance(account, _msgSender());
        require(currentAllowance >= amount, "ERC20: burn amount exceeds allowance");
        unchecked {
            _approve(account, _msgSender(), currentAllowance - amount);
        }
        _burn(account, amount);
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, amount);

        require(!paused(), "ERC20Pausable: token transfer while paused");
    }

    function stop() public onlyOwner {
        _pause();
    }

    function start() public onlyOwner {
        _unpause();
    }
}
function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }
/**
 * @dev Destroys `amount` tokens from the caller.
 *
 * See {ERC20-_burn}.
 */