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.6 KiB
5.6 KiB
MetaMask Integration Submodule Guide
Date: $(date)
Submodule: metamask-integration
Repository: Defi-Oracle-Meta-Blockchain/metamask-integration
📋 Overview
The MetaMask integration has been set up as a git submodule to keep it as a separate, versioned repository while maintaining integration with the main project.
🔧 Submodule Setup
Current Configuration
The submodule is configured in .gitmodules:
[submodule "metamask-integration"]
path = metamask-integration
url = https://github.com/Defi-Oracle-Meta-Blockchain/metamask-integration.git
Location
- Path:
metamask-integration/ - Remote:
https://github.com/Defi-Oracle-Meta-Blockchain/metamask-integration.git - Branch:
main
📁 Submodule Structure
metamask-integration/
├── docs/ # Documentation
│ ├── METAMASK_QUICK_START_GUIDE.md
│ ├── METAMASK_TROUBLESHOOTING_GUIDE.md
│ ├── METAMASK_FULL_INTEGRATION_REQUIREMENTS.md
│ ├── METAMASK_ORACLE_INTEGRATION.md
│ ├── METAMASK_TOKEN_LIST_HOSTING.md
│ ├── METAMASK_WETH9_DISPLAY_BUG.md
│ ├── METAMASK_WETH9_FIX_INSTRUCTIONS.md
│ ├── METAMASK_INTEGRATION_COMPLETE.md
│ ├── METAMASK_NETWORK_CONFIG.json
│ └── METAMASK_TOKEN_LIST.json
├── scripts/ # Automation scripts
│ ├── setup-metamask-integration.sh
│ ├── test-metamask-integration.sh
│ └── host-token-list.sh
├── examples/ # Example dApps
│ ├── wallet-connect.html
│ └── metamask-price-feed.html
├── config/ # Configuration files
│ └── token-list.json
└── README.md
🚀 Working with the Submodule
Initial Clone (For New Users)
When cloning the main repository, include submodules:
# Clone with submodules
git clone --recurse-submodules https://github.com/your-org/proxmox.git
# Or if already cloned
git submodule update --init --recursive
Updating the Submodule
# Navigate to submodule
cd metamask-integration
# Pull latest changes
git pull origin main
# Return to parent repo
cd ..
# Commit submodule update
git add metamask-integration
git commit -m "Update MetaMask integration submodule"
Making Changes to Submodule
# Navigate to submodule
cd metamask-integration
# Make changes
# ... edit files ...
# Commit in submodule
git add .
git commit -m "Update MetaMask integration"
# Push to remote
git push origin main
# Return to parent repo and update reference
cd ..
git add metamask-integration
git commit -m "Update MetaMask integration submodule reference"
git push
Checking Submodule Status
# Check submodule status
git submodule status
# Check if submodule has uncommitted changes
cd metamask-integration
git status
📝 Submodule Commands Reference
Initialize Submodules
git submodule init
git submodule update
# Or combined:
git submodule update --init --recursive
Update Submodule to Latest
git submodule update --remote metamask-integration
Remove Submodule (if needed)
# Remove submodule entry
git submodule deinit metamask-integration
git rm metamask-integration
rm -rf .git/modules/metamask-integration
Sync Submodule URL (if remote changed)
git submodule sync metamask-integration
🔗 Accessing Files
From Parent Repository
Reference files in the submodule:
# Documentation
cat metamask-integration/docs/METAMASK_QUICK_START_GUIDE.md
# Scripts
bash metamask-integration/scripts/setup-metamask-integration.sh
# Examples
open metamask-integration/examples/metamask-price-feed.html
From Submodule Directory
Work directly in the submodule:
cd metamask-integration
# Now you're in the submodule repository
# All git commands work here
✅ Verification
Check Submodule is Configured
# Verify .gitmodules
cat .gitmodules | grep metamask-integration
# Verify submodule exists
ls -la metamask-integration/
# Check submodule status
git submodule status metamask-integration
Verify Remote Connection
cd metamask-integration
git remote -v
# Should show:
# origin https://github.com/Defi-Oracle-Meta-Blockchain/metamask-integration.git (fetch)
# origin https://github.com/Defi-Oracle-Meta-Blockchain/metamask-integration.git (push)
🎯 Benefits of Submodule
- Separation of Concerns: MetaMask integration is a separate, versioned project
- Reusability: Can be used in other projects
- Independent Updates: Update MetaMask integration without affecting main repo
- Version Control: Track specific versions of the integration
- Collaboration: Multiple projects can use the same integration
📚 Related Documentation
🔧 Troubleshooting
Submodule Shows as Modified
If git status shows the submodule as modified:
cd metamask-integration
git status
# Check for uncommitted changes or different commit
Submodule Not Initialized
git submodule update --init metamask-integration
Submodule Points to Wrong Commit
cd metamask-integration
git checkout main
git pull origin main
cd ..
git add metamask-integration
git commit -m "Update submodule to latest"
Last Updated: $(date)