> For the complete documentation index, see [llms.txt](https://qi-blockchain.gitbook.io/qie-oracle/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://qi-blockchain.gitbook.io/qie-oracle/getting-started/connecting-to-the-qie-blockchain.md).

# 🔗 Connecting to the QIE Blockchain

To interact with QIE Oracle contracts, your wallet or application must first connect to the **QIE Layer 1 blockchain**. Below are the steps for connecting using **MetaMask** and **JavaScript (ethers.js)**.

***

#### 🦊 Using MetaMask

You can manually add the QIE network to MetaMask:

1. Open MetaMask
2. Click **"Add Network"**
3. Enter the following network details:

```
Network Name:       QIE Mainnet
RPC URL:            https://rpc5mainnet.qie.digital
Chain ID:           1990       
Currency Symbol:    QIE
Block Explorer URL: https://mainnet.qie.digital

```

4. Click **Save**, then switch your wallet to the newly added QIE Mainnet.

> ✅ Once added, you’ll be able to sign transactions and interact with the QIE Oracle contracts directly from MetaMask.

***

#### 📦 Using JavaScript (ethers.js)

To connect your JavaScript or Node.js application to the QIE blockchain using `ethers.js`:

```
const { ethers } = require("ethers");

// Connect to the QIE blockchain via RPC
const provider = new ethers.JsonRpcProvider("https://rpc5mainnet.qie.digital");

console.log("Connected to QIE blockchain:", provider);

```

> ✅ You can now use the `provider` to interact with smart contracts, read oracle data, send transactions, and more.
