This section covers the detailed information about the Compile module of ChainIDE.
Once a user has completed writing down the smart contract, the smart contract is compiled to check if it has any error(s) and to get the "ABI" file and "BYTE CODE" for the smart contract, as a smart contract needs to be compiled before it can be deployed on any blockchain. For successful compilation, a user needs to select an appropriate compiler version among the available compiler version that is compatible with the user's smart contract. Now, we will see how to access the compile module using ChainIDE and what operations can be performed using compile module. To access the compile module please follow the steps shown in the figure below.
1. Compile module and the method to compile a smart contract
- A user needs to open the smart contract in the terminal panel that a user wants to compile.The compiler module will automatically detect the opened file and will give an option to compile the smart contract selected in the terminal panel.
- user needs to select the compatible compiler version according to the smart contractAfter selecting the compiler version, a user needs to press the compiler button. The compiler button will be shown as "Compile+ Smart Contract Name".
- Once a user clicks the compile button, the status can be seen in the terminal output, if it is successful, an ABI and BYTE CODE file will be generated in the compile panel. A user needs to open the smart contract in the terminal panel that a user wants to compile.
2. Successful Compilation of a Smart Contract