2. How to use Ant IDE?
This page discusses how you can create and compile a smart contract using ANT IDE, deploy the compiled smart contract to AntChain, and interact with the deployed smart contract.
Users need to click the New File button at the top of the file system to create a new contract file (currently supported file types are 'txt', 'sol',' md', 'compiled', 'deployed', 'json', 'txt', ' js', 'css', 'html', 'go', 'sum', 'mod'), here we choose the 'HelloWorld' smart contract, this is a very simple smart contract prepared by ChainIDE for its users, users can make modifications to it based on their requirements and can create new folders and supported files.
Create a smart contract using ChainIDE
Once you have finished writing down your smart contract, then click the Compile button on the right menu bar to open the compilation module, then select the appropriate compiler version according to your smart contract, choose a smart contract that you want to compile and press the compile button. After the compilation is successful, the ABI and bytecode contents will appear, and at the same time, they will be displayed on the console, "Compiled Successfully"
To deploy a smart contract to AntChain, click the Deploy & Interaction button on the right, and the compilation page and the interaction page will appear, then click the "Deploy" button. The successful deployment will display contract-related information on the console and on the interact panel.
After the contract is successfully deployed, you can easily interact with the deployed smart contract, and perform operations that we created in our smart contract, e.g., a HelloWorld for storing the string value has two operations, one is to store the value to the blockchain and second is to retrieve the stored value from the blockchain. A successful transaction will display the transaction record in the Output panel.