Co-authored-by:
This commit is contained in:
@@ -37,7 +37,7 @@ Single checklist for **fixes**, **testing**, and **deployment** (required and op
|
||||
|------|-------------|
|
||||
| Restore DODOPMMIntegration.t.sol test | **DONE.** Test restored; fixed `vm.mockCall(dvm, bytes(""), ...)` and removed redundant grantRole. |
|
||||
| Restore MultiChainBridge.t.sol | **DONE.** Restored; MockCCIPRouter, cancel-bridge flow, XDC convertXdcToEth fix, XRPL recipientData; 8/8 tests pass. |
|
||||
| WETH9 decimals display | **Documented:** WETH9 `decimals()` returns 0 on-chain, so MetaMask can show e.g. "6,000,000,000.0T WETH" instead of "6 WETH". Workaround: use token list with decimals 18 (e.g. `metamask-integration/docs/METAMASK_TOKEN_LIST.json`) or manual token import with decimals 18. Host token list for auto-discovery. See [PHASE4_POST_DEPLOYMENT_TESTING.md](deployment/PHASE4_POST_DEPLOYMENT_TESTING.md) §4.3. |
|
||||
| WETH9 decimals display | **Documented:** WETH9 `decimals()` returns 0 on-chain, so MetaMask can show e.g. "6,000,000,000.0T WETH" instead of "6 WETH". Workaround: use token list with decimals 18 (e.g. `~/projects/metamask-integration/docs/METAMASK_TOKEN_LIST.json`) or manual token import with decimals 18. Host token list for auto-discovery. See [PHASE4_POST_DEPLOYMENT_TESTING.md](deployment/PHASE4_POST_DEPLOYMENT_TESTING.md) §4.3. |
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ This is the **master index** of all project documentation. Use this as your star
|
||||
- **[METAMASK_BD.md](operations/integrations/METAMASK_BD.md)** - MetaMask integration details
|
||||
- **[Crypto.com OTC Integration](../../dbis_core/src/core/exchange/crypto-com-otc/README.md)** - Crypto.com OTC 2.0 API for institutional trading (DBIS Core)
|
||||
- **[Exchange Registry](../../dbis_core/src/core/exchange/)** - Multi-exchange price API (Binance, Kraken, Oanda, FXCM)
|
||||
- **[Ramp API](../../metamask-integration/src/ramps/)** - Fiat on/off-ramp session API (MoonPay, Ramp, Onramper, etc.)
|
||||
- **[Ramp API](~/projects/metamask-integration/src/ramps/)** - Fiat on/off-ramp session API (MoonPay, Ramp, Onramper, etc.)
|
||||
- **[DeFi Router](../../alltra-lifi-settlement/src/payments/)** - 1inch, ParaSwap, 0x DEX aggregator
|
||||
|
||||
---
|
||||
|
||||
@@ -105,7 +105,7 @@ All deployed contracts use the same admin address, providing consistent access c
|
||||
|
||||
**Solution**: Host token list publicly for automatic discovery.
|
||||
|
||||
**Token List**: `metamask-integration/docs/METAMASK_TOKEN_LIST.json` contains correct decimals.
|
||||
**Token List**: `~/projects/metamask-integration/docs/METAMASK_TOKEN_LIST.json` contains correct decimals.
|
||||
|
||||
### 2. ChainID 138 RPC Access
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
9. Test multiple destinations (if configured)
|
||||
10. Document test results
|
||||
|
||||
**Test Script Available**: `explorer-monorepo/scripts/test-end-to-end-bridge.sh`
|
||||
**Test Script Available**: `~/projects/explorer-monorepo/scripts/test-end-to-end-bridge.sh`
|
||||
|
||||
**Dependencies**: ChainID 138 RPC access, Mainnet RPC access, funded wallets
|
||||
**Output**: Cross-chain test report
|
||||
@@ -195,7 +195,7 @@
|
||||
**Description**: Host MetaMask token list publicly for automatic token discovery.
|
||||
|
||||
**Steps**:
|
||||
1. Review token list: `metamask-integration/docs/METAMASK_TOKEN_LIST.json`
|
||||
1. Review token list: `~/projects/metamask-integration/docs/METAMASK_TOKEN_LIST.json`
|
||||
2. Validate token list format and contents
|
||||
3. Choose hosting option:
|
||||
- Option A: GitHub Pages (free, easy)
|
||||
|
||||
@@ -101,7 +101,7 @@ forge verify-contract --chain-id 1 \
|
||||
|
||||
**Status**: ⚠️ **BLOCKS AUTOMATIC WALLET INTEGRATION**
|
||||
|
||||
**Gap**: Token list exists (`metamask-integration/docs/METAMASK_TOKEN_LIST.json`) but not hosted publicly.
|
||||
**Gap**: Token list exists (`~/projects/metamask-integration/docs/METAMASK_TOKEN_LIST.json`) but not hosted publicly.
|
||||
|
||||
**Impact**:
|
||||
- MetaMask cannot automatically discover tokens
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
- ✅ Decimals: 18
|
||||
- ✅ Type: ERC20 (MockLinkToken implementation)
|
||||
|
||||
**Documentation**: Matches successful deployment documented in `explorer-monorepo/docs/LINK_TOKEN_DEPLOYMENT_SUCCESS.md`
|
||||
**Documentation**: Matches successful deployment documented in `~/projects/explorer-monorepo/docs/LINK_TOKEN_DEPLOYMENT_SUCCESS.md`
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
6. Verify tokens received on ChainID 138
|
||||
|
||||
**Existing Test Scripts Available**:
|
||||
- `explorer-monorepo/scripts/test-end-to-end-bridge.sh` - E2E bridge test
|
||||
- `~/projects/explorer-monorepo/scripts/test-end-to-end-bridge.sh` - E2E bridge test
|
||||
- `scripts/test-bridge-transfers.sh` - Bridge transfer test
|
||||
- `scripts/test-bridge-all-7-networks.sh` - Multi-chain test
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
- Manual token import with correct decimals works as workaround
|
||||
|
||||
**Token Lists Available**:
|
||||
- `metamask-integration/docs/METAMASK_TOKEN_LIST.json` - Token list with WETH9/WETH10
|
||||
- `~/projects/metamask-integration/docs/METAMASK_TOKEN_LIST.json` - Token list with WETH9/WETH10
|
||||
- Contains correct decimals (18) to fix display issue
|
||||
|
||||
**Action Required**:
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
✅ **Token list validated and ready for hosting.**
|
||||
|
||||
Token list file exists: `metamask-integration/docs/METAMASK_TOKEN_LIST.json`
|
||||
Token list file exists: `~/projects/metamask-integration/docs/METAMASK_TOKEN_LIST.json`
|
||||
|
||||
## Token List Contents
|
||||
|
||||
@@ -64,7 +64,7 @@ Token list file exists: `metamask-integration/docs/METAMASK_TOKEN_LIST.json`
|
||||
**Steps**:
|
||||
```bash
|
||||
# Copy token list to docs folder
|
||||
cp metamask-integration/docs/METAMASK_TOKEN_LIST.json docs/
|
||||
cp ~/projects/metamask-integration/docs/METAMASK_TOKEN_LIST.json docs/
|
||||
|
||||
# Commit and push
|
||||
git add docs/METAMASK_TOKEN_LIST.json
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
**Completed**: 2025-01-18
|
||||
|
||||
**Actions Taken**:
|
||||
1. Validated token list format: `metamask-integration/docs/METAMASK_TOKEN_LIST.json`
|
||||
1. Validated token list format: `~/projects/metamask-integration/docs/METAMASK_TOKEN_LIST.json`
|
||||
2. Verified token entries include correct decimals (18 for WETH9/WETH10)
|
||||
3. Created hosting guide in task documentation
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
**Next Steps**: Host token list at public URL (GitHub Pages, IPFS, or CDN) and register with MetaMask.
|
||||
|
||||
**Documentation**: `metamask-integration/docs/METAMASK_TOKEN_LIST.json`
|
||||
**Documentation**: `~/projects/metamask-integration/docs/METAMASK_TOKEN_LIST.json`
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ cd "$PROJECT_ROOT"
|
||||
source "$PROJECT_ROOT/scripts/lib/forge-scope.sh"
|
||||
|
||||
# Load environment variables
|
||||
source "$PROJECT_ROOT/../explorer-monorepo/.env" 2>/dev/null || true
|
||||
source "$HOME/projects/explorer-monorepo/.env" 2>/dev/null || true
|
||||
|
||||
PRIVATE_KEY="${PRIVATE_KEY:-}"
|
||||
CCIP_ROUTER_ADDRESS="${CCIP_ROUTER_ADDRESS:-}"
|
||||
|
||||
@@ -41,8 +41,8 @@ The Token Aggregation Service has been extended with:
|
||||
|
||||
### Step 1: Database Migrations
|
||||
```bash
|
||||
psql $DATABASE_URL -f explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.up.sql
|
||||
psql $DATABASE_URL -f explorer-monorepo/backend/database/migrations/0012_admin_config_schema.up.sql
|
||||
psql $DATABASE_URL -f ~/projects/explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.up.sql
|
||||
psql $DATABASE_URL -f ~/projects/explorer-monorepo/backend/database/migrations/0012_admin_config_schema.up.sql
|
||||
```
|
||||
|
||||
### Step 2: Deploy to Proxmox
|
||||
|
||||
@@ -44,8 +44,8 @@ All components of the Token Aggregation Service have been successfully implement
|
||||
- ✅ `scripts/setup.sh` - Setup script
|
||||
|
||||
### Database Files
|
||||
- ✅ `explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.up.sql`
|
||||
- ✅ `explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.down.sql`
|
||||
- ✅ `~/projects/explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.up.sql`
|
||||
- ✅ `~/projects/explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.down.sql`
|
||||
|
||||
### Documentation Files
|
||||
- ✅ `README.md` - Main documentation
|
||||
|
||||
@@ -10,7 +10,7 @@ The Token Aggregation Service has been fully implemented according to the plan.
|
||||
## ✅ Completed Components
|
||||
|
||||
### 1. Database Schema
|
||||
- ✅ Migration file: `explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.up.sql`
|
||||
- ✅ Migration file: `~/projects/explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.up.sql`
|
||||
- ✅ Down migration: `0011_token_aggregation_schema.down.sql`
|
||||
- ✅ Tables created:
|
||||
- `token_market_data` - Market metrics per token
|
||||
@@ -87,7 +87,7 @@ The Token Aggregation Service has been fully implemented according to the plan.
|
||||
Run the migration in the explorer database:
|
||||
```bash
|
||||
# Navigate to explorer backend
|
||||
cd explorer-monorepo/backend
|
||||
cd ~/projects/explorer-monorepo/backend
|
||||
|
||||
# Run migration (method depends on your migration tool)
|
||||
# The migration file is at:
|
||||
|
||||
@@ -82,8 +82,8 @@ Ensure all frontend files listed above are created.
|
||||
|
||||
### 2. Run Database Migrations
|
||||
```bash
|
||||
psql $DATABASE_URL -f explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.up.sql
|
||||
psql $DATABASE_URL -f explorer-monorepo/backend/database/migrations/0012_admin_config_schema.up.sql
|
||||
psql $DATABASE_URL -f ~/projects/explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.up.sql
|
||||
psql $DATABASE_URL -f ~/projects/explorer-monorepo/backend/database/migrations/0012_admin_config_schema.up.sql
|
||||
```
|
||||
|
||||
### 3. Deploy to Proxmox
|
||||
|
||||
@@ -90,8 +90,8 @@ Run the migration in your database:
|
||||
|
||||
```bash
|
||||
# From your database host
|
||||
psql $DATABASE_URL -f explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.up.sql
|
||||
psql $DATABASE_URL -f explorer-monorepo/backend/database/migrations/0012_admin_config_schema.up.sql
|
||||
psql $DATABASE_URL -f ~/projects/explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.up.sql
|
||||
psql $DATABASE_URL -f ~/projects/explorer-monorepo/backend/database/migrations/0012_admin_config_schema.up.sql
|
||||
```
|
||||
|
||||
### Create Admin User
|
||||
|
||||
@@ -32,7 +32,7 @@ Use `https://rpc-http-pub.d-bis.org` only for external/public-only deployments.
|
||||
### 3. Run Database Migration
|
||||
```bash
|
||||
# Navigate to explorer backend and run migration
|
||||
cd ../../explorer-monorepo/backend
|
||||
cd ~/projects/explorer-monorepo/backend
|
||||
# Run migration 0011_token_aggregation_schema.up.sql
|
||||
```
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@ nano .env # Edit with your database URL and settings
|
||||
|
||||
Or manually:
|
||||
```bash
|
||||
psql $DATABASE_URL -f ../../explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.up.sql
|
||||
psql $DATABASE_URL -f ../../explorer-monorepo/backend/database/migrations/0012_admin_config_schema.up.sql
|
||||
psql $DATABASE_URL -f ~/projects/explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.up.sql
|
||||
psql $DATABASE_URL -f ~/projects/explorer-monorepo/backend/database/migrations/0012_admin_config_schema.up.sql
|
||||
```
|
||||
|
||||
### 3. Create Admin User
|
||||
|
||||
@@ -4,7 +4,7 @@ A comprehensive token aggregation service that indexes token info, volume, liqui
|
||||
|
||||
**REST API reference:** [docs/REST_API_REFERENCE.md](docs/REST_API_REFERENCE.md) — tokens, pools, prices, volume, OHLCV for dApps and MetaMask Snap discovery.
|
||||
|
||||
**Chain 138 Snap:** The MetaMask Chain 138 Snap (companion site at e.g. https://explorer.d-bis.org/snap/) calls this service for market data, swap quotes, and bridge routes. If the Snap is built with `GATSBY_SNAP_API_BASE_URL=https://explorer.d-bis.org`, then explorer.d-bis.org must serve this API (e.g. proxy `/api/v1/*` to this service). Otherwise build the Snap site with `GATSBY_SNAP_API_BASE_URL` set to this service’s public URL. See [metamask-integration/chain138-snap/docs/CHAIN138_SNAP_TROUBLESHOOTING.md](../../../metamask-integration/chain138-snap/docs/CHAIN138_SNAP_TROUBLESHOOTING.md). **CORS:** The service uses `cors()` (all origins allowed by default) so MetaMask Snap and browser clients can fetch token list and networks.
|
||||
**Chain 138 Snap:** The MetaMask Chain 138 Snap (companion site at e.g. https://explorer.d-bis.org/snap/) calls this service for market data, swap quotes, and bridge routes. If the Snap is built with `GATSBY_SNAP_API_BASE_URL=https://explorer.d-bis.org`, then explorer.d-bis.org must serve this API (e.g. proxy `/api/v1/*` to this service). Otherwise build the Snap site with `GATSBY_SNAP_API_BASE_URL` set to this service’s public URL. See [metamask-integration/chain138-snap/docs/CHAIN138_SNAP_TROUBLESHOOTING.md](~/projects/metamask-integration/chain138-snap/docs/CHAIN138_SNAP_TROUBLESHOOTING.md). **CORS:** The service uses `cors()` (all origins allowed by default) so MetaMask Snap and browser clients can fetch token list and networks.
|
||||
|
||||
## Features
|
||||
|
||||
@@ -97,7 +97,7 @@ The MetaMask Snap bridge dialog always shows the Trustless (Lockbox) route when
|
||||
5. Run database migrations:
|
||||
```bash
|
||||
# Ensure the migration has been run in the explorer database
|
||||
# Migration file: explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.up.sql
|
||||
# Migration file: ~/projects/explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.up.sql
|
||||
```
|
||||
|
||||
6. Build the project:
|
||||
|
||||
@@ -31,8 +31,8 @@ The Token Aggregation Service now includes a full-featured Control Panel and Pro
|
||||
### 1. Database Setup
|
||||
```bash
|
||||
# Run migrations
|
||||
psql $DATABASE_URL -f explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.up.sql
|
||||
psql $DATABASE_URL -f explorer-monorepo/backend/database/migrations/0012_admin_config_schema.up.sql
|
||||
psql $DATABASE_URL -f ~/projects/explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.up.sql
|
||||
psql $DATABASE_URL -f ~/projects/explorer-monorepo/backend/database/migrations/0012_admin_config_schema.up.sql
|
||||
```
|
||||
|
||||
### 2. Deploy to Proxmox
|
||||
|
||||
@@ -17,7 +17,7 @@ CREATE EXTENSION IF NOT EXISTS timescaledb;
|
||||
2. Run the migration from the explorer database:
|
||||
```bash
|
||||
# The migration file is located at:
|
||||
# explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.up.sql
|
||||
# ~/projects/explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.up.sql
|
||||
```
|
||||
|
||||
3. Verify tables were created:
|
||||
|
||||
@@ -7,7 +7,7 @@ set -euo pipefail
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
SERVICE_DIR="$SCRIPT_DIR/.."
|
||||
MIGRATIONS_DIR="$PROJECT_ROOT/explorer-monorepo/backend/database/migrations"
|
||||
MIGRATIONS_DIR="$HOME/projects/explorer-monorepo/backend/database/migrations"
|
||||
|
||||
echo "=========================================="
|
||||
echo "Token Aggregation Service - Complete Setup"
|
||||
|
||||
@@ -6,7 +6,7 @@ set -euo pipefail
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
SERVICE_DIR="$SCRIPT_DIR/.."
|
||||
MIGRATIONS_DIR="$PROJECT_ROOT/explorer-monorepo/backend/database/migrations"
|
||||
MIGRATIONS_DIR="$HOME/projects/explorer-monorepo/backend/database/migrations"
|
||||
|
||||
# Load environment
|
||||
if [[ -f "$SERVICE_DIR/.env" ]]; then
|
||||
|
||||
@@ -43,7 +43,7 @@ fi
|
||||
# Verify database migration
|
||||
echo "📊 Verifying database migration..."
|
||||
echo "⚠️ Please ensure migration 0011_token_aggregation_schema.up.sql has been run"
|
||||
echo " Location: explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.up.sql"
|
||||
echo " Location: ~/projects/explorer-monorepo/backend/database/migrations/0011_token_aggregation_schema.up.sql"
|
||||
|
||||
echo ""
|
||||
echo "✅ Setup complete!"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Router, Request, Response } from 'express';
|
||||
import fs from 'fs';
|
||||
import os from 'os';
|
||||
import path from 'path';
|
||||
import { getNetworks, getConfigByChain, API_VERSION, type NetworkEntry } from '../../config/networks';
|
||||
import { getCanonicalTokensByChain, getLogoUriForSpec, getTokenRegistryFamily } from '../../config/canonical-tokens';
|
||||
@@ -103,13 +104,8 @@ function resolveRuntimeNetworksPath(): string | null {
|
||||
const candidates = uniquePaths([
|
||||
process.env.NETWORKS_JSON_PATH,
|
||||
process.env.CONFIG_NETWORKS_JSON_PATH,
|
||||
path.resolve(process.cwd(), 'explorer-monorepo/backend/api/rest/config/metamask/DUAL_CHAIN_NETWORKS.json'),
|
||||
path.resolve(process.cwd(), '../explorer-monorepo/backend/api/rest/config/metamask/DUAL_CHAIN_NETWORKS.json'),
|
||||
path.resolve(process.cwd(), '../../explorer-monorepo/backend/api/rest/config/metamask/DUAL_CHAIN_NETWORKS.json'),
|
||||
path.resolve(process.cwd(), 'explorer-monorepo/backend/config/metamask/DUAL_CHAIN_NETWORKS.json'),
|
||||
path.resolve(process.cwd(), '../explorer-monorepo/backend/config/metamask/DUAL_CHAIN_NETWORKS.json'),
|
||||
path.resolve(process.cwd(), '../../explorer-monorepo/backend/config/metamask/DUAL_CHAIN_NETWORKS.json'),
|
||||
path.resolve(__dirname, '../../../../../../explorer-monorepo/backend/api/rest/config/metamask/DUAL_CHAIN_NETWORKS.json'),
|
||||
path.join(os.homedir(), 'projects/explorer-monorepo/backend/api/rest/config/metamask/DUAL_CHAIN_NETWORKS.json'),
|
||||
path.join(os.homedir(), 'projects/explorer-monorepo/backend/config/metamask/DUAL_CHAIN_NETWORKS.json')
|
||||
]);
|
||||
|
||||
for (const candidate of candidates) {
|
||||
|
||||
Reference in New Issue
Block a user