> For the complete documentation index, see [llms.txt](https://docs.t-rex.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.t-rex.network/developers/networks.md).

# Networks

***

This page lists the T-REX network environments and everything you need to point a wallet or developer tooling at them.

The current live environment is **InGen**, the public testnet of the **T-REX Ledger**, the reference chain and golden source of T-REX Network. Mainnet endpoints will be published here once available.

> ⚠️ **InGen is a test network.** TREX on InGen is a test token with no monetary value, and network state may be reset at any time. Do not use it for production assets or data you cannot afford to lose.

### InGen testnet

InGen is a Polygon CDK chain running the OP Stack execution client (op-geth), connected to the AggLayer. It is public and permissionless, with a \~1 second block time. It settles to Ethereum sepolia and interoperates with other ecosystems through the AggLayer.

#### Connection details

| Parameter         | Value                                                |
| ----------------- | ---------------------------------------------------- |
| Network name      | T-REX InGen Testnet                                  |
| RPC URL           | `https://rpc.ingen.t-rex.network`                    |
| Chain ID          | `364301` (`0x58F0D`)                                 |
| Currency symbol   | `TREX`                                               |
| Currency decimals | `18`                                                 |
| Block explorer    | `https://explorer.ingen.t-rex.network/`              |
| Block time        | \~1 second                                           |
| Stack             | Polygon CDK + OP Stack (op-geth), AggLayer-connected |
| Access            | Public, permissionless                               |

#### Add InGen to your wallet

**Manually (MetaMask and most EVM wallets):** open the network selector, choose *Add a custom network*, and enter the values from the table above.

**Programmatically** via [EIP-3085](https://eips.ethereum.org/EIPS/eip-3085):

```js
await window.ethereum.request({
  method: 'wallet_addEthereumChain',
  params: [{
    chainId: '0x58F0D', // 364301
    chainName: 'T-REX InGen Testnet',
    nativeCurrency: { name: 'TREX', symbol: 'TREX', decimals: 18 },
    rpcUrls: ['https://rpc.ingen.t-rex.network'],
    blockExplorerUrls: ['https://explorer.ingen.t-rex.network'],
  }],
});
```

#### Connect with developer tooling

**viem**

```ts
import { defineChain } from 'viem';

export const ingen = defineChain({
  id: 364301,
  name: 'T-REX InGen Testnet',
  nativeCurrency: { name: 'TREX', symbol: 'TREX', decimals: 18 },
  rpcUrls: {
    default: { http: ['https://rpc.ingen.t-rex.network'] },
  },
  blockExplorers: {
    default: {
      name: 'InGen Explorer',
      url: 'https://explorer.ingen.t-rex.network',
    },
  },
  testnet: true,
});
```

**ethers**

```ts
import { JsonRpcProvider } from 'ethers';

const provider = new JsonRpcProvider('https://rpc.ingen.t-rex.network', {
  chainId: 364301,
  name: 't-rex-ingen',
});
```

**Hardhat**

```ts
// hardhat.config.ts
networks: {
  ingen: {
    url: 'https://rpc.ingen.t-rex.network',
    chainId: 364301,
    // accounts: [process.env.PRIVATE_KEY!],
  },
},
```

**Foundry**

```toml
# foundry.toml
[rpc_endpoints]
ingen = "https://rpc.ingen.t-rex.network"
```

```bash
cast block-number --rpc-url https://rpc.ingen.t-rex.network
forge script script/Deploy.s.sol --rpc-url ingen --broadcast
```

#### Block explorer

Browse blocks, transactions, addresses and verified contracts at [explorer.ingen.t-rex.network](https://explorer.ingen.t-rex.network/).

#### Test TREX

You need test TREX to pay for gas on InGen. Get it from the faucet at [faucet-ingen.t-rex.network](https://faucet-ingen.t-rex.network/).

The faucet dispenses **0.1 TREX per request, once every hour** per address.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.t-rex.network/developers/networks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
