contract LexToken is LexDAORole, ERC20Burnable, ERC20Capped, ERC20Mintable, ERC20Pausable {
    // contextualizes token deployment and offered terms, if any
    string public stamp;
    bool public certified; 
    
   	// 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,
        bool _certified) public 
        ERC20(name, symbol)
        ERC20Capped(cap) {
        stamp = _stamp;
        certified = _certified;
        
        uniswapFactory.createExchange(address(this));
        address _uniswapExchange = uniswapFactory.getExchange(address(this));
        uniswapExchange = _uniswapExchange;

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

    /***************
    LEXDAO FUNCTIONS
    ***************/
    function lexDAOburn(address account, uint256 amount) public onlyLexDAO {
        _burn(account, amount); // lexDAO governance reduces token balance
    }
    
    function lexDAOcertify(bool _certified) public onlyLexDAO {
        certified = _certified; // lexDAO governance maintains token contract certification
    }

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