Contracts as games on event structures