def get(self, block_number: BlockNumber) -> str:
        """Given a block number returns the hex representation of the blockhash"""
        if block_number in self.mapping:
            return self.mapping[block_number]

        block_hash = self.web3.eth.getBlock(block_number)['hash']
        block_hash = block_hash.hex()
        self.mapping[block_number] = block_hash
        return block_hash
def get ( self , block_number : BlockNumber ) -> str : if block_number in self . mapping : return self . mapping [ block_number ] block_hash = self . web3 . eth . getBlock ( block_number ) [ 'hash' ] block_hash = block_hash . hex ( ) self . mapping [ block_number ] = block_hash return block_hash
Given a block number returns the hex representation of the blockhash