Test Amplifier for Smart Contracts

AI-powered test generation system for Solidity smart contracts using Large Language Models to automatically generate and improve tests, increasing code coverage and fault detection.

Research projectAIOur Work
Test Amplifier for Smart Contracts

The challenge

Smart contract teams needed broader test coverage without exhaustive manual test writing.

What we built

LLM-powered test amplifier with hybrid search-based refinement for Solidity contracts.

Impact

Higher code coverage, more edge cases caught, and easier integration with Hardhat/CI pipelines.

Read more

Our Test Amplifier focuses on leveraging Large Language Models (LLMs) to automatically generate and improve tests for Solidity smart contracts. Smart contracts can be seen as programs that run on blockchain platforms like Ethereum. Because they are immutable (cannot be changed once deployed) and often manage financial assets, even small errors can have serious consequences. Thorough testing is therefore essential. A broader and smarter test suite not only catches more edge cases but also increases confidence in the contract's reliability.

Approach

We explored three approaches: LLM-based amplification using pretrained language models (GPT, Claude) to produce context-aware tests; Search-based amplification applying algorithmic exploration to diversify inputs; and a Hybrid strategy combining both methods to refine LLM-generated tests using search-based methods for highest coverage.

Result

Our approach improves smart contract reliability, reduces manual testing effort, and lays a foundation for scalable, automated testing workflows. It can be directly deployed into multiple different applications, making it easy to integrate with existing developer toolchains such as Hardhat or CI/CD pipelines. This ensures that teams can benefit from AI-powered test amplification without having to change their current workflows.

Stack

LLMSoliditySmart ContractsAI Testing