The San Francisco Giants have worked out a new contract for All-Star Matt Cain that will make him the highest-paid right-handed pitcher in baseball history.Cain, who is set to earn about $15 million in the last year of his contract, will receive a five-year extension for a guaranteed $112.5 million, sources told ESPN The Magazine's Buster Olney.The guaranteed money includes a $5 million signing bonus and a $7.5 million buyout in 2018. That year has a player vesting option for $21 million.Cain's option would become guaranteed if he pitches 200 innings in 2017 or 400 innings combined in 2016-17 and is not on the disabled list at the end of the 2017 season for a right elbow or right shoulder injury. If it does not become guaranteed, it would be a team option.Cain also receives a full no-trade clause. Source: ESPN