Preheat oven at 160C.
Line the bottom and sides of an 8-inch (20cm) square baking pan with parchment paper or aluminum foil.
In a heatproof bowl, combine the sugar, butter, cocoa powder and salt.
For the double boiling method, take a sauce pan and fill with enough water and bring to a simmer.
Place the bowl containing the cocoa-butter mixture over the simmering water. Make sure that the water isn't touching the base of the bowl. If water touches the bowl, remove some water.
Stir mixture occasionally until the butter has melted and mixture is quite warm. Donu2019t worry if it looks gritty, it will become smooth once you add the eggs and flour.
Remove the bowl from heat and set aside for 3 to 5 minutes until it is only warm, not hot.
Stir in vanilla.
Add eggs, one at a time, and mix well.
When the batter looks thick, shiny and well blended, add the flour and stir until fully incorporated. The batter will be quite thick.
Stir in nuts, if using.
Spread evenly in lined pan.
Bake 30 minutes or until a toothpick inserted into the centre comes out almost clean.
Cool completely and remove from pan.
Cut into squares and serve.