# 3.2 Launching Your First Project

GRX Chain is EVM-compatible, low-fee, and built for scale—so you can deploy dApps and smart contracts quickly, then iterate with confidence. We strongly recommend **starting on Testnet** to rehearse deployments, validate flows, and catch issues before Mainnet.

### Before you start

#### Consolidated network & tools

**Mainnet**

* **RPC:** `https://rpc.grxchain.io`
* **Chain ID:** `1110` (`0x456`)
* **Symbol:** `GRX`
* **Explorer:** `https://grxscan.io`

**Testnet**

* **RPC:** `https://testnet.grxchain.io`
* **Chain ID:** `2507` (`0x9CB`)
* **Symbol:** `tGRX`
* **Explorer:** `https://testnet.grxscan.io`
* **Faucet:** `https://faucet.grxchain.io`

**Bridging (official, current):** `https://grovex.io`

#### Canonical core contracts (Mainnet)

* **WGRX (ERC-20):** `0x45C7287F897B3A79Cd3f6e4F14B4CE568f023bD5` (18 decimals)
* **Multicall:** `0x2cd9E100Ca0d883A00eC8Ce635EbD4C17508FE3B`
* **GRXswap (DEX):** `https://grxswap.io`
  * **Factory:** `0xc7316818841f355c5107753A3f3FDEA799BD25f6`
  * **Router v2:** `0x28fC93b8a20570f2B59d5CA9f8a1dA02C4DBcDF5`
  * **Pair Init Code Hash:** `0xb23d9a8f0a03ecd8f95e43ab1025c71bb79f1cb7128d40546417bfb4b2a74d9c`
* **Pegged assets (examples):**
  * **USDT:** 0x173462F5eb7CA0D1ab6aaea846fEFe85A28029E2
  * **BTC (pegged):** `0x2F4632ABAd26A1FF9212a76597fb3c3d8539E275`
  * **ETH (pegged):** `0x02D129c8A26839c814925eE0f1D320F63114E1FE`

> **Safety:** Always verify addresses on **GRXscan** and the **Official Channels** page before interacting.

#### Prerequisites

* **Gas token:** GRX in your wallet for fees (use **Testnet faucet** for test GRX).
* **Tooling:** Remix or Hardhat/Truffle + ethers.js/web3.js.
* **Contracts:** Solidity sources ready; prefer ERC-20/721/1155 standards where possible.

### Key steps for deployment

#### 1) Prepare your contracts

* Pin the **Solidity compiler** (e.g., `0.8.x` exact).
* Add tests; run static analysis and (optionally) fuzzing.

#### 2) Connect to GRX Chain

**Hardhat config (example):**

```js
// hardhat.config.js
export default {
  solidity: "0.8.24",
  networks: {
    grx: { url: "https://rpc.grxchain.io", chainId: 1110, accounts: [process.env.PRIVATE_KEY].filter(Boolean) },
    grxTestnet: { url: "https://testnet.grxchain.io", chainId: 2507, accounts: [process.env.PRIVATE_KEY].filter(Boolean) }
  }
}
```

**Remix:**\
Deploy & Run → Environment: “Injected Provider” (MetaMask) → Select GRX/Testnet → set constructor params → **Deploy**.

#### 3) Deploy

* **Testnet first:** run migration scripts; exercise all functions.
* **Mainnet:** when ready, deploy; GRX’s **ultra-low fees** keep even multi-contract deploys affordable.

#### 4) Verify on GRXscan

* Verify each contract on **grxscan.io** (exact compiler + constructor args).
* Link verified addresses in your release notes/changelog.

#### 5) Wire up your frontend

```js
import { ethers } from "ethers";
const provider = new ethers.JsonRpcProvider("https://rpc.grxchain.io");
const contract = new ethers.Contract("<ADDRESS>", <ABI>, provider);
// For writes: obtain a signer from the user's wallet in your app.
```

**Tip:** For ERC-20 flows (approvals, swaps), use **WGRX** and pair against pegged assets on **GRXswap**.

***

### One-Click “Add GRX Network” (MetaMask/Wallet)

```html
<button id="add-grx">Add GRX Mainnet</button>
<script>
  document.getElementById('add-grx').onclick = async () => {
    if (!window.ethereum) return alert('Please install MetaMask or a compatible wallet.');
    try {
      await window.ethereum.request({
        method: 'wallet_addEthereumChain',
        params: [{
          chainId: '0x456', // 1110
          chainName: 'GRX Chain',
          nativeCurrency: { name: 'GRX', symbol: 'GRX', decimals: 18 },
          rpcUrls: ['https://rpc.grxchain.io'],
          blockExplorerUrls: ['https://grxscan.io']
        }]
      });
    } catch (e) { console.error(e); alert('Unable to add network.'); }
  };
</script>
```

### MetaMask Chain Params (JSON)

**Mainnet**

```json
{
  "chainId": "0x456",
  "chainName": "GRX Chain",
  "nativeCurrency": { "name": "GRX", "symbol": "GRX", "decimals": 18 },
  "rpcUrls": ["https://rpc.grxchain.io"],
  "blockExplorerUrls": ["https://grxscan.io"]
}
```

**Testnet**

```json
{
  "chainId": "0x9CB",
  "chainName": "GRX Chain Testnet",
  "nativeCurrency": { "name": "tGRX", "symbol": "tGRX", "decimals": 18 },
  "rpcUrls": ["https://testnet.grxchain.io"],
  "blockExplorerUrls": ["https://testnet.grxscan.io"]
}
```

### Token listing (frontend) — WGRX defaults

* **Address:** `0x45C7287F897B3A79Cd3f6e4F14B4CE568f023bD5`
* **Symbol/Decimals:** `WGRX` / `18`\
  Always pull decimals from chain at runtime and verify on **GRXscan**.

### .env & .gitignore (prevent key leaks)

**.env.example**

```
PRIVATE_KEY=
GRX_RPC=https://rpc.grxchain.io
GRX_TESTNET_RPC=https://testnet.grxchain.io
GRXSCAN_API_KEY=
```

**.gitignore**

```
.env
.env.*
*.secret
```

### Verification quick guide (GRXscan)

1. Build with the **exact** compiler version used at deploy.
2. Provide multi-file sources or a flattened file per GRXscan form.
3. Include constructor args and optimisation settings.
4. Verify libraries at the same addresses used at deploy.
5. Link the verified address in your release notes/changelog.

### Frontend connect snippet (ethers v6)

```js
import { ethers } from "ethers";

export async function getSigner() {
  if (!window.ethereum) throw new Error('Wallet not found');
  await window.ethereum.request({ method: 'eth_requestAccounts' });
  const provider = new ethers.BrowserProvider(window.ethereum);
  const signer = await provider.getSigner();
  return { provider, signer };
}
```

### Best practices (quick checklist)

**Before mainnet**

* [ ] Tests pass (unit/integration); gas snapshots within budget
* [ ] Static analysis/fuzzing clean or reviewed
* [ ] Dry-run on **Testnet**; addresses recorded
* [ ] Multisig & timelock ready for admin/upgrade roles
* [ ] Audit completed or scheduled; critical issues resolved

**Launch day**

* [ ] Deploy & **verify** on GRXscan
* [ ] Transfer admin to **multisig**; timelock sensitive actions
* [ ] Publish: addresses, ABI links, audit report, known risks
* [ ] Set up dashboards & alerts (reverts, gas, role changes, liquidity)

**Post-launch**

* [ ] Monthly key/signer checks; quarterly dependency review
* [ ] Incident runbook pinned; postmortems published if needed
* [ ] Community AMA/office hours recap posted

### Troubleshooting (fast fixes)

* **Network not added:** Manually add RPC/Chain ID 1110 (Mainnet) or 2507 (Testnet).
* **Out of gas / high gas:** Query `eth_gasPrice`, add a buffer; avoid unbounded loops.
* **Token not visible:** Import by **contract address** (don’t rely on name search).
* **Verification failed:** Compiler or constructor args mismatch—rebuild with exact config.
* **Swaps failing:** Confirm Router address, allowances, and path; inspect reverts on **GRXscan**.

### Support matrix & turnaround

* **Docs/email:** `admingrovex@grovex.io` — initial acknowledgement within **2 business days** (AET).
* **Integration help:** best-effort scheduling for qualified ecosystem projects.
* **Security reports:** follow Security & Privacy → Responsible Disclosure.

### Governance & program hooks (reminders)

* **Proposals:** `https://proposal.grxchain.io` (idea → RFC → on-chain vote → timelock)
* **Staking/validators:** `https://staking.grxchain.io`
* **Listings/co-marketing:** email **<admingrovex@grovex.io>** with deck + repo + testnet demo

### Bridging note (safety)

* **Official bridge (current):** `https://grovex.io`\
  Do not endorse third-party bridges unless announced in Official Channels.

### Legal & safety footers

* Documentation is informational, not financial or legal advice.
* Verify **all** addresses on **GRXscan**; never share seed phrases or private keys.
* © GRXCHAIN Inc. (BVI). **GRX Chain** is owned/operated by GRXCHAIN Inc. (BVI). **GroveX** is operated by GroveX Pty Ltd (AU).


---

# 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.grxchain.io/3.2-launching-your-first-project.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.
