On-chip electrocatalytic microdevices