# Using Remix IDE

## Deploying a Smart Contract on Bitcichain with Remix and MetaMask

### Introduction

This guide will walk you through the process of connecting to Bitcichain, deploying a smart contract using Remix, and interacting with MetaMask for transaction signing.

#### Prerequisites

* [ ] Installed [MetaMask](https://metamask.io/download/) extension in your browser.
* [ ] MetaMask wallet funded with BITCI tokens.

{% hint style="info" %}
**For mainnet**: If you do not have BITCI tokens in your wallet, you can withdraw BITCI to your Metamask wallet using a CEX such as [bitci.com](https://bitci.com/).
{% endhint %}

### Step 1: Connect to Bitcichain

1. Open [Remix](https://remix.ethereum.org/): Visit Remix in your browser.
2. Connect to Bitcichain: In the Remix interface, select "Solidity" on the left sidebar. Click on the "Deploy & Run Transactions" tab, and choose "Injected Web3" as the environment. This connects Remix to your MetaMask wallet.

### Step 2: Write or Import Smart Contract Code

1. Write or Import: Write your smart contract code in the Remix editor or import an existing one.
2. Compile: Click on the "Solidity Compiler" tab, and compile your smart contract code.

### Step 3: Deploy Smart Contract

1. Deploy: Go back to the "Deploy & Run Transactions" tab.
2. Select Contract: Choose the smart contract you want to deploy from the dropdown.
3. Deploy: Click on the "Deploy" button. MetaMask will prompt you to confirm the transaction.

### Step 4: Confirm Transaction in MetaMask

1. MetaMask Prompt: MetaMask will open, showing details of the transaction. Confirm the gas fees and click "Confirm."
2. Wait for Confirmation: Wait for the transaction to be confirmed on Bitcichain.

### Step 5: Interact with Deployed Smart Contract

1. Contract Interaction: Once the contract is deployed, you can interact with it using Remix or other tools.
2. MetaMask Interaction: Use MetaMask for any subsequent transactions related to the smart contract.

Congratulations! You have successfully deployed a smart contract on Bitcichain using Remix and MetaMask. Feel free to explore additional features, and refer to Bitcichain documentation for advanced functionalities.

### Additional Resources

* [Remix Documentation](https://remix-ide.readthedocs.io/en/latest/)
* [MetaMask Guide](https://support.metamask.io/hc/en-us/articles/360043227612-How-to-add-a-custom-network-RPC)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bitcichain.com/developers/build-on-bitcichain/using-remix-ide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
