Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands - CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround - CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check - NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere - MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates - LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference Co-authored-by: Cursor <cursoragent@cursor.com>
5.2 KiB
5.2 KiB
WETH9/WETH10 Decimals & Oracle Pricing - Fixes Complete ✅
Date: 2026-01-26
Status: ✅ ALL FIXES COMPLETE
✅ Summary
Both issues have been addressed:
- WETH9/WETH10 Decimals: ✅ FIXED - All token lists updated
- Oracle Pricing: ✅ DOCUMENTED - Complete setup guides created
🔧 Part 1: WETH9/WETH10 Decimals Fix
Issue
- WETH9 contract's
decimals()returns0instead of18 - Causes MetaMask to display incorrect balances
Solution Applied
✅ All token lists updated with explicit decimals: 18 for both WETH9 and WETH10
Files Verified
- ✅
metamask-integration/docs/METAMASK_TOKEN_LIST.json- WETH9: 18 decimals - ✅
docs/04-configuration/metamask/METAMASK_TOKEN_LIST.json- WETH9: 18 decimals - ✅
docs/04-configuration/metamask/METAMASK_TOKEN_LIST.tokenlist.json- WETH9: 18 decimals - ✅
token-lists/lists/dbis-138.tokenlist.json- WETH9: 18 decimals
All files are consistent and correct.
💰 Part 2: Oracle Pricing Configuration
Oracle Information
| Property | Value |
|---|---|
| Oracle Proxy | 0x3304b747e565a97ec8ac220b0b6a1f6ffdb837e6 |
| Oracle Aggregator | 0x99b3511a2d315a497c8112c1fdd8d508d4b1e506 |
| Price Feed | ETH/USD |
| Decimals | 8 |
| Update Frequency | 60 seconds |
Documentation Created
-
✅ Complete Fix Guide:
docs/04-configuration/metamask/FIX_WETH9_WETH10_DECIMALS_AND_ORACLE.md- Covers both decimals fix and oracle setup
-
✅ Oracle Setup Guide:
docs/04-configuration/metamask/ORACLE_PRICE_FEED_SETUP.md- Complete oracle configuration and integration
-
✅ Quick Reference:
docs/04-configuration/metamask/WETH_ORACLE_QUICK_REFERENCE.md- Quick lookup for common tasks
Important Limitation
⚠️ MetaMask does NOT automatically query oracle contracts for USD prices.
MetaMask uses:
- CoinGecko API (primary) - Requires token listing
- Token lists (limited support)
- Oracle contracts - NOT automatically queried
Solutions:
- For dApps: Query oracle directly and display USD values
- For native MetaMask: Submit tokens to CoinGecko
- For custom: Develop MetaMask extension (advanced)
📋 Action Items
Completed ✅
- All token lists updated with correct decimals
- Comprehensive fix guide created
- Oracle setup guide created
- Quick reference guide created
- Documentation verified and consistent
Pending Actions ⚠️
-
Host Token List (Recommended)
- Upload token list JSON to public URL
- Add to MetaMask token lists
- Enables automatic correct decimals for users
-
Verify Oracle Publisher Service
- Check VMID 3500 service status
- Verify prices updating every 60 seconds
- Test oracle contract queries
-
CoinGecko Listing (Optional, for native MetaMask USD)
- Submit tokens to CoinGecko
- Provide market data
- Wait for listing approval
🔍 Verification
Token List Verification
# Verify WETH9 decimals in all token lists
for file in \
metamask-integration/docs/METAMASK_TOKEN_LIST.json \
docs/04-configuration/metamask/METAMASK_TOKEN_LIST.json \
token-lists/lists/dbis-138.tokenlist.json; do
echo "Checking $file:"
jq '.tokens[] | select(.symbol == "WETH") | {symbol, decimals}' "$file"
done
# Expected output: All show decimals: 18
Oracle Verification
# Check oracle price
cast call 0x3304b747e565a97ec8ac220b0b6a1f6ffdb837e6 \
"latestRoundData()" \
--rpc-url https://rpc-http-pub.d-bis.org
📚 Documentation Index
Main Guides
-
Complete Fix Guide:
docs/04-configuration/metamask/FIX_WETH9_WETH10_DECIMALS_AND_ORACLE.md- Comprehensive guide covering both issues
-
Oracle Setup:
docs/04-configuration/metamask/ORACLE_PRICE_FEED_SETUP.md- Oracle configuration and integration
-
Quick Reference:
docs/04-configuration/metamask/WETH_ORACLE_QUICK_REFERENCE.md- Quick lookup guide
Related Documentation
- Token List Guide:
docs/11-references/TOKEN_LIST_AUTHORING_GUIDE.md - Oracle Integration:
metamask-integration/docs/METAMASK_ORACLE_INTEGRATION.md - Contract Addresses:
docs/11-references/CONTRACT_ADDRESSES_REFERENCE.md - cUSDT/cUSDC Fix:
docs/04-configuration/metamask/FIX_CUSDT_CUSDC_DECIMALS.md
✅ Status Summary
| Component | Status | Notes |
|---|---|---|
| WETH9 Decimals | ✅ Fixed | Token lists override contract |
| WETH10 Decimals | ✅ Correct | Contract returns 18 |
| Token Lists | ✅ Updated | All files consistent |
| Oracle Documentation | ✅ Complete | Setup guides created |
| Oracle Service | ⚠️ Verify | Check VMID 3500 status |
| CoinGecko Listing | ⚠️ Optional | For native MetaMask USD |
🎯 Next Steps
-
Immediate:
- Host token list on public URL
- Verify Oracle Publisher service
-
Short-term:
- Test oracle price updates
- Provide user instructions (if needed)
-
Long-term:
- Submit tokens to CoinGecko (optional)
- Develop custom MetaMask extension (advanced)
Last Updated: 2026-01-26
Status: ✅ Fixes complete, documentation ready