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

Why is solc.lowlevel.compileCallback null on solc 0.8.12? #610

Closed
Y-Zeus opened this issue Mar 9, 2022 · 4 comments
Closed

Why is solc.lowlevel.compileCallback null on solc 0.8.12? #610

Y-Zeus opened this issue Mar 9, 2022 · 4 comments

Comments

@Y-Zeus
Copy link

Y-Zeus commented Mar 9, 2022

const solc = require('solc');

if (typeof solc.lowlevel.compileSingle != 'function') {
		console.log('Low-level compileSingle interface not implemented by this compiler version.');
}

result:

TypeError: solc.lowlevel.compileCallback is not a function

solc version 0.8.12
why?

@cameel
Copy link
Member

cameel commented Mar 11, 2022

These low-level functions were superseded by compile() and are no longer needed (ethereum/solidity#3452). They were removed from the binary in 0.5.0 (ethereum/solidity#5105).

The only reason they're still present under lowlevel is that solc-js is meant to support all compiler binaries, including the ones older than 0.5.0. The check will succeed if you use it with such a binary. For newer ones they're null.

But you have a point in that it's not explained in the README. We should make it clearer.

@cameel cameel changed the title TypeError: solc.lowlevel.compileCallback is not a function Why is solc.lowlevel.compileCallback null on solc 0.8.12 Mar 11, 2022
@cameel cameel changed the title Why is solc.lowlevel.compileCallback null on solc 0.8.12 Why is solc.lowlevel.compileCallback null on solc 0.8.12? Mar 11, 2022
@Y-Zeus Y-Zeus closed this as completed Mar 14, 2022
@Y-Zeus
Copy link
Author

Y-Zeus commented Mar 14, 2022

thanks

@cameel
Copy link
Member

cameel commented Mar 14, 2022

I'll keep this open. I think we should add something about it to the README.

@cameel cameel reopened this Mar 14, 2022
@cameel cameel added this to solc-js Jun 10, 2022
@cameel cameel moved this to TODO in solc-js Jun 10, 2022
@r0qs
Copy link
Member

r0qs commented Mar 9, 2023

Fixed by #658.

@r0qs r0qs closed this as completed Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Implement
Development

No branches or pull requests

3 participants