contract SmartCoinFerma is MintableToken {
    
  string public constant name = "Smart Coin Ferma";
   
  string public constant symbol = "SCF";
    
  uint32 public constant decimals = 8;

  HoldersList public list = new HoldersList();
 
  bool public tradingStarted = true;

 
   /**
   * @dev modifier that throws if trading has not started yet
   */
  modifier hasStartedTrading() {
    require(tradingStarted);
    _;
  } 

  /**
   * @dev Allows the owner to enable the trading. This can not be undone
   */
  function startTrading() public onlyOwner {
    tradingStarted = true;
  }

   /**
   * @dev Allows anyone to transfer the PAY tokens once trading has started
   * @param _to the recipient address of the tokens. 
   * @param _value number of tokens to be transfered. 
   */
  function transfer(address _to, uint _value) hasStartedTrading  public returns (bool) {
    
    
    require(super.transfer(_to, _value) == true);
    list.changeBalance( msg.sender, balances[msg.sender]);
    list.changeBalance( _to, balances[_to]);
    
    return true;
  }

     /**
   * @dev Allows anyone to transfer the PAY tokens once trading has started
   * @param _from address The address which you want to send tokens from
   * @param _to address The address which you want to transfer to
   * @param _value uint the amout of tokens to be transfered
   */
  function transferFrom(address _from, address _to, uint _value)  public returns (bool) {
   
    
    require (super.transferFrom(_from, _to, _value) == true);
    list.changeBalance( _from, balances[_from]);
    list.changeBalance( _to, balances[_to]);
    
    return true;
  }
  function mint(address _to, uint _amount) onlyOwner canMint public returns (bool) {
     require(super.mint(_to, _amount) == true); 
     list.changeBalance( _to, balances[_to]);
     list.setTotal(totalSupply_);
     return true;
  }
  
  
  
}
function startTrading() public onlyOwner {
    tradingStarted = true;
  }
/**
 * @dev Allows the owner to enable the trading. This can not be undone
 */