Context : i'm trying to build a smart contract verification system which queries the blockchain about a given contract and then compares the deployed bytecode with the bytecode provided by the user (the whole thing resides on a Node.js server).
Problem: I found out that there is the possibility for the developers to run an arbitrary chosen solidity compiler through the usage of the command solc.looadRemoteVersion(version, callback) but no matter what I do, i keep getting the following error when calling the upmentioned method: Error retrieving binaries : not found.
What I understand is that solc is unable to locate where the binaries are saved (but the little docs I read actually say that if you have the latest installed then, sold should automagically have also older versions..)
And even if the latest version does not have all of its previous versions loaded, where should I put the different versions of the compilers in order for the command to really work?
For those who were asking, the solution that worked for me was what follows:
The input for the remote compiler version needs to be something like "v0.8.9+commit0.9...." (this also works for nightly versions of the compiler, I tried). Well turns out that if you compile your contract using hardat, that initial "v" is omitted by default.
So be careful when dealing with Hardat and solc versions !