Matt Chapman and the San Francisco Giants have agreed on a 3-year, $54 million deal that includes opt-outs after the first two years.