- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control. - Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities. - Created .gitmodules to include OpenZeppelin contracts as a submodule. - Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment. - Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks. - Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring. - Created scripts for resource import and usage validation across non-US regions. - Added tests for CCIP error handling and integration to ensure robust functionality. - Included various new files and directories for the orchestration portal and deployment scripts.
4.9 KiB
MetaMask Portfolio Compatibility for ChainID 138
Guide for MetaMask Portfolio compatibility with ChainID 138.
Current Status
ChainID 138 is not currently supported in MetaMask Portfolio's native features (Swaps, Bridge, Buy/Sell). However, read-only features (balances, token display) may work if token metadata is properly configured.
Portfolio Read-Only Features
Token Auto-Detection
MetaMask Portfolio can auto-detect tokens when they appear on 2+ reputable token lists. To enable auto-detection:
- Official Token List: Maintain an official token list for ChainID 138
- Token List Inclusion: Submit token list to reputable aggregators:
- CoinGecko Token Lists
- Uniswap Token Lists
- Other major DEX token lists
- Explorer Metadata: Ensure Blockscout returns standard ERC-20 metadata endpoints
Balance Visibility
Portfolio can display token balances if:
- Token metadata is available on token lists
- Explorer returns standard ERC-20 metadata
- Token contract implements standard ERC-20 interface
- Token balances are queryable via RPC
Token Symbols and Logos
Portfolio displays token symbols and logos from:
- Token lists (primary source)
- Explorer metadata (fallback)
- Contract metadata (if available)
CAIP-2 Identifier
ChainID 138 uses the CAIP-2 identifier: eip155:138
This identifier is used by:
- Portfolio for chain identification
- Token lists for chain-specific tokens
- Indexers for chain-specific data
Blockscout Integration
Required API Endpoints
Blockscout must provide these endpoints for Portfolio compatibility:
-
Token Metadata:
/api/v2/tokens/{address}- Returns: name, symbol, decimals, total_supply
-
Token Holders:
/api/v2/tokens/{address}/holders- Returns: list of token holders
-
Token Transfers:
/api/v2/tokens/{address}/transfers- Returns: token transfer history
CORS Configuration
Blockscout must allow CORS requests from Portfolio:
Access-Control-Allow-Origin: https://portfolio.metamask.io
Access-Control-Allow-Methods: GET, OPTIONS
Access-Control-Allow-Headers: Content-Type
Token Logo Serving
Token logos should be served from Blockscout or CDN:
- URL format:
https://explorer.d-bis.org/images/tokens/{address}.png - Fallback: Token logo from token list
- Standard: 512x512 PNG format
Token List Requirements
Official Token List
The official token list for ChainID 138 must:
- Follow Token Lists Schema: Use Uniswap Token Lists JSON schema
- Include All Tokens: Include all ecosystem tokens
- Provide Logos: Include logo URLs for all tokens
- Maintain Accuracy: Keep token metadata up to date
- Host Publicly: Host on public URL (HTTPS)
Token List Submission
Submit token list to:
- CoinGecko: For token discovery
- Uniswap: For DEX integration
- Other Aggregators: For wider reach
Limitations
Not Supported (Requires MetaMask Partnership)
- Swaps: In-wallet swap aggregator
- Bridge: Portfolio Bridge integration
- Buy/Sell: Fiat on/off-ramps
- Advanced Charts: Market data and charts
- Full Portfolio Features: Complete portfolio functionality
Supported (Read-Only)
- Token Balances: Display token balances
- Token Symbols: Display token symbols
- Token Logos: Display token logos
- Transaction History: View transaction history (via explorer)
- Account Overview: Basic account information
Testing Portfolio Compatibility
Checklist
- Token list is publicly accessible
- Token list follows Token Lists schema
- Token logos are accessible
- Blockscout API endpoints work
- CORS headers are configured
- Token metadata is accurate
- Token balances are queryable
- CAIP-2 identifier is used correctly
Test Steps
- Add Network: Add ChainID 138 to MetaMask
- Add Tokens: Add tokens to MetaMask
- Check Portfolio: Open MetaMask Portfolio
- Verify Balances: Check if token balances display
- Verify Symbols: Check if token symbols display
- Verify Logos: Check if token logos display
- Test Explorer: Verify explorer links work
Future Integration
Path to Full Support
To enable full Portfolio features:
- Business Development: Engage with Consensys for partnership
- Liquidity Requirements: Ensure sufficient liquidity for swaps
- Bridge Integration: Integrate with bridge providers
- On-Ramp Partners: Partner with fiat on/ramp providers
- Regulatory Compliance: Ensure regulatory compliance
Tracking
- Monitor MetaMask Portfolio updates
- Track network support announcements
- Engage with Consensys for integration
- Submit feature requests