Allow hevm to define contracts with potential callbacks to execute
- Dominant language
- Haskell
- Stars
- 358
- Forks
- 79
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 6
Description
The feature for using `only deployed` contracts during the symbolic execution was the first step. Here is a proposal to extend it. Allow hevm to find a counter example here:
```solidity
pragma solidity ^0.8.13;
contract Counter {
uint256 public number;
function increment() public {
number++;
}
}
contract Test {
Counter c;
bool public IS_TEST = true;
function setUp() public {
c = new Counter();
}
function prove_double_increment(address t) public {
uint256 number = c.number();
Counter(t).increment();
assert(c.number() <= number + 1);
}
}
```
In this example, One external call for `increment` is not enough: hevm needs to synthesize a contract with two external calls.
Contributor guide
No contributing guide indexed for this repository
Research direction
The Solidity example and the existing `only deployed` contract feature are the starting points; first trace how hevm handles deployed contracts during symbolic execution. Done means hevm can synthesize multiple external calls for a potential callback and find the shown double-increment counterexample.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell, solidity
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100