Preheat the oven to 180°C and grease a 20cm cake tin with butter.
Simmer water in a pan and suspend a heatproof bowl above it without touching the water.
Melt the stout and dark chocolate together in the bowl and set aside to cool.
Beat the butter and sugar until light and fluffy.
Add the eggs one at a time and beat well.
Mix in the cooled chocolate mixture and fold in the flour.
Bake the mixture in the middle of the oven for 30 to 35 minutes.
Cool the cake in the tin briefly before transferring it to a wire rack.
Prepare a second bain-marie by simmering water in a pan.
Melt the milk chocolate, butter, and stout together and cool slightly.
Pulse the chocolate mixture with icing sugar in a food processor until smooth.
Spread icing over the cooled cake and sprinkle with chopped hazelnuts.