Skip to content
forked from Recon-Fuzz/chimera

Smart Contract Property-Based Testing Framework

Notifications You must be signed in to change notification settings

nican0r/chimera

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chimera

Chimera is a smart contract property-based testing framework. Write once, run everywhere.

Installation

forge install Recon-Fuzz/chimera

Motivation

When writing property-based tests, developers commonly face several issues:

  • the amount of boilerplate code required
  • the challenge of switching tools after the initial setup
  • the difficulty in sharing results between different tools

Writing invariant tests that work seamlessly with Foundry, Echidna, Medusa, and Halmos is not straightforward.

Chimera addresses this problem by enabling a "write once, run everywhere" approach.

Limitations

Chimera currently only supports cheatcodes implemented by HEVM.

Foundry has extended these and offers functionality not supported by the HEVM cheatcodes, subsequently these must be accounted for when adding Chimera to a Foundry project as they will cause issues when running Echidna and Medusa. If adding Chimera to an existing Foundry project ensure that there are no cheatcodes implemented that aren't supported by HEVM as they will throw the following error: VM failed for unhandled reason, BadCheatCode <cheatcode hash>.

Features

  • Boilerplate contracts for Foundry, Echidna, Medusa, and Halmos tests
  • Python installation
  • chimera init: quickstarts a property-based testing setup for Foundry, Echidna, Medusa and Halmos
  • chimera install: installs Foundry, Echidna, Medusa, and Halmos
  • chimera convert: converts tx sequences from one tool to another
  • chimera TOOL: runs a property-based testing TOOL against the framework setup

About

Smart Contract Property-Based Testing Framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 100.0%