Tagged state-contracts