Duffy, 25, finished second to Kris Bryant in the voting for National League Rookie of the Year last season, but his 2016 season has been plagued by injuries. In fact, he is on the disabled list with an Achilles strain. He is batting .253/.313/.358 with four home runs and 21 RBIs.

MORE: MLB trade deadline blog from a crazy day of moves

The Giants added All-Star Eduardo Nunez last week in a trade from the Twins. He will now be the everyday third baseman.

Moore, 27, is 7-7 with a 4.08 ERA and 1.27 WHIP this season. He has gone at least six innings and given up two or fewer runs in seven of his last nine outings.

The addition of Moore gives the Giants another quality left-handed pitcher to team with Madison Bumgarner.

This article has been updated with the trade being announced.