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

Error: Contract could not be compiled. Try another pragma solidity version. #27

Open
gpersoon opened this issue Sep 26, 2019 · 4 comments

Comments

@gpersoon
Copy link
Contributor

When trying to use some source i got the error: "Error: Contract could not be compiled. Try another pragma solidity version.". After eliminating it turns out the following contact is causing the error:

pragma solidity ^0.5.0;
import "./test.sol";

The developer console contains

bundle.js:48855 TypeError: Cannot read property 'legacyAssembly' of undefined
bundle.js:48856 [ERROR] parse standard output error
bundle.js:49459 Error: pretest failed
@ninabreznik
Copy link
Member

Thanks for this. Could you please help me reproduce this? When does is happen?

@ninabreznik
Copy link
Member

Screenshot_2019-09-26_14-05-54

@gpersoon
Copy link
Contributor Author

serapath:

  • the error message is because of the way we detect compiler problems with certain browsers. The version you specify (0.5.0) has a problem with the browser, BUT... it seems not with all possible contracts.

  • The contract example you use would actually work, but doesn't because of the unsupported local imports ...

  • it's just that there is another problem with this version that we detect first, but probably we shouldn't, because maybe if you compile a contract that would work with the compiler version you specified even though not all possible contracts work with that version as we detect ...... yeah...

@gpersoon
Copy link
Contributor Author

For the record: i've tried all kinds of version numbers but they all show the same error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants