2. How to use Aptos IDE

The process of writing, testing, compiling, deploying, interacting, and querying with Aptos smart contracts

1. Write a contract

Upon entering the project, the README.md file included in the folder will be automatically previewed.

In the Explorer panel, you can create new files (or folders), refresh the directory, and download files. You can also directly click on the files that come with the template.

Click on Move.toml, and replace _ with your Aptos wallet address.

2. Test a contract

Once your contract code is written, click on the "Compiler" button in the right-side menu to open the compilation module. After selecting the Module Package Path, click on "Test."

After a successful test, the test results will be displayed in the console.

3. Compile a contract

On the right-hand menu bar, under the Compiler section, click on "Compile" to start compiling the contract.

After successful compilation, the results will be displayed on the console.

4. Connect to Aptos

Before deploying a contract, you need to click on "Connect Wallet" on the upper right corner. Choose from one of the available wallet to connect it to ChainIDE.

5. Deploy a contract

Click the "Deploy & Interaction" button on the right-hand side, which will bring up the deployment and interaction pages. Select the compiled contract and click "Publish" to initiate the deployment (then confirm in Wallet). After successful contract deployment, the console will display the contract deployment result and relevant information.

In addition, you can click "Import Deployed Contract" to import a contract that has already been deployed for contract interactions.

6. Contract interaction

After successful contract deployment, you can interact with the contract. Click on the deployed contract, select the corresponding interface, and proceed with the interaction.

7. Modules & Resources Query

Click on "Modules & Resources" and enter the corresponding fields to query the relevant information.

8. Aptos Sandbox

If you prefer using the command line for development, you can open the Aptos Sandbox, which comes pre-loaded with Aptos Cli, Git and Node.js V16.

If you've started a process on a port in the Sandbox and wish to access that port, please refer to ChainIDE - Port Forwarding.

Last updated