The deal is the third-largest in MLB history and the second-richest in present-day value behind only Juan Soto's contract.