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

Breaking Issue with 0.5.x? #4

Open
cooganb opened this issue Mar 4, 2019 · 7 comments
Open

Breaking Issue with 0.5.x? #4

cooganb opened this issue Mar 4, 2019 · 7 comments

Comments

@cooganb
Copy link

cooganb commented Mar 4, 2019

Hi there! Been using this for an in-browser Solidity browser and but can't seem to migrate to Solidity 0.5.x. It seems to be related to this issue of import and export JSON for 0.5.x:

https://ethereum.stackexchange.com/questions/63267/solc-compile-0-5-0-is-not-working-like-0-4-version

Love being able to use browser-solc as it avoids import and would love to continue! Let me know what more details I can provide.

@maxwellfoley3
Copy link

I had the same issue. The problem is simply that @ericxtang hasn't updated this repo since version 0.5 came out. If you go into package.json and specify version 0.5 of solc-js, and then rebuild index.js yourself using the command in the readme, it should work (although solc itself has changed the syntax around using it so you will have to change your code as well)

@cooganb
Copy link
Author

cooganb commented Aug 16, 2019

@maxwellfoley3 Thank you for this! I'm having some trouble rebuilding it after specifying the new version. After running npm install then npm run build, I get:

Error: Cannot find module 'solc/wrapper' from '/Users/coogan/github/browser-solc/src'

Any ideas of how to get around this?? Super appreciate it.

@cooganb
Copy link
Author

cooganb commented Aug 17, 2019

okay, I think that was just an install issue and think I've gotten past it. however, now I'm having issues with the adjusted file input format for 0.5.x compiler related to this SO question:

https://ethereum.stackexchange.com/questions/63267/solc-compile-0-5-0-is-not-working-like-0-4-version

@maxwellfoley3 , were you able to get your input corrected?

@Tectract
Copy link

Tectract commented Jun 6, 2020

Hi coogan. Did you ever get compile working with the newest version of solc, 0.5.x+?

I'm getting this error:

RuntimeError: abort(Assertion failed: Cannot call unknown function compileJSON, make sure it is exported). Build with -s ASSERTIONS=1 for more info.

m browser-solc.min.js:7245

@Tectract
Copy link

Tectract commented Jun 7, 2020

Fixed in my fork. See PR #5

I changed "compileJSON" to "solidity_compile" in one place, to accomodate the newest solcjson code compilation standards. I added a little notes. Thank you, I am your code angel~

@cooganb
Copy link
Author

cooganb commented Jun 7, 2020

You are indeed my code angel! Gracias.

Any other code needed to run this?

@Tectract
Copy link

Tectract commented Jun 8, 2020

you'll need to wrap your solidity code text, as you mentioned in that SA thread. I put those notes in my repo and in the PR.

You'll need to update your parsing routine as the result JSON from the compiler has changed format a little, but you can figure that out.

So now, we need to figure out how to make it work under Chrome, and then Brave, lol.

See this Ethereum / Chrome ticket

and this Ethereum / Solc-JS ticket

and this Metamask Brave ticket

Repository owner deleted a comment from H4wk-eye Feb 21, 2024
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

3 participants