A general and high-yield galvanic displacement approach to Au-M (M = Au, Pd, and Pt) core-shell nanostructures with porous shells and enhanced electrocatalytic performances.