Skip to content

Conversation

@cowdan
Copy link
Contributor

@cowdan cowdan commented May 23, 2025

…DAI`

TEST
compare the newly added tokens with this token list

Summary by CodeRabbit

  • New Features
    • Added support for new tokens on the Polygon network: POL (ex-MATIC), Wrapped POL (WPOL), USDC, DAI, and USDT, including their metadata and logos.
  • Chores
    • Updated the token list formatting for improved consistency.
    • Replaced a previous Arbitrum token entry with the new POL token on Polygon.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 23, 2025

Walkthrough

Several 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

File(s) Change Summary
src/public/images/137/0x0000000000000000000000000000000000001010/info.json Added metadata for token "POL (ex-MATIC)" (symbol: POL), 18 decimals, active, with logo URL.
src/public/images/137/0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270/info.json Added metadata for token "Wrapped POL" (symbol: WPOL), 18 decimals, active, with logo URL.
src/public/images/137/0x3c499c542cef5e3811e1192ce70d8cc03d5c3359/info.json Added metadata for token "USD Coin" (symbol: USDC), 6 decimals, active, with logo URL.
src/public/images/137/0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063/info.json Added metadata for token "DAI" (symbol: DAI), 18 decimals, active, with logo URL.
src/public/images/137/0xc2132d05d31c914a87c6611c10748aeb04b58e8f/info.json Added metadata for token "Tether" (symbol: USDT), 6 decimals, active, with logo URL.
src/public/CowSwap.json Updated token list: replaced Arbitrum MIM with Polygon POL; added Polygon tokens WPOL, USDC, DAI, USDT; formatted arrays in keywords and tags fields.

Poem

In Polygon’s warren, new tokens appear,
With names and addresses now crystal clear.
USDC, DAI, and Tether join the crew,
POL and WPOL hop in too!
JSON carrots, all lined up in a row—
The blockchain garden continues to grow.
🥕✨

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit 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.
Learn more here.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f71f974 and f1cf787.

📒 Files selected for processing (1)
  • src/public/CowSwap.json (5 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/public/CowSwap.json

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 consistency

Consider 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

📥 Commits

Reviewing files that changed from the base of the PR and between 2b8ef9d and f71f974.

⛔ Files ignored due to path filters (5)
  • src/public/images/137/0x0000000000000000000000000000000000001010/logo.png is excluded by !**/*.png
  • src/public/images/137/0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270/logo.png is excluded by !**/*.png
  • src/public/images/137/0x3c499c542cef5e3811e1192ce70d8cc03d5c3359/logo.png is excluded by !**/*.png
  • src/public/images/137/0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063/logo.png is excluded by !**/*.png
  • src/public/images/137/0xc2132d05d31c914a87c6611c10748aeb04b58e8f/logo.png is 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 new info.json for WPOL includes all required fields (removed, address, symbol, name, logoURI, decimals, chainId) and matches the format of existing Polygon token metadata. Ensure:

  • The address is in the expected checksum or lowercase format used across the list.
  • The logoURI correctly points to the raw asset and is accessible.
  • The decimals and chainId align with on‐chain specifications.
src/public/images/137/0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063/info.json (4)

1-2: Validate token 'removed' status
The "removed": false flag 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 address 0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063 is correctly EIP-55 checksummed and matches the upstream registry. Ensure the "symbol" and "name" fields follow project conventions (all uppercase).


6-6: Ensure logoURI is correct and reachable
Verify that the URL points to the correct asset in the token-lists repo (.../logo.png) and that the file exists at this path.


7-8: Confirm decimals and chainId values
The "decimals": 18 and "chainId": 137 entries 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.
The logoURI points to src/public/images/137/0xc2132d05d31c914a87c6611c10748aeb04b58e8f/logo.png. Please ensure the corresponding logo.png is 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
The logo.png at src/public/images/137/0xc2132d05d31c914a87c6611c10748aeb04b58e8f/logo.png exists as referenced by logoURI. No further action required.

src/public/images/137/0x3c499c542cef5e3811e1192ce70d8cc03d5c3359/info.json (2)

1-9: Approve the new token metadata file

The JSON object adheres to the expected token‐metadata schema—fields removed, address, symbol, name, logoURI, decimals, and chainId are 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
fi

Length of output: 144


Logo asset path confirmed
The logo.png file 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": false appropriately marks this token as active in the list.


7-8: Decimals and chain ID are accurate.

"decimals": 18 and "chainId": 137 correctly correspond to the POL token on the Polygon network.


6-6:

✅ Verification successful

Ensure logo file is committed.

The logoURI points to logo.png in this directory. Please confirm that logo.png exists at src/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
fi

Length of output: 86


Logo file presence verified
The logo.png exists at src/public/images/137/0x0000000000000000000000000000000000001010/logo.png, so the logoURI will 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 address 0x0000000000000000000000000000000000001010 contains no letters, so it remains identical under EIP-55. No change is required.

Copy link
Collaborator

@alfetopito alfetopito left a 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.

@cowdan
Copy link
Contributor Author

cowdan commented May 23, 2025

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.
Added

And, why haven't you tried to use the form?
Will use for the next tokens

Anyway, good to go IMO.

@cowdan cowdan merged commit 82b0b42 into main May 23, 2025
7 checks passed
@cowdan cowdan deleted the feat/add-polygon-tokens branch May 23, 2025 16:38
@github-actions github-actions bot locked and limited conversation to collaborators May 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants