Skip to content

Commit

Permalink
Merge pull request #130 from valory-xyz/vote_weighting_fuzzing
Browse files Browse the repository at this point in the history
Vote weighting fuzzing
  • Loading branch information
kupermind authored May 13, 2024
2 parents 39af7cd + 14cab96 commit a494b43
Show file tree
Hide file tree
Showing 17 changed files with 6,671 additions and 247 deletions.
1,086 changes: 1,086 additions & 0 deletions abis/0.8.23/VoteWeighting.json

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions audits/internal11/fuzzing/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Fuzzing VoteWeighting

## Prepare contracts for fuzzing
contracts/test/VoteWeightingFuzzing.sol <br>
contracts/test/EchidnaVoteWeightingAssert.sol <br>

## Fuzzing
```sh
# Move the script to the root of the project
cp start_echidna.sh ../../../
# Move config file to the root of the project
cp echidna_assert.yaml ../../../
cd ../../../
# Run
./start_echidna.sh
```
result overflow: [fuzzing-overflow.PNG](fuzzing-overflow.PNG) <br>
result assert: [fuzzing-assert.PNG](fuzzing-assert.PNG)
2,072 changes: 2,072 additions & 0 deletions audits/internal11/fuzzing/corpusEchidna/covered.1713373564.html

Large diffs are not rendered by default.

2,073 changes: 2,073 additions & 0 deletions audits/internal11/fuzzing/corpusEchidna/covered.1713373572.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions audits/internal11/fuzzing/crytic-export/combined_solc.json

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions audits/internal11/fuzzing/echidna_assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#testMode: overflow
testMode: assertion
coverage: true
corpusDir: corpusEchidna
coverageFormats: ["html"]
# maxBlockDelay: 12
# provide solc remappings to crytic-compile
# https://www.justinsilver.com/technology/programming/slither-echidna-remappings/
cryticArgs: ['--solc-remaps', '@=node_modules/@']

10 changes: 10 additions & 0 deletions audits/internal11/fuzzing/echidna_overflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
testMode: overflow
#testMode: assertion
coverage: true
corpusDir: corpusEchidna
coverageFormats: ["html"]
# maxBlockDelay: 12
# provide solc remappings to crytic-compile
# https://www.justinsilver.com/technology/programming/slither-echidna-remappings/
cryticArgs: ['--solc-remaps', '@=node_modules/@']

Binary file added audits/internal11/fuzzing/fuzzing-assert.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added audits/internal11/fuzzing/fuzzing-overflow.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions audits/internal11/fuzzing/start_echidna.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

rm -rf corpusEchidna/
echidna contracts/test/EchidnaVoteWeightingAssert.sol --contract EchidnaVoteWeightingAssert --config echidna_assert.yaml
Loading

0 comments on commit a494b43

Please sign in to comment.