/6 Robustness & Diagram Validation – Polishing the Final Version (Solidsight v11)

IsaIsa
2 min read

The Need for Rigorous Validation

As Solidsight matured, accuracy became paramount. One key improvement was ensuring generated Mermaid diagrams were accurate and meaningful, addressing the occasional production of invalid placeholder diagrams by the LLM.


Validation and Regeneration Logic

I developed a function to validate generated diagrams:

def is_valid_mermaid(diagram):
    return (diagram.strip().startswith(("flowchart TD", "sequenceDiagram"))
            and "Default Diagram" not in diagram)

When invalid diagrams were detected, the tool would prompt users to regenerate them using the original contract code.

Persistent Challenges Solved

Previously, invalid diagrams went unnoticed, causing confusion for users. With this validation step, such diagrams were caught and addressed immediately, ensuring consistently high-quality outputs.

Final Reflections

Implementing robust validation and regeneration was perhaps one of the most impactful improvements. It highlighted the critical importance of quality assurance processes, ultimately turning Solidsight into a dependable, polished tool suitable for serious contract analysis.


Where can you find it?

I took the to Github as a fellow SR on X showed some interest in using it, and the app made is now available for all to use and adapt to their liking. The overall code isn’t complex, I used AI and made adjustments where needed (it speeds up the process) - Manually creating is fun, but, my time is spent in codebases looking for bugs, I try not to spend too much time building unless its completely necessary.

I also changed the name to DeepCurrent, I like Solidsight, but, as a final version 1, this was the choice.

Have fun & happy hunting: App: DeepCurrent

0
Subscribe to my newsletter

Read articles from Isa directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Isa
Isa

Former analyst with expertise in data, forecasting, and resource modeling, transitioned to cybersecurity over the past 4 years (as of May 2024). Passionate about security and problem-solving, utilising skills in data and analysis, for cybersecurity challenges. Experience: Extensive background in data analytics, forecasting, and predictive modelling. Experience with platforms like Bugcrowd, Intigriti, and HackerOne. Transitioned to Web3 cybersecurity with Immunefi, exploring smart contract vulnerabilities. Spoken languages: English (Native, British), Arabic (Fus-ha)