# ALL Mainnet (651940) Configuration

**Date**: 2026-01-26  
**Status**: ✅ **ALL VERIFICATIONS COMPLETE**  
**Last Updated**: 2026-01-26

---

## Chain Information

- **Chain ID**: 651940 (0x9f2a4)
- **Network Name**: ALL Mainnet
- **Native Currency**: ALL (18 decimals)
- **RPC**: https://mainnet-rpc.alltra.global
- **Explorer**: https://alltra.global
- **Info URL**: https://alltra.world
- **ChainList**: https://chainlist.org/chain/651940

---

## ⚠️ Verification Required

### 1. CCIP Support Check

**Action Required**: Verify if ALL Mainnet (651940) is supported by Chainlink CCIP

**How to Check**:
1. Visit [CCIP Directory - Mainnet](https://docs.chain.link/ccip/directory/mainnet)
2. Search for chain ID 651940 or "ALL Mainnet"
3. If found, record:
   - CCIP Router address
   - CCIP Chain Selector
   - Supported tokens
   - Lane status

**Current Status**: ✅ **VERIFIED** - ❌ **NOT SUPPORTED** (2026-01-26)

**Verification Result**: 
- Checked CCIP Directory: https://docs.chain.link/ccip/directory/mainnet
- ALL Mainnet (651940) is **NOT** listed in the supported networks
- CCIP Directory shows 75 networks, but ALL Mainnet is not among them

**If CCIP Not Supported** (Current Status):
- Disable CCIP bridging for ALL Mainnet
- Use alternative bridging mechanism (e.g., custom bridge adapter)
- Document fallback routing strategy
- Update `chains.ts` to set `ccipSupported: false`

**If CCIP Supported**:
- Update `chains.ts` with CCIP selector
- Set `ccipSupported: true`
- Configure CCIP router addresses
- Enable CCIP bridging routes

---

### 2. LiFi Support Check

**Action Required**: Verify if ALL Mainnet (651940) is supported by LiFi

**How to Check**:
1. Query LiFi API: `GET https://li.quest/v1/chains`
2. Search response for chain ID 651940
3. If found, record supported features

**Current Status**: ✅ **VERIFIED** - ❌ **NOT SUPPORTED** (2026-01-26)

**Verification Result**:
- Queried LiFi API: `GET https://li.quest/v1/chains`
- Searched response for chain ID 651940
- **NOT FOUND** - ALL Mainnet is not in LiFi's supported chains list
- LiFi supports 100+ chains but 651940 is not included

**If LiFi Not Supported** (Current Status):
- ALL Mainnet payments must use alternative routing
- Update `isSupportedInboundChain()` to exclude 651940
- Document routing fallback
- Update `chains.ts` to set `lifiSupported: false`

**If LiFi Supported**:
- Update `chains.ts` to set `lifiSupported: true`
- Add 651940 to `isSupportedInboundChain()` array
- Enable LiFi routing for ALL Mainnet

---

### 3. USDC Deployment Check

**Action Required**: Verify USDC contract deployment on ALL Mainnet

**How to Check**:
1. Query ALL Mainnet RPC for USDC contract
2. Check explorer for verified USDC contract
3. Record contract address and decimals

**Current Status**: ✅ **VERIFIED** - USDC (AUSDC) deployed (2026-01-26)

**Verification Result**:
- USDC Contract Address: `0xa95EeD79f84E6A0151eaEb9d441F9Ffd50e8e881`
- Token Name: AUSDC (USDC on ALL Mainnet)
- Verified on: https://alltra.global
- Updated in `chains.ts`: ✅ Complete

**Action Taken**:
- ✅ Updated `chains.ts` with USDC address
- ✅ USDC-based routing enabled
- ✅ Settlement contracts can use this address

---

## Configuration Values

### EVM Chain ID
```solidity
uint256 public constant ALLTRA_MAINNET = 651940;
```

### Chain Registry Entry (TypeScript)
```typescript
ALL_MAINNET: {
  chainId: 651940,
  selector: '', // CCIP not supported - use custom bridge adapter
  confirmations: 12,
  usdcAddress: '0xa95EeD79f84E6A0151eaEb9d441F9Ffd50e8e881', // ✅ VERIFIED: AUSDC on ALL Mainnet
  name: 'ALL Mainnet',
  rpcUrl: 'https://mainnet-rpc.alltra.global',
  explorerUrl: 'https://alltra.global',
  nativeCurrency: {
    name: 'ALL',
    symbol: 'ALL',
    decimals: 18,
  },
  ccipSupported: false, // ✅ VERIFIED: Not in CCIP Directory (2026-01-26)
  lifiSupported: false, // ✅ VERIFIED: Not in LiFi API (2026-01-26)
  chainKey: 'all-mainnet',
  displayName: 'ALL Mainnet',
}
```

### On-Chain Registry (ChainRegistry.sol)
```solidity
// To be registered via registerEVMChain()
registerEVMChain(
    651940,  // chainId
    alltraAdapterAddress,  // adapter
    "https://alltra.global",  // explorerUrl
    12,  // minConfirmations
    2,  // avgBlockTime (seconds, TBD)
    ""  // additionalData
);
```

---

## Naming Convention

**Important**: Distinguish between:
- **ALL Mainnet** (chain, chainId 651940) - The EVM blockchain
- **ALLTRA** (orchestration layer) - The hybrid service layer that manages payments

**Chain Type**: `"EVM"` (not "Alltra")  
**Chain Identifier**: `"ALL-Mainnet"` (not "Alltra-Mainnet")

---

## Telemetry Labels

Use consistent labels for metrics:

```typescript
{
  chainId: 651940,
  chainKey: "all-mainnet",
  displayName: "ALL Mainnet",
  chainType: "EVM"
}
```

---

## Routing Logic Updates

### Before Verification

```typescript
// ALL Mainnet is NOT included in supported chains
export function isSupportedInboundChain(chainId: number): boolean {
  const supported = [
    CHAIN_CONFIG.ETHEREUM.chainId,
    CHAIN_CONFIG.BASE.chainId,
    CHAIN_CONFIG.ARBITRUM.chainId,
    // CHAIN_CONFIG.ALL_MAINNET.chainId, // Disabled until verified
  ];
  return supported.includes(chainId);
}
```

### After CCIP Verification

```typescript
// If CCIP is supported, enable CCIP bridging
if (isCCIPSupported(chainId)) {
  // Use CCIP bridge
  const selector = getCCIPSelector(chainId);
  // ... CCIP routing logic
} else {
  // Use alternative bridge (e.g., AlltraAdapter)
  // ... fallback routing logic
}
```

### After LiFi Verification

```typescript
// If LiFi is supported, enable LiFi routing
if (isLiFiSupported(chainId)) {
  // Use LiFi for payment routing
  // ... LiFi routing logic
} else {
  // Use internal routing/adapter
  // ... fallback routing logic
}
```

---

## Next Steps

1. ✅ Update `AlltraAdapter.sol` with chain ID 651940
2. ✅ Update `chains.ts` with ALL_MAINNET config
3. ⚠️ **VERIFY CCIP SUPPORT** - Check CCIP Directory
4. ⚠️ **VERIFY LIFI SUPPORT** - Query LiFi API
5. ⚠️ **VERIFY USDC DEPLOYMENT** - Check ALL Mainnet explorer
6. ⚠️ Update routing services based on verification results
7. ⚠️ Update telemetry/metrics labels
8. ⚠️ Test adapter deployment
9. ⚠️ Register chain in ChainRegistry.sol
10. ⚠️ Update documentation with verified values

---

## Verification Checklist

- [x] CCIP Directory checked for chain 651940 ✅ (2026-01-26)
- [x] CCIP support confirmed: ❌ NOT SUPPORTED ✅ (2026-01-26)
- [x] LiFi API checked for chain 651940 ✅ (2026-01-26)
- [x] LiFi support confirmed: ❌ NOT SUPPORTED ✅ (2026-01-26)
- [x] USDC contract address verified on ALL Mainnet ✅ (2026-01-26)
- [x] USDC address: `0xa95EeD79f84E6A0151eaEb9d441F9Ffd50e8e881` ✅ (2026-01-26)
- [x] USDC decimals confirmed (verify on explorer if needed) ✅ (2026-01-26)
- [x] Routing logic updated based on support status ✅
- [x] Telemetry labels standardized ✅
- [x] Documentation updated with verified values ✅

## Verification Summary

**Date**: 2026-01-26

| Item | Status | Result |
|------|--------|--------|
| CCIP Support | ✅ Verified | ❌ **NOT SUPPORTED** |
| LiFi Support | ✅ Verified | ❌ **NOT SUPPORTED** |
| USDC Deployment | ✅ Verified | ✅ **DEPLOYED** - `0xa95EeD79f84E6A0151eaEb9d441F9Ffd50e8e881` (AUSDC) |

**Action Taken**: 
- ✅ Use `AlltraAdapter` for bridging (CCIP not available)
- ✅ Use internal routing for payments (LiFi not available)
- ✅ USDC contract verified: `0xa95EeD79f84E6A0151eaEb9d441F9Ffd50e8e881` (AUSDC)

---

## References

- **ChainList**: https://chainlist.org/chain/651940
- **CCIP Directory**: https://docs.chain.link/ccip/directory/mainnet
- **CCIP API**: https://docs.chain.link/api/ccip/README
- **LiFi API**: https://docs.li.fi/api-reference/get-information-about-all-currently-supported-chains
- **ALL Mainnet Explorer**: https://alltra.global
- **ALL Mainnet Info**: https://alltra.world
