I want to do some automatic transformation of solidity source code. For this reason, I thought to get its AST representation using solc --ast
or solc --ast-json
and modify it.
My questions are:
- What is the best approach to modify the AST? Should I use the text or json representation?
- How do I compile the modified AST to binary code? Do I have to convert the AST back to source code, and if yes how can this be done?
- Are there any existing tools that provide such desired functionalities?