mythril icon indicating copy to clipboard operation
mythril copied to clipboard

Refactor: Language module

Open JoranHonig opened this issue 6 years ago • 2 comments
trafficstars

Description

Right now we have a module mythril.solidity. A new module is needed called mythril.lang which should contain the before mentioned module.

This module should also contain a base abstract class BaseContract, which is inherited by SolidityContract.

Requirements

  • [ ] mythril.solidity is moved to mythril.lang.solidity
  • [ ] BaseContract is implemented and Extended by Solidity
  • [ ] Implement mythril.lang.viper and ViperContract. Which would be the equivalent of SolidityContract but for viper
  • [ ] myth -x ./contract.vy analyzes the viper contract like it would have a solidity contract

Useful Info:

The following link describes how to use the vyper compiler to get some relevant fields https://vyper.readthedocs.io/en/latest/compiling-a-contract.html

JoranHonig avatar Nov 22 '18 18:11 JoranHonig

Can mythril analyze contracts compiled from Vyper presently or is it completely useless for all non-Solildity contracts for now?

scherrey avatar Apr 18 '23 15:04 scherrey

Hi @scherrey, Mythril can analyze EVM bytecode and accurately identify vulnerabilities in contracts compiled with Vyper. However, it only provides the location of the vulnerability in terms of bytecode, not source code. Developers would need to use a mapping between bytecode and source code to understand the vulnerability in the context of the original source code.

norhh avatar Apr 19 '23 18:04 norhh