Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown file error with simple openzeppelin contract #888

Closed
RusAlex opened this issue Jul 8, 2021 · 4 comments
Closed

Unknown file error with simple openzeppelin contract #888

RusAlex opened this issue Jul 8, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@RusAlex
Copy link

RusAlex commented Jul 8, 2021

How to reproduce:

mkdir project
cd project
npm init
npm i @openzeppelin/contracts
truffle init
slither .

truffle.config.json

  compilers: {
    solc: {
      version: "0.8.4",    // Fetch exact version from solc-bin (default: truffle's version)
    }

contracts/Token.sol

pragma solidity 0.8.4;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract Token is ERC20 {
    constructor() public ERC20("Token", "TKN") {
    }
}

Output error

Traceback (most recent call last):
  File "/home/alex/.local/lib/python3.8/site-packages/crytic_compile/platform/truffle.py", line 216, in compile
    filename = convert_filename(
  File "/home/alex/.local/lib/python3.8/site-packages/crytic_compile/utils/naming.py", line 102, in convert_filename
    raise InvalidCompilation(f"Unknown file: {filename}")
crytic_compile.platform.exceptions.InvalidCompilation: Unknown file: project:/contracts/Token.sol

Full console output is here: https://termbin.com/ettm

@montyly
Copy link
Member

montyly commented Jul 9, 2021

Hi @RusAlex.

Thank you for reporting this. We are currently not supporting truffle 5.3.14, but we are working on it (crytic/crytic-compile#199)

@montyly montyly added the bug Something isn't working label Jul 9, 2021
@RusAlex
Copy link
Author

RusAlex commented Jul 9, 2021

Thank you for reporting this. We are currently not supporting truffle 5.3.14, but we are working on it (crytic/crytic-compile#199)

And what build system do you support?

@montyly
Copy link
Member

montyly commented Jul 9, 2021

We support truffle before 5.3.14 - but with 5.3.14 (which was recently released) they changed the filenames in the artifacts output (trufflesuite/truffle#4137), and we haven't updated yet our build system to take this into account.

@montyly
Copy link
Member

montyly commented Aug 18, 2021

Slither 0.8.1 was released yesterday, and contains the support for truffle >= 5.3.14

@montyly montyly closed this as completed Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants