crytic / crytic/slither

slither-prop seems to reference wrong file in instructions for running echidna

Open
#754 0 comments 0 reactions 0 assignees View on GitHub
ux
Dominant language
Python
Stars
6.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

```
slither-prop YAMDelegator.sol --contract YAMDelegator
```
outputs
```
To run Echidna:
echidna-test YAMDelegator.sol --contract TestYAMDelegatorTransferable --config echidna_config.yaml
```
but following the instructions
```
echidna-test YAMDelegator.sol --contract TestYAMDelegatorTransferable --config echidna_config.yaml
```
outputs
```
echidna-test: Given contract "TestYAMDelegatorTransferable" not found in given file
```

I think slither-prop should output:
```
To run Echidna:
echidna-test TestYAMDelegatorTransferable.sol --contract TestYAMDelegatorTransferable --config echidna_config.yaml
```

```
echidna-test TestYAMDelegatorTransferable.sol --contract TestYAMDelegatorTransferable --config echidna_config.yaml
```
gets me further but seems to run into https://github.com/crytic/echidna/issues/311
```
Analyzing contract: /home/max/trailofbits/yam/TestYAMDelegatorTransferable.sol:TestYAMDelegatorTransferable
echidna-test: No bytecode found for contract "/home/max/trailofbits/yam/TestYAMDelegatorTransferable.sol:TestYAMDelegatorTransferable"
```

# further initital steps to reproduce

put code from https://etherscan.io/address/0x0AaCfbeC6a24756c20D41914F2caba817C0d8521#code into `YAMDelegator.sol`

```
solc use 0.5.15
slither-prop YAMDelegator.sol --contract YAMDelegator
```
outputs
```
slither-prop requires YAMDelegator.transfer(address,uint256) to be public. Please change the visibility
slither-prop requires YAMDelegator.transferFrom(address,address,uint256) to be public. Please change the visibility
slither-prop requires YAMDelegator.approve(address,uint256) to be public. Please change the visibility
```

manually change visibility of the above and also of `balanceOf` and `totalSupply` otherwise one gets `undeclared identifiers` for the code slither prop generates since they are declared `external` in YAM.

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.