The Rhode Island-based CVS Health Corp. ($CVS) has agreed to pay $5 billion over 10 years, and Walgreens agreed to pay $5.7 billion over 15 years, to multiple states to resolve allegations that they failed to properly oversee the dispensing of opioids. Massachusetts is set to receive nearly $230 million.