1. In a mixing bowl, combine warm water, yeast, and sugar. Let it sit for 5 minutes until frothy.
2. Add flour, salt, and melted butter to the yeast mixture. Mix until a dough forms.
3. Knead the dough on a floured surface for about 10 minutes until smooth and elastic.
4. Place the dough in a greased bowl, cover, and let it rise in a warm place for 1 hour or until doubled in size.
5. Punch down the dough and divide it into 8 equal pieces. Shape each piece into a ball for burger buns or a log for hot dog buns.
6. Place the shaped dough onto a baking sheet lined with parchment paper. Cover and let rise for another 30 minutes.
7. Preheat the oven to 375°F (190°C). Brush the tops of the buns with the beaten egg.
8. Bake for 15 minutes or until golden brown. Let cool on a wire rack.