code: function extractStatesDefinitions (sourcesList, contracts) {
    if (!contracts) {
      contracts = extractContractDefinitions(sourcesList)
    }
    var ret = {}
    for (var contract in contracts.contractsById) {
      var name = contracts.contractsById[contract].attributes.name
      var source = contracts.sourcesByContract[contract]
      var fullName = source + ':' + name
      var state = extractStateDefinitions(fullName, sourcesList, contracts)
      ret[fullName] = state
      ret[name] = state // solc < 0.4.9
    }
    return ret
  }
docs: return state var and type definition of all the contracts from the given @args sourcesList
  
  @param {Object} sourcesList - sources list (containing root AST node)
  @param {Object} [contracts] - map of contract definitions (contains contractsById, contractsByName)
  @return {Object} - returns a mapping between contract name and contract state