SoliDiffy: AST Differencing for Solidity Smart Contracts

Mojtaba Eshghie,Viktor Åryd,Martin Monperrus,Cyrille Artho
2024-11-12
Abstract:Smart contracts, primarily written in Solidity, are integral to blockchain software applications, yet precise analysis and maintenance are hindered by the limitations of existing differencing tools. We introduce SoliDiffy, a novel Abstract Syntax Tree (AST) differencing tool specifically designed for Solidity. SoliDiffy enables fine-grained analysis by generating accurate and concise edit scripts of smart contracts, making it ideal for downstream tasks such as vulnerability detection, automated code repair, and code reviews. Our comprehensive evaluation on a large dataset of real-world Solidity contracts demonstrates that SoliDiffy delivers shorter and more precise edit scripts compared to state-of-the-art tools, while performing consistently in complex contract modifications. SoliDiffy is made publicly available at <a class="link-external link-https" href="https://github.com/mojtaba-eshghie/SoliDiffy" rel="external noopener nofollow">this https URL</a>.
Software Engineering,Programming Languages
What problem does this paper attempt to address?