enzymefinance / oyente

An Analysis Tool for Smart Contracts
GNU General Public License v3.0
1.32k stars 309 forks source link

Constructor not supported #399

Closed letbecool closed 4 years ago

letbecool commented 4 years ago

Solidity code

pragma solidity >=0.4.24 <0.6.0;
contract OwnerAddress {
    address owner;
        constructor () public { 
             owner = msg.sender;
     }
}

Testing using Oyente : root@8b701a5ef883:/oyente/oyente# python oyente.py -ru https://gist.githubusercontent.com/letbecool/fc3f166f86893146ebc365e83a265455/raw/3cdc2e2bd86205ebd8ea126a662d2efb2be2e4a8/oyenteconstructor.sol -ce Result :

CRITICAL:root:remote_contract.sol:6:21: Error: Expected identifier, got 'LParen'
        constructor () public { 
CRITICAL:root:Solidity compilation failed.
yxliang01 commented 4 years ago

@letbecool This is because you are using old version of solc that doesn't support this constructor syntax. Please try updating your solc to say 0.4.24. If you encounter new problems, please let me know.

yxliang01 commented 4 years ago

Closing due to inactivity. @letbecool you can reopen if the error persists.