cleanunicorn / mythos

CLI client for the MythX API
https://mythx.io/
20 stars 6 forks source link

[BUG] › Error: Sources are provided without `mainSource` field #39

Closed sjukeshov closed 5 years ago

sjukeshov commented 5 years ago

Describe the bug I tried to check Mythos with test contract https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-100#visibility-not-setsol and getting this error on others also

To Reproduce Steps to reproduce the behavior:

  1. https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-100#visibility-not-setsol
  2. mythos analyze contracts/visibility_not_set.sol HashForEther
  3. Error: Sources are provided without mainSource field

Expected behavior SWC-100 detected

Console output mythos analyze contracts/visibility_not_set.sol HashForEther Reading contract contracts/visibility_not_set.sol... done Compiling with Solidity version: v0.4.24+commit.e67f0147 (node:21429) V8: soljson-v0.4.24+commit.e67f0147.js:3 Invalid asm.js: Invalid member of stdlib › Warning: contracts/visibility_not_set.sol:18:30: Warning: Using contract member "balance" inherited from the address type is deprecated. Convert the contract to "address" type to access the member, › for example use "address(contract).balance" instead. › msg.sender.transfer(this.balance); › ^----------^ › › Warning: contracts/visibility_not_set.sol:11:5: Warning: No visibility specified. Defaulting to "public". › function withdrawWinnings() { › ^ (Relevant source part starts here and spans across multiple lines). › › Warning: contracts/visibility_not_set.sol:17:6: Warning: No visibility specified. Defaulting to "public". › function _sendWinnings() { › ^ (Relevant source part starts here and spans across multiple lines). › Compiling contract contracts/visibility_not_set.sol... done Analyzing contract HashForEther... ! › Error: Sources are provided without mainSource field

Context information

Additional context

cleanunicorn commented 5 years ago

This was fixed in 0.10.0.