Macroeconomic dynamics in a model with heterogeneous wage contracts