contract F1Token is ERC20Capped, ERC20Burnable, ERC1363, Roles, TokenRecover {


    // indicates if transfer is enabled
    bool private _transferEnabled = true;

    string public constant BUILT_ON = "https://vittominacori.github.io/erc20-generator";

    /**
     * @dev Emitted during transfer enabling
     */
    event TransferEnabled();

   
    /**
     * @dev Tokens can be moved only after if transfer enabled or if you are an approved operator.
     */
    modifier canTransfer(address from) {
        require(
            _transferEnabled || hasRole(OPERATOR_ROLE, from),
            "BaseToken: transfer is not enabled or from does not have the OPERATOR role"
        );
        _;
    }

    /**
     * @param name Name of the token
     * @param symbol A symbol to be used as ticker
     * @param decimals Number of decimals. All the operations are done using the smallest and indivisible token unit
     */
    constructor(
        string memory name,
        string memory symbol,
        uint8 decimals,
        uint256 cap
        
    )
        public
        ERC20Capped(cap)
        ERC1363(name, symbol)
    {
        
        _setupDecimals(decimals);

    }

    /**
     * @dev Transfer tokens to a specified address.
     * @param to The address to transfer to
     * @param value The amount to be transferred
     * @return A boolean that indicates if the operation was successful.
     */
    function transfer(address to, uint256 value) public virtual override(ERC20) canTransfer(_msgSender()) returns (bool) {
        return super.transfer(to, value);
    }

    /**
     * @dev Transfer tokens from one address to another.
     * @param from The address which you want to send tokens from
     * @param to The address which you want to transfer to
     * @param value the amount of tokens to be transferred
     * @return A boolean that indicates if the operation was successful.
     */
    function transferFrom(address from, address to, uint256 value) public virtual override(ERC20) canTransfer(from) returns (bool) {
        return super.transferFrom(from, to, value);
    }

    /**
     * @dev See {ERC20-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override(ERC20, ERC20Capped) {
        super._beforeTokenTransfer(from, to, amount);
    }
}
function transferFrom(address from, address to, uint256 value) public virtual override(ERC20) canTransfer(from) returns (bool) {
        return super.transferFrom(from, to, value);
    }
/**
 * @dev Transfer tokens from one address to another.
 * @param from The address which you want to send tokens from
 * @param to The address which you want to transfer to
 * @param value the amount of tokens to be transferred
 * @return A boolean that indicates if the operation was successful.
 */