2. How to use Polygon IDE?

1. Create a smart contract

To create a new smart contract we need to click on New File button at the top of the file system, currently supported file types in ChainIDE are txt', 'sol' , 'md' , 'compiled', 'deployed', 'json', 'txt', 'js', 'css', 'html', 'go', 'sum', and 'mod'. The contract shown in the figure below is a very simple storage contract prepared by ChainIDE for its users. Users can make changes in the built-in template according to their requirements.

2. Compile the smart contract

Then click the Compile button on the right menu bar to open the compilation module, then select the Compiler compilation tool, and then click the Compile Storage.sol button to compile the solidity file. After the compilation is successful, the following ABI and bytecode contents will appear, and the console will show Compile contract success is output.

3. Deploy the smart contract

Click the Deploy&Interaction button on the right, and the compilation page , and the interaction page will appear. Set the gas limit(1000000) and gas fee(20), then click Deploy and confirm on the Metamask. You can also click the Import Deployed Contract button to fill in the contract correlation information and click Import to import the deployed contract. The successful deployment will display contract-related information on the console and contract-related information on the interactive page.

4. Contract Interaction

After the contract is successfully deployed, we need to interact with the contract deployed on the chain to obtain our own wallet address. Enter the interactive information under the store and click the Submit button to pay the interactive handling fee. If the interaction is successful, the log information will be printed on the console. Click the Get button to return the result interaction information. (Query, copy, and delete buttons can perform corresponding operations on the contract)

5. Contract Query

Click the Transaction button on the right to display the transaction details page, where you can view the specific information of each transaction. Select one of the contracts and click the more button to view specific information.
Copy link
On this page
1. Create a smart contract
2. Compile the smart contract
3. Deploy the smart contract
4. Contract Interaction
5. Contract Query