# 2. How to use FISCO BCOS IDE

## 1. Write a contract

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

<figure><img src="https://3745657014-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FrAZdSHdFCvwYfYXmC5Tm%2Fimage.png?alt=media&#x26;token=99c11313-8255-453e-803e-996811496c12" alt=""><figcaption></figcaption></figure>

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.

<figure><img src="https://3745657014-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FE2cSwSZdbKLZK5YN7XGK%2Fimage.png?alt=media&#x26;token=47ea9493-d238-474e-ab62-17a9d1f83dd3" alt=""><figcaption></figcaption></figure>

Click on a contract file to edit the code.

<figure><img src="https://3745657014-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2Fc3NCif0cmQb6idg1jY4z%2Fimage.png?alt=media&#x26;token=a3bfae68-88a5-480d-b296-de50afd1b019" alt=""><figcaption></figcaption></figure>

## 2. Compile a contract

Once your contract code is written, click on the "Compiler" button in the right-side menu to open the compilation module. Choose the compiler version and decide whether to enable optimization, then click "Compile \*\*\*.sol" to initiate the compilation.

<figure><img src="https://3745657014-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FR1V2b3jabHAHEL2dnKCz%2Fimage.png?alt=media&#x26;token=81b01091-2005-4662-b144-2a0bf66f2b49" alt=""><figcaption></figcaption></figure>

After successful compilation, the [ABI](https://docs.soliditylang.org/en/latest/abi-spec.html) and BYTE CODE will be displayed below, and you'll see a message in the console stating "Compile contract success."

<figure><img src="https://3745657014-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FczE48oDmrmEi2hNWpGds%2Fimage.png?alt=media&#x26;token=3f51d9b4-063e-48dd-a60e-b13b54bc0781" alt="" width="326"><figcaption></figcaption></figure>

## 3. 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 "Deploy" to initiate the deployment. After successful contract deployment, the console will display the contract deployment result and relevant information.

<figure><img src="https://3745657014-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2F28DK354wt97iIAzVhc7t%2Fimage.png?alt=media&#x26;token=bdad170f-c849-4f2f-ad79-cd085c0b5d75" alt=""><figcaption></figcaption></figure>

## 4. Contract interaction

After a successful contract deployment, you can interact with the contract. Click on the deployed contract, choose the corresponding interface, and click "Submit" or "Get" to perform interactions.

<figure><img src="https://3745657014-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2FVknHLfYuASBCHmAwdOnq%2Fimage.png?alt=media&#x26;token=ffbb206b-8f0b-4b26-b730-45084b83bcee" alt=""><figcaption></figcaption></figure>

## 5. Transaction Query

Click on the transaction hash in the Output section to view the specific details of each transaction.

<figure><img src="https://3745657014-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYy-lqJKjq1m0yBAX4r%2Fuploads%2F7iAQP9ImS5xLUmTniJdD%2Fimage.png?alt=media&#x26;token=d1da71ac-05c6-4b97-8d86-a6b644a9ea5b" alt=""><figcaption></figcaption></figure>
