Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
Co-authored-by: Cursor <cursoragent@cursor.com>
4.1 KiB
4.1 KiB
GitHub Pages Setup Instructions for MetaMask Token List
Date: $(date)
Repository: Defi-Oracle-Meta-Blockchain/metamask-integration
🎯 Goal
Enable GitHub Pages to host the MetaMask token list at a public URL so users can automatically discover tokens.
📋 Step-by-Step Instructions
Step 1: Navigate to Repository Settings
- Go to: https://github.com/Defi-Oracle-Meta-Blockchain/metamask-integration
- Click Settings (top right of repository)
- In left sidebar, click Pages
Step 2: Configure GitHub Pages
Under "Build and deployment":
-
Source section:
- Branch: Select
main - Folder: Select
/ (root)✅ Recommended - Click Save
- Branch: Select
-
Visibility (if available):
- Public (default) - Recommended for token list
- Private (Enterprise only) - If you need restricted access
Step 3: Wait for Deployment
- GitHub Pages will build and deploy automatically
- Check the Actions tab to see deployment status
- Typically takes 1-2 minutes
- Green checkmark = Success ✅
Step 4: Verify Token List URL
After deployment, your token list will be available at:
https://defi-oracle-meta-blockchain.github.io/metamask-integration/config/token-list.json
Test it:
curl https://defi-oracle-meta-blockchain.github.io/metamask-integration/config/token-list.json
Should return the JSON token list.
✅ What Happens After Setup
Automatic Token Discovery
Once GitHub Pages is enabled, users can:
-
Add Token List to MetaMask:
- Settings → Security & Privacy → Token Lists
- Add custom token list
- Enter:
https://defi-oracle-meta-blockchain.github.io/metamask-integration/config/token-list.json - Click Add
-
Tokens Automatically Imported:
- WETH9
- WETH10
- ETH/USD Price Feed
-
Automatic Updates:
- When you update the token list and push to GitHub
- GitHub Pages automatically rebuilds
- Users get updated token list automatically
🔧 Alternative: Use /docs Folder
If you prefer to use the /docs folder:
-
Move token list (optional):
# In repository mkdir -p docs/config cp config/token-list.json docs/config/ git add docs/config/token-list.json git commit -m "Move token list to docs for GitHub Pages" git push -
Configure Pages:
- Branch:
main - Folder:
/docs
- Branch:
-
URL (same):
https://defi-oracle-meta-blockchain.github.io/metamask-integration/config/token-list.json
📊 Current Token List Structure
Location: config/token-list.json
Contents:
- 3 tokens (WETH9, WETH10, Oracle)
- Correct decimals (18 for WETH, 8 for Oracle)
- Logo URLs (currently using Ethereum logo)
Version: 1.1.0
🔄 Updating the Token List
When you need to update the token list:
- Edit
config/token-list.json - Increment version number
- Update timestamp
- Commit and push:
git add config/token-list.json git commit -m "Update token list v1.2.0" git push origin main - GitHub Pages automatically rebuilds (1-2 minutes)
✅ Verification Checklist
After enabling GitHub Pages:
- Pages enabled in repository settings
- Branch set to
main - Folder set to
/ (root)or/docs - Deployment successful (check Actions tab)
- Token list URL accessible via curl/browser
- JSON validates correctly
- Can add URL to MetaMask token lists
- Tokens appear in MetaMask after adding list
🎯 Expected Result
After setup, the token list will be:
- ✅ Publicly accessible via HTTPS
- ✅ Automatically discoverable in MetaMask
- ✅ Version controlled
- ✅ Automatically updated on changes
- ✅ CORS headers properly set (by GitHub Pages)
🔗 Related Documentation
Last Updated: $(date)