Merge branch 'master' of github.com:ConsenSys/mythril into add_truffle_signatures

pull/386/head
Nikhil Parasaram 6 years ago
commit a2e0696841
  1. 35
      .github/ISSUE_TEMPLATE/analysis-module.md
  2. 68
      .github/ISSUE_TEMPLATE/bug-report.md
  3. 28
      .github/ISSUE_TEMPLATE/bug_report.md
  4. 24
      .github/ISSUE_TEMPLATE/feature-request.md
  5. 6
      mythril/ether/soliditycontract.py

@ -4,13 +4,34 @@ about: Create an analysis module feature request
--- ---
# Detection issue: Please remove any of the optional sections if they are not applicable.
Name the issue that should be detected using the analysis module
## Description: ## Description
Provide a detailed description of the vulnerabiltity that should be detected
## Link Replace this text with a description of an vulnerability that should be
Provide resources that can help with implementing the analysis module detected by a Mythril analysis module.
## Implementation details:Initial implementation ideas/instruction ## Tests
_This section is optional._
Replace this text with suggestions on how to test the feature,
if it is not obvious. This might require certain Solidity source,
bytecode, or a Truffle project. You can also provide
links to existing code.
## Implementation details
_This section is optional._
If you have thoughts about how to implement the analysis, feel free
replace this text with that.
## Links
_This section is optional._
Replace this text with any links describing the issue or pointing to resources
that can help in implementing the analysis
Thanks for helping!

@ -0,0 +1,68 @@
---
name: Bug report
about: Tell us about Mythril bugs to help us improve
---
_Note: did you notice that there is now a template for requesting new features?_
Please remove any of the optional sections if they are not applicable.
## Description
Replace this text with a clear and concise description of the bug.
## How to Reproduce
Please show both the input you gave and the
output you got in describing how to reproduce the bug:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
or give a complete console log with input and output
```console
$ myth <command-line-options>
==== Exception state ====
Type: ...
Contract: ...
Function name: ...
...
$
```
If there is a Solidity source code, a truffle project, or bytecode
that is involved, please provide that or links to it.
## Expected behavior
A clear and concise description of what you expected to happen.
## Screenshots
_This section is optional._
If applicable, add screenshots to help explain your problem.
## Environment
_This section sometimes is optional but helpful to us._
Please modify for your setup
- Mythril version: output from `myth --version` or `pip show mythril`
- Solidity compiler and version: `solc --version`
- Python version: `python -V`
- OS: [e.g. iOS]
- OS Version [e.g. 22]
## Additional Environment or Context
_This section is optional._
Add any other context about the problem here or special environment setup
Thanks for helping!

@ -1,28 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

@ -0,0 +1,24 @@
---
name: Feature Request
about: Tell us about a new feature that would make Mythril better
---
## Description
Replace this text with a short description of the feature.
## Background
Replace this text with any additional background for the
feature, for example: user scenarios, or the value of the feature.
## Tests
_This section is optional._
Replace this text with suggestions on how to test the feature,
if it is not obvious. This might require certain Solidity source,
bytecode, or a Truffle project. You can also provide
links to existing code.
Thanks for helping!

@ -1,6 +1,6 @@
import mythril.laser.ethereum.util as helper import mythril.laser.ethereum.util as helper
from mythril.ether.ethcontract import ETHContract from mythril.ether.ethcontract import ETHContract
from mythril.ether.util import * from mythril.ether.util import get_solc_json
from mythril.exceptions import NoContractFoundError from mythril.exceptions import NoContractFoundError
@ -54,7 +54,7 @@ class SolidityContract(ETHContract):
# If a contract name has been specified, find the bytecode of that specific contract # If a contract name has been specified, find the bytecode of that specific contract
if name: if name:
for key, contract in data['contracts'].items(): for key, contract in sorted(data['contracts'].items()):
filename, _name = key.split(":") filename, _name = key.split(":")
if filename == input_file and name == _name and len(contract['bin-runtime']): if filename == input_file and name == _name and len(contract['bin-runtime']):
@ -67,7 +67,7 @@ class SolidityContract(ETHContract):
# If no contract name is specified, get the last bytecode entry for the input file # If no contract name is specified, get the last bytecode entry for the input file
else: else:
for key, contract in data['contracts'].items(): for key, contract in sorted(data['contracts'].items()):
filename, name = key.split(":") filename, name = key.split(":")
if filename == input_file and len(contract['bin-runtime']): if filename == input_file and len(contract['bin-runtime']):

Loading…
Cancel
Save