> ## Documentation Index
> Fetch the complete documentation index at: https://jephalabs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# RPC Defaults

> Curated PublicNode endpoints shipped for QTG quickstart evaluation.

# RPC Defaults

QTG ships a curated PublicNode-based default RPC endpoint table so a fresh
quickstart can talk to the EVM lanes without operator setup. Per-chain entries
in `MG_EVM_RPC_ENDPOINTS_JSON` always win; defaults fill the gaps.

## Knobs

| Variable                    | Default | Purpose                                                                                                |
| --------------------------- | ------- | ------------------------------------------------------------------------------------------------------ |
| `MG_EVM_RPC_USE_DEFAULTS`   | `true`  | When `false`, the default table is ignored entirely. Set this in air-gapped or regulated environments. |
| `MG_EVM_RPC_ENDPOINTS_JSON` | `{}`    | Per-chain override. Keys are decimal-string chain ids. Values are URLs or list-of-URLs.                |

## Override patterns

Override a single chain (Alchemy mainnet) while keeping defaults for the rest:

```bash theme={null}
MG_EVM_RPC_ENDPOINTS_JSON='{"1":"https://eth-mainnet.g.alchemy.com/v2/<key>"}'
```

Failover via list:

```bash theme={null}
MG_EVM_RPC_ENDPOINTS_JSON='{"1":["https://primary","https://fallback"]}'
```

Disable all defaults:

```bash theme={null}
MG_EVM_RPC_USE_DEFAULTS=false
MG_EVM_RPC_ENDPOINTS_JSON='{"1":"https://your-rpc"}'
```

## Empty / null entries

`{"8453": []}` and `{"8453": null}` are treated as **unregistered** — the
default URL fills the gap. There is no per-chain "no endpoint" sentinel. To
block defaults for one chain, use the global `MG_EVM_RPC_USE_DEFAULTS=false`
switch and provide only the chains you want.

## CCIP path is excluded

CCIP uses `chain_selector` (a CCIP-specific identifier) as its primary key, not
`chain_id`. The shipped default table is keyed by `chain_id`, so CCIP lanes do
not benefit. CCIP operators must explicitly populate
`MG_CCIP_EVM_RPC_ENDPOINTS_JSON` with chain\_selector keys.

## Live broadcast tools

Live preflight / drill / e2e CLI tools (`gateway_live_preflight`,
`gateway_live_e2e`, `cctp_live_preflight`, `agent_wallet_topup_preflight`,
`agent_wallet_topup_stage3_live`, `run_stargate_send_drill`) force
`use_defaults=False` internally. They never use PublicNode defaults, even if
`MG_EVM_RPC_USE_DEFAULTS=true`. The operator must provide explicit, production-
grade RPC URLs before running these tools — PublicNode rate-limits could break
a live broadcast mid-flight.

## Shipped chains

The authoritative list lives in
[`src/qtg/infrastructure/rpc/defaults.py`](https://github.com/jephalabs/quant-transfer-guard/blob/main/src/qtg/infrastructure/rpc/defaults.py).
Mainnet and testnet entries are intermixed; the file docstring documents
provenance and maintainer instructions.

## Reliability boundary

PublicNode endpoints are rate-limited and free. They are intended for
evaluation. Production deployments should switch to a paid provider per chain
(Alchemy, Infura, QuickNode, or self-hosted) before sending live transfers.
