  Solving a problem of Babai and Pultr from 1980 we show that every commutative
idempotent monoid (a.k.a lattice) is the endomorphism monoid of a graph of
bounded degree. Indeed we show that maximum degree $3$ suffices, which is
best-possible. On the other hand we strengthen a result of Babai and Pultr and
show that no class excluding a topological minor can have all completely
regular monoids among its endomorphism monoids. Moreover, we show that no class
excluding a minor can have all commutative idempotent monoids among its
endomorphism monoids.
