The state and freedom of contract