# ALL Mainnet Token List - Complete Submission Guide

**Date**: 2026-01-26  
**Network**: ALL Mainnet (ChainID 651940)  
**Explorer**: https://alltra.global/tokens  
**Status**: Ready for token data extraction and submission

---

## 📋 Current Status

✅ **Framework Created**:
- Token list template file created
- Extraction scripts ready
- Validation script supports ChainID 651940
- Documentation complete

⚠️ **Action Required**: Extract actual token data from explorer

---

## 🔍 Step 1: Extract Token Data

### Option A: Manual Extraction from Explorer

1. **Visit**: https://alltra.global/tokens
2. **For each token listed**:
   - Click on token to view details
   - Copy contract address
   - Note token name, symbol, decimals
   - Verify contract is verified

### Option B: Use Extraction Script

If you have token addresses:

```bash
cd /home/intlc/projects/proxmox
node token-lists/scripts/extract-tokens-from-explorer.js <address1> <address2> ...
```

This will query the RPC and return token metadata in JSON format.

### Option C: Query RPC Directly

```bash
RPC_URL="https://mainnet-rpc.alltra.global"

# For each token address
cast call <TOKEN_ADDRESS> "symbol()(string)" --rpc-url $RPC_URL
cast call <TOKEN_ADDRESS> "name()(string)" --rpc-url $RPC_URL
cast call <TOKEN_ADDRESS> "decimals()(uint8)" --rpc-url $RPC_URL
```

---

## 📝 Step 2: Update Token List File

Once you have token data, update:

**File**: `token-lists/lists/all-mainnet.tokenlist.json`

**Remove placeholder entry** and add actual tokens:

```json
{
  "name": "ALL Mainnet Token List",
  "version": {
    "major": 1,
    "minor": 0,
    "patch": 0
  },
  "timestamp": "2026-01-26T00:00:00.000Z",
  "logoURI": "https://raw.githubusercontent.com/ethereum/ethereum.org/main/static/images/eth-diamond-black.png",
  "keywords": [
    "all",
    "alltra",
    "mainnet",
    "stablecoin"
  ],
  "tokens": [
    {
      "chainId": 651940,
      "address": "0x...", // Actual address from explorer
      "name": "Token Name", // Actual name
      "symbol": "SYMBOL", // Actual symbol
      "decimals": 18, // Actual decimals
      "logoURI": "https://...", // Logo URL if available
      "tags": ["defi"] // Appropriate tags
    }
    // Add more tokens here
  ],
  "tags": {
    "stablecoin": {
      "name": "Stablecoin",
      "description": "Stable value tokens pegged to fiat currencies"
    },
    "defi": {
      "name": "DeFi",
      "description": "Decentralized Finance tokens"
    }
  }
}
```

---

## ✅ Step 3: Validate Token List

**Note**: The Uniswap schema requires at least 1 token. The template file has an empty array and will fail validation until tokens are added.

Once you add at least one token:

```bash
cd /home/intlc/projects/proxmox
node token-lists/scripts/validate-token-list.js token-lists/lists/all-mainnet.tokenlist.json --chain-id=651940
```

**Expected Output** (after adding tokens):
```
✅ Token list is valid!
📋 Token List Info:
   Name: ALL Mainnet Token List
   Version: 1.0.0
   Tokens: X
```

---

## 🔗 Step 4: Verify On-Chain (Optional)

If RPC is accessible:

```bash
node token-lists/scripts/verify-on-chain.js token-lists/lists/all-mainnet.tokenlist.json
```

**Note**: This requires RPC access. If RPC is not accessible, skip this step.

---

## 📤 Step 5: Prepare for Submission

### 5.1 Update Version and Timestamp

Ensure version and timestamp are current:

```json
{
  "version": {
    "major": 1,
    "minor": 0,
    "patch": 0
  },
  "timestamp": "2026-01-26T00:00:00.000Z"
}
```

### 5.2 Sign Token List (Optional)

```bash
cd token-lists
./scripts/sign-list.sh sign lists/all-mainnet.tokenlist.json
```

### 5.3 Create Release

```bash
cd token-lists
./scripts/release.sh patch  # or minor/major
```

---

## 🌐 Step 6: Host Token List

### Option A: GitHub Pages

1. Enable GitHub Pages in repository settings
2. Token list accessible at:
   ```
   https://{username}.github.io/{repo}/token-lists/lists/all-mainnet.tokenlist.json
   ```

### Option B: GitHub Raw URL

```
https://raw.githubusercontent.com/{username}/{repo}/main/token-lists/lists/all-mainnet.tokenlist.json
```

### Option C: Custom Domain

If you have a domain:
```
https://tokens.d-bis.org/lists/all-mainnet.tokenlist.json
```

**CORS Configuration Required**:
```nginx
location /lists/all-mainnet.tokenlist.json {
    add_header Access-Control-Allow-Origin *;
    add_header Access-Control-Allow-Methods "GET, OPTIONS";
    add_header Content-Type application/json;
}
```

---

## 📋 Step 7: Submit to Registries

### Uniswap Token Lists

1. Fork: https://github.com/Uniswap/token-lists
2. Add your token list
3. Submit Pull Request
4. Follow their guidelines

### MetaMask Token Lists

1. Add token list URL in MetaMask Settings
2. Or submit to MetaMask's registry

### Chainlist

1. Update chain configuration to reference token list URL
2. Submit chain configuration update

---

## ✅ Validation Checklist

Before submission, verify:

- [ ] All addresses are EIP-55 checksummed
- [ ] All chain IDs are 651940
- [ ] All decimals are correct
- [ ] All symbols match on-chain values
- [ ] All names match on-chain values
- [ ] Logo URLs are accessible (if provided)
- [ ] Tags are appropriate and defined
- [ ] Version follows semantic versioning
- [ ] Timestamp is current
- [ ] JSON structure is valid
- [ ] Token list validates successfully

---

## 🛠️ Tools Available

1. **Extraction Script**: `token-lists/scripts/extract-tokens-from-explorer.js`
   - Queries RPC for token metadata
   - Outputs JSON format

2. **Validation Script**: `token-lists/scripts/validate-token-list.js`
   - Validates against Uniswap schema
   - Checks EIP-55 checksums
   - Validates chain IDs

3. **On-Chain Verification**: `token-lists/scripts/verify-on-chain.js`
   - Verifies tokens exist on-chain
   - Checks decimals, symbol, name match

4. **Query Script**: `token-lists/scripts/query-all-mainnet-tokens.sh`
   - Helper script for RPC queries

---

## 📚 Documentation

- **Extraction Guide**: `token-lists/ALL_MAINNET_TOKEN_EXTRACTION_GUIDE.md`
- **Submission Notes**: `token-lists/ALL_MAINNET_TOKEN_SUBMISSION_NOTES.md`
- **Token List Template**: `token-lists/lists/all-mainnet.tokenlist.json`

---

## 🎯 Quick Start

1. **Get token addresses** from https://alltra.global/tokens
2. **Extract metadata**:
   ```bash
   node token-lists/scripts/extract-tokens-from-explorer.js <address1> <address2>
   ```
3. **Update token list file** with extracted data
4. **Validate**:
   ```bash
   node token-lists/scripts/validate-token-list.js token-lists/lists/all-mainnet.tokenlist.json --chain-id=651940
   ```
5. **Submit** to registries

---

**Last Updated**: 2026-01-26
