1

I would like to transpile some solidity code into javascript, however, I couldn't find a transpiler with all the features I require. I came across solidity2js but it doesn't support mappings and inheritance. Are there any other transpilers out there that do?

The only requirement is that the logic and math should work for all solidity integer types and the translation should convert the solidity contract to a JS class such that multiple contracts can be instantiated each with their own state, similar to the transpilation example shown on the solidity2js readme.

1 Answer 1

0

I think that you should specify which is your goal, transpiling simple conditions and loops to JS could be meaningful but how can it transpile things like gas management, (static) calls, etc... It would need to be transpiled to a JS code that then is executed in a special environment that emulates the blockchain.

However I suggest you check also solang which internally builds an intermediate LLVM representation (you can work and transform to JS this representation) but then compile to EWASM (that however can be executed in browser).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.