Under the Supreme Court’s modern contracts, the court must first decide whether a challenged enactment substantially impairs contracts, considering the extent to which the law undermines the contractual bargain, interferes with a party’s reasonable expectations, and prevents the party from safeguarding or reinstating his rights.  If contracts are substantially impaired, the court next considers whether the law is drawn in an “‘appropriate’ and ‘reasonable’ way to advance ‘a significant and legitimate public purpose.’  Unless the government is a party to the contract, the court defers to legislative judgment regarding the necessity and reasonableness of the measures taken.  Here, LA’s eviction moratorium was appropriate and necessary to deal with the COVID-19 crisis since homeless, evicted tenants would more likely spread the disease.