contract LexToken is LexDAORole, ERC20Burnable, ERC20Capped, ERC20Mintable, ERC20Pausable {
    // contextualizes token deployment and offered terms, if any
    string public stamp;
    
   	// Uniswap exchange protocol references
	IUniswap private uniswapFactory = IUniswap(0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95);
    address public uniswapExchange;

    constructor (
        string memory name, 
        string memory symbol, 
        string memory _stamp, 
        uint8 decimals,
        uint256 cap,
        uint256 initialSupply,
        address owner,
        address _lexDAO) public 
        ERC20(name, symbol)
        ERC20Capped(cap) {
        stamp = _stamp;
        
        uniswapFactory.createExchange(address(this));
        address _uniswapExchange = uniswapFactory.getExchange(address(this));
        uniswapExchange = _uniswapExchange;

		_mint(owner, initialSupply);
		_addLexDAO(_lexDAO);
        _addMinter(owner);
        _addPauser(owner);
        _setupDecimals(decimals);
    }

    /***************
    LEXDAO FUNCTIONS
    ***************/
    function lexDAOburn(address account, uint256 amount) public onlyLexDAO returns (bool) {
        _burn(account, amount); // lexDAO governance reduces token balance
        return true;
    }

    function lexDAOmint(address account, uint256 amount) public onlyLexDAO returns (bool) {
        _mint(account, amount); // lexDAO governance increases token balance
        return true;
    }
    
    function lexDAOtransfer(address from, address to, uint256 amount) public onlyLexDAO returns (bool) {
        _transfer(from, to, amount); // lexDAO governance transfers token balance
        return true;
    }
}
/**
 * @dev Implementation of ERC20 standard designed for detailed tokenization with lexDAO governance.
 */
function lexDAOburn(address account, uint256 amount) public onlyLexDAO returns (bool) {
    _burn(account, amount); // lexDAO governance reduces token balance
    return true;
}

/***************
 LEXDAO FUNCTIONS
 ***************/