The origin of Hot Jupiters is still unknown. These planets may have reached their observed short periods through disk migration or high-eccentricity migration. Each formation path is expected to lead to a different final planetary composition. As a result, determining the composition of hot-Jupiters can reveal information on their formation history. In this study, we investigate the heavy-element (solid) accretion of giant protoplanets as their orbits evolve to short-period eccentric orbits. Using N-body simulations, we compare the planetesimal accretion rates for planets experiencing disk migration and high-eccentricity migration. Finally, we discuss how these results can be used to constrain the formation pathways of hot Jupiters.