Preheat the oven to 350 F (180 degree). Butter an 8 inch square baking pan. Line the pan with parchment paper, leaving a 1 inch overhang on two sides. Set aside, Place butter and chocolate in a large heatproof bowl set over (but not touching) simmering water; stir frequently until chocolate and butter are melted, about 7 minutes. remove bowl from heat;let cool to room temperature, 10 to 15 minutes.
Stir sugar into cooled chocolate mixture until combined. whisk in eggs one at a time, whisking until smooth after each addition. whisk in vanilla. Gently fold in flour and salt. Pour batter into prepared pan, and smooth top with an offset spatula. Bake until a cake tester inserted in the centre comes out with only a few moist crumbs attached, 40 to 45 minutes. Transfer pan to a wire rack to cool completely.
It can be kept in an airtight container at room temperature for upto 3 days.