Why is `solc.lowlevel.compileCallback` `null` on solc 0.8.12?
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?
These low-level functions were superseded by compile() and are no longer needed (https://github.com/ethereum/solidity/issues/3452). They were removed from the binary in 0.5.0 (https://github.com/ethereum/solidity/pull/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.
thanks
I'll keep this open. I think we should add something about it to the README.
Fixed by https://github.com/ethereum/solc-js/pull/658.