Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Recon-Fuzz/chimera

Smart Contract Property-Based Testing Framework
https://github.com/Recon-Fuzz/chimera

echidna foundry fuzzer halmos medusa smart-contracts

Last synced: about 9 hours ago
JSON representation

Smart Contract Property-Based Testing Framework

Awesome Lists containing this project

README

        

## Chimera

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



### Installation

```bash
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](https://hevm.dev/std-test-tutorial.html#supported-cheat-codes).

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 `.

While **medusa** supports `etch`, echidna does not support it yet. Please note when using `etch` in an echidna environment it will not work as expected.

### Features

- [x] Boilerplate contracts for Foundry, Echidna, Medusa, Halmos and Kontrol tests