Skip to content

Conversation

@elena-zh
Copy link
Contributor

@elena-zh elena-zh commented Sep 16, 2025

Fixes cowprotocol/cowswap#6242

Safe token has a wrong number of decimals in this list https://raw.githubusercontent.com/cowprotocol/token-lists/main/src/public/Uniswap.100.json
image

The PR updates this number to 18 decimals.
image

Summary by CodeRabbit

  • Bug Fixes

    • Corrected SAFE token decimal precision to 18 on Gnosis (chainId 100), ensuring accurate balances, price quotes, and transaction amounts.
  • Chores

    • Minor file formatting cleanup.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 16, 2025

Walkthrough

Updated Safe token’s decimals from 15 to 18 in the Gnosis Chain token list file (Uniswap.100.json). Added a trailing newline.

Changes

Cohort / File(s) Summary
Token list data (Gnosis Chain)
src/public/Uniswap.100.json
Adjust Safe token (address 0x4d18815d14fe5c3304e87b3fa18318baa5c23820) decimals 15 → 18; added trailing newline.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related issues

Poem

A hop, a bop, a decimal tweak,
Three more places—no longer bleak.
On Gnosis fields I nibble bytes,
Balances now align just right.
Thump-thump! The list is clean—
Carrots crisp, and tokens keen. 🥕✨

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch safe-decimals-number

📜 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 7a7305f and 205cc74.

📒 Files selected for processing (1)
  • src/public/Uniswap.100.json (2 hunks)
🔇 Additional comments (2)
src/public/Uniswap.100.json (2)

815-815: Trailing newline at EOF — fine.
No issues.


104-104: SAFE decimals verified — increment token list patch and update timestamp

eth_call to 0x4d18815d14fe5c3304e87b3fa18318baa5c23820 returned 0x0000000000000000000000000000000000000000000000000000000000000012 (18).

File: src/public/Uniswap.100.json — increment "version.patch" and refresh "timestamp".

  "version": {
    "major": 0,
    "minor": 1,
-    "patch": 0
+    "patch": 1
  },
…
-  "timestamp": "2024-12-12T17:44:12.867Z"
+  "timestamp": "2025-09-16T00:00:00.000Z"

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

Pre-merge checks

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues Check ✅ Passed The PR directly implements the linked issue [#6242] by changing the Safe token's decimals from 15 to 18 for address 0x4d18815d14fe5c3304e87b3fa18318baa5c23820 in src/public/Uniswap.100.json, which addresses the reported root cause of incorrect balance display on Gnosis chain. This is a coding/data change that satisfies the issue's stated objective.
Out of Scope Changes Check ✅ Passed Based on the provided raw_summary, the only substantive edit is the Safe token decimals update (and a trailing newline); no other files or unrelated code changes are present, so no out-of-scope modifications were detected.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Title Check ✅ Passed The title succinctly and accurately summarizes the PR’s primary change: updating the Safe token’s decimals on the Gnosis chain. It is concise, specific to the affected token and network, and directly corresponds to the modification in src/public/Uniswap.100.json described in the PR. The phrasing avoids unnecessary detail and is clear for teammates scanning history.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 16, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@elena-zh elena-zh requested a review from a team September 16, 2025 14:02
@elena-zh elena-zh self-assigned this Sep 16, 2025
@elena-zh
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@elena-zh
Copy link
Contributor Author

recheck

github-actions bot added a commit that referenced this pull request Sep 16, 2025
@elena-zh elena-zh changed the title fix: change number of decimals for Safe token fix: change number of decimals for Safe token on Gnosis Sep 16, 2025
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.

Thank you!

Forgot to mention, Coingecko fixed it on their side too.

@alfetopito alfetopito merged commit 6088699 into main Sep 16, 2025
6 of 7 checks passed
@alfetopito alfetopito deleted the safe-decimals-number branch September 16, 2025 14:36
@github-actions github-actions bot locked and limited conversation to collaborators Sep 16, 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.

Safe token's balance shows a wrong value on Gnosis chain

4 participants