contract SalTxToken is IERC20{
    
    using SafeMath for uint256;
    mapping (address => uint256) private _balances;
    mapping(address => bool) private minters;
    address public owner;
    string private _name;
    string private _symbol;
    uint256 private _totalSupply;

    constructor (string memory name, string memory symbol) public {
        _name = name;
        _symbol = symbol;
        owner = msg.sender;
        minters[msg.sender] = true;
    } 
    
    modifier onlyOwner(){
        require(msg.sender == owner);
        _;
    }
    
    modifier onlyMinters(){
        require(minters[msg.sender]);
        _;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view returns (string memory) {
        return _symbol;
    }
    
    /**
     * @dev Adds minter to the minters list for approval
     */

    function addMinter() public {
        minters[msg.sender] = false;
        
    }
    
    /**
     * @dev get the status of the particular minter about the status
    */
    function getStatus() public view returns (bool) {
        return minters[msg.sender];
    }
    
    /**
     * @dev approves the minter which already there in minters list *onlyOwner can do it
    */
    
    function approveMinter(address _minter) public onlyOwner {
       if(!minters[_minter]){
            minters[_minter] = true;
       }
    }

    /**
     * @dev totalSupply of tokens 
     */
    function totalSupply() public view returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev balanceOf tokens for particular address
     */
    function balanceOf(address account) public view returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See `IERC20.transfer`.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public returns (bool) {
        _transfer(msg.sender, recipient, amount);
        return true;
    }
    
    /**
     * @dev See `IERC20.mint`.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function mint(address recipient, uint256 amount) public onlyMinters returns (bool) {
        _mint(recipient, amount);
        return true;
    }
    
    function _transfer(address sender, address recipient, uint256 amount) internal {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");
        _balances[sender] = _balances[sender].sub(amount);
        _balances[recipient] = _balances[recipient].add(amount);
       
    }

    function _mint(address account, uint256 amount) public onlyMinters {
        require(account != address(0), "ERC20: mint to the zero address");
        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        
    }

    function _burn(address account, uint256 value) internal {
        require(account != address(0), "ERC20: burn from the zero address");
        _balances[account] = _balances[account].sub(value);
        _totalSupply = _totalSupply.sub(value);
       
    }

    
}
function transfer(address recipient, uint256 amount) public returns (bool) {
        _transfer(msg.sender, recipient, amount);
        return true;
    }
/**
 * @dev See `IERC20.transfer`.
 *
 * Requirements:
 *
 * - `recipient` cannot be the zero address.
 * - the caller must have a balance of at least `amount`.
 */