- 
                Notifications
    
You must be signed in to change notification settings  - Fork 29
 
          feat: add initial tokens to Polygon: POL, WPOL, USDC, USDT, `…
          #922
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
          
WalkthroughSeveral new JSON metadata files were added for different cryptocurrency tokens on the Polygon (chain ID 137) network. Each file contains the token's address, symbol, name, decimals, logo URL, and a flag indicating the token is active. The CowSwap token list JSON was updated to replace an Arbitrum token with a Polygon token and to add the new Polygon tokens. No code or exported entities were modified. Changes
 Poem
 Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
 ✅ Files skipped from review due to trivial changes (1)
 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit: 
 SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
 Other keywords and placeholders
 CodeRabbit Configuration File (
 | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/public/images/137/0x3c499c542cef5e3811e1192ce70d8cc03d5c3359/info.json (1)
3-3: Use checksummed address for consistencyConsider using an EIP-55 checksummed address (
0x3C499C542CEf5e3811E1192CE70D8cC03D5C3359) instead of all lowercase to maintain consistency and reduce the risk of transcription errors. If the project convention is strictly lowercase, this suggestion can be skipped.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (5)
src/public/images/137/0x0000000000000000000000000000000000001010/logo.pngis excluded by!**/*.pngsrc/public/images/137/0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270/logo.pngis excluded by!**/*.pngsrc/public/images/137/0x3c499c542cef5e3811e1192ce70d8cc03d5c3359/logo.pngis excluded by!**/*.pngsrc/public/images/137/0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063/logo.pngis excluded by!**/*.pngsrc/public/images/137/0xc2132d05d31c914a87c6611c10748aeb04b58e8f/logo.pngis excluded by!**/*.png
📒 Files selected for processing (5)
src/public/images/137/0x0000000000000000000000000000000000001010/info.json(1 hunks)src/public/images/137/0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270/info.json(1 hunks)src/public/images/137/0x3c499c542cef5e3811e1192ce70d8cc03d5c3359/info.json(1 hunks)src/public/images/137/0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063/info.json(1 hunks)src/public/images/137/0xc2132d05d31c914a87c6611c10748aeb04b58e8f/info.json(1 hunks)
🔇 Additional comments (13)
src/public/images/137/0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270/info.json (1)
1-9: Verify token metadata consistency and correctness
The newinfo.jsonfor WPOL includes all required fields (removed,address,symbol,name,logoURI,decimals,chainId) and matches the format of existing Polygon token metadata. Ensure:
- The
 addressis in the expected checksum or lowercase format used across the list.- The
 logoURIcorrectly points to the raw asset and is accessible.- The
 decimalsandchainIdalign with on‐chain specifications.src/public/images/137/0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063/info.json (4)
1-2: Validate token 'removed' status
The"removed": falseflag correctly indicates this token is active and should be included in the list.
3-5: Verify checksummed address, symbol, and name
Please confirm that the address0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063is correctly EIP-55 checksummed and matches the upstream registry. Ensure the"symbol"and"name"fields follow project conventions (all uppercase).
6-6: EnsurelogoURIis correct and reachable
Verify that the URL points to the correct asset in thetoken-listsrepo (.../logo.png) and that the file exists at this path.
7-8: Confirm decimals and chainId values
The"decimals": 18and"chainId": 137entries correctly reflect DAI on Polygon.src/public/images/137/0xc2132d05d31c914a87c6611c10748aeb04b58e8f/info.json (2)
1-9: Metadata entry looks complete and accurate.
All required fields (removed,address,symbol,name,logoURI,decimals,chainId) are present and match the expected values for Tether (USDT) on Polygon (chain ID 137).
6-6:✅ Verification successful
Verify the referenced logo file exists.
ThelogoURIpoints tosrc/public/images/137/0xc2132d05d31c914a87c6611c10748aeb04b58e8f/logo.png. Please ensure the correspondinglogo.pngis included in the PR at that path.
🏁 Script executed:
#!/bin/bash # Check that the USDT logo file is present if [[ ! -f "src/public/images/137/0xc2132d05d31c914a87c6611c10748aeb04b58e8f/logo.png" ]]; then echo "ERROR: Missing logo for USDT at src/public/images/137/0xc2132d05d31c914a87c6611c10748aeb04b58e8f/logo.png" exit 1 fi echo "USDT logo file exists"Length of output: 139
Logo file presence confirmed
Thelogo.pngatsrc/public/images/137/0xc2132d05d31c914a87c6611c10748aeb04b58e8f/logo.pngexists as referenced bylogoURI. No further action required.src/public/images/137/0x3c499c542cef5e3811e1192ce70d8cc03d5c3359/info.json (2)
1-9: Approve the new token metadata fileThe JSON object adheres to the expected token‐metadata schema—fields
removed,address,symbol,name,logoURI,decimals, andchainIdare all present and correctly formatted. Values match the known parameters for USDC on Polygon (chain 137).
6-6:✅ Verification successful
Verify logo asset path
Please ensure the referenced logo file exists at
src/public/images/137/0x3c499c542cef5e3811e1192ce70d8cc03d5c3359/logo.png.Run this script from the repository root to confirm:
🏁 Script executed:
#!/bin/bash # Check presence of the USDC logo asset if [ -f src/public/images/137/0x3c499c542cef5e3811e1192ce70d8cc03d5c3359/logo.png ]; then echo "✅ Logo asset found." exit 0 else echo "🚨 Logo asset missing!" exit 1 fiLength of output: 144
Logo asset path confirmed
Thelogo.pngfile exists at the specified location—no further changes needed.• src/public/images/137/0x3c499c542cef5e3811e1192ce70d8cc03d5c3359/logo.png
src/public/images/137/0x0000000000000000000000000000000000001010/info.json (4)
2-2: Active status flag is correct.Setting
"removed": falseappropriately marks this token as active in the list.
7-8: Decimals and chain ID are accurate.
"decimals": 18and"chainId": 137correctly correspond to the POL token on the Polygon network.
6-6:✅ Verification successful
Ensure logo file is committed.
The
logoURIpoints tologo.pngin this directory. Please confirm thatlogo.pngexists atsrc/public/images/137/0x0000000000000000000000000000000000001010/so the token icon will load correctly. You can verify with:
🏁 Script executed:
#!/bin/bash if [[ ! -f src/public/images/137/0x0000000000000000000000000000000000001010/logo.png ]]; then echo "Error: logo.png is missing" exit 1 fiLength of output: 86
Logo file presence verified
Thelogo.pngexists atsrc/public/images/137/0x0000000000000000000000000000000000001010/logo.png, so thelogoURIwill load correctly. No further action needed.
3-3:✅ Verification successful
Validate token address format.
The address is in lowercase—ensure this aligns with the repository’s address-format standard (EIP-55 checksum or all-lowercase). Inconsistent casing can lead to lookup failures. You can verify casing consistency across metadata files by running:
🏁 Script executed:
#!/bin/bash # Check for uppercase characters in addresses grep -RIn '"address":' src/public/images/137/ | awk -F '"' '{print $4}' | grep '[A-F]'Length of output: 131
No update needed: numeric-only address is checksum-consistent
We checked for mixed-case addresses and found entries like
0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063, confirming the repo uses EIP-55 checksums. In this file, the address0x0000000000000000000000000000000000001010contains no letters, so it remains identical under EIP-55. No change is required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you going to add them to CowSwap.json token list as well?
As it is, only the images will be available on CoW Swap.
And, why haven't you tried to use the form?
Anyway, good to go IMO.
          
 
 
  | 
    
…DAI`
TEST
compare the newly added tokens with this token list
Summary by CodeRabbit