I have a static webpage and it should remain static. In this website a user generates solidity files. I would like to compile them by sending the uncompiled solidity via an api to a compiler and then receive either the compiled bytecode (potentially with warnings) or receiving an error-message if the compilation was not successful.
I do not think that I can use solc
, as this article suggests, because I have a strict frontend usecase.
For instance I know that etherscan has an api that lets you verify contracts and within that verification there is of course a compilation, but there is no way to just get solidity files compiled. I know that remix.ethereum is all about compiling solidity and there seem to be some javascript libraries that do interact with it, but to my knowledge there is no (hacky or not hacky way) of sending programming code and receiving compiled code. Lastly, I could of course set up my own server and do the thing, but I'd rather not, unless there really is no other solution.