crytic / crytic/echidna

Feature Request: Add values from state changes and/or events to corpus

Open
#883 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
3.2k
Forks
432
Avg merge
1d 20h
Merged PRs (30d)
5

Description

**Feature**
It would be nice to have echidna add values from state changes and/or emitted events to the corpus.

**State changes**
A simple example of state changes would be an ERC20 transfer. The new balance(s) might be interesting numbers to find edge cases.

![image](https://user-images.githubusercontent.com/1430820/210110253-f0f51d08-2d8e-4bbc-8d25-fb9348c6f274.png)
https://etherscan.io/tx/0x483b6382644c114dba9268fa8a45a8c8921666043ea75ae2fc6e09381a5363f2#statechange

**Events**
An example for events would also be transfering ERC20 or ERC721 tokens. Here you have the value transfered or the id of the NFT.

In my opinion many events hold a treasure trove of interesting numbers. For example:
```solidity
event ConditionCreated(
uint256 indexed oracleConditionId,
uint256 indexed conditionId,
uint64 timestamp
);
event ConditionResolved(
uint256 indexed oracleConditionId,
uint256 indexed conditionId,
uint64 outcomeWin,
uint8 state,
uint256 amountForLp
);
```
https://github.com/Azuro-protocol/Bug-Bounty/blob/main/contracts/interface/ICore.sol#L37

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.