Skip to content
This repository was archived by the owner on Mar 13, 2026. It is now read-only.

fix: amoy gas station url#52

Merged
rongquan1 merged 1 commit intomasterfrom
fix/amoy-gasstation-url
Sep 22, 2025
Merged

fix: amoy gas station url#52
rongquan1 merged 1 commit intomasterfrom
fix/amoy-gasstation-url

Conversation

@isaackps
Copy link
Copy Markdown

@isaackps isaackps commented Sep 22, 2025

Summary

amoy gas station url update.

Summary by CodeRabbit

  • Bug Fixes
    • Updated the Amoy network gas price source to the primary Polygon gas station, improving accuracy and reliability of gas estimates for Amoy transactions.
    • Enhances transaction fee calculations and reduces potential discrepancies during sends on Amoy.
    • No changes to user-facing settings or workflows; existing configurations continue to work.
    • Backward compatible with no API or type changes; no action required from users.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Sep 22, 2025

Walkthrough

Updated the Amoy network configuration to use the main Polygon gas station URL instead of the testnet endpoint. No other networks or logic were modified, and no public types or signatures changed.

Changes

Cohort / File(s) Summary
Network config update
src/common/networks.ts
Replaced Amoy gas station URL from testnet endpoint to main Polygon gas station endpoint; no other changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

hop-hop goes the build, with URLs aligned,
a switch of stations—Polygons refined.
no types disturbed, no functions cry,
just cleaner routes where packets fly.
i thump approval with a tiny cheer—
the gas is right, the path is clear! 🐇⚙️

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description only contains a one-line Summary and does not follow the repository's required template because the Changes and Issues sections are missing; it also omits important details such as the previous and new gas station URLs, rationale for switching endpoints, and verification steps. Because required template sections and actionable detail are absent, reviewers cannot fully assess the impact or validate the change. Under the repository template rules this makes the description incomplete. Please update the PR description to follow the provided template by adding a Changes section that lists the exact old and new URLs, any files or config updated, and steps or test results used to verify the change, and an Issues section referencing related issue or story IDs; also explain the rationale and any potential impact of switching from a testnet to a mainnet endpoint. Include commands or sample outputs that demonstrate the update works and note any migration or rollback considerations so reviewers can validate the change. Keep the additions concise and aligned with the template headings.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title "fix: amoy gas station url" is concise, follows a common commit-style prefix, and directly describes the primary change (updating the Amoy gas station URL). It names the affected component and intent without extraneous detail, making it scannable for reviewers. This aligns with the provided changeset which updates the network gas station endpoint.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/amoy-gasstation-url

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.

Copy link
Copy Markdown

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/common/networks.ts (1)

5-5: Amoy gas token is POL, not MATIC

Docs list Amoy’s gas token as POL (chain id 80002). Keeping "MATIC" will mislabel fees/UX in the CLI. Recommend adding "POL" to the currency union and setting Amoy’s currency to "POL" here. (docs.polygon.technology)

Apply:

- export type networkCurrency = "ETH" | "MATIC" | "XDC" | "FREE" | "ASTRON";
+ export type networkCurrency = "ETH" | "MATIC" | "POL" | "XDC" | "FREE" | "ASTRON";
   [NetworkCmdName.Amoy]: {
     explorer: "https://www.oklink.com/amoy",
     provider: jsonRpcProvider("https://polygon-amoy.infura.io/v3/48bea089ceb34f579d2381195ca46c1d"),
     networkId: 80002,
     networkName: NetworkCmdName.Amoy,
-    currency: "MATIC",
+    currency: "POL",
     gasStation: gasStation("https://gasstation.polygon.technology/amoy"),
   },

Also applies to: 72-79

🧹 Nitpick comments (1)
src/common/networks.ts (1)

72-74: Optional: use PolygonScan for explorer

Official docs point to PolygonScan for Amoy. Consider switching the explorer URL. (docs.polygon.technology)

-    explorer: "https://www.oklink.com/amoy",
+    explorer: "https://amoy.polygonscan.com",
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 02a25c1 and cdee0a7.

📒 Files selected for processing (1)
  • src/common/networks.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/common/networks.ts (1)
src/common/gas-station/index.ts (1)
  • gasStation (7-20)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Tests / Run Tests
🔇 Additional comments (1)
src/common/networks.ts (1)

72-79: Correct Amoy gas station endpoint

Switching Amoy to https://gasstation.polygon.technology/amoy matches Polygon’s official docs and the JSON schema expected by gasStation() (standard.maxPriorityFee/maxFee in gwei). Looks good. (docs.polygon.technology)

@rongquan1 rongquan1 merged commit 0e49230 into master Sep 22, 2025
10 checks passed
@rongquan1 rongquan1 deleted the fix/amoy-gasstation-url branch September 22, 2025 03:48
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 3.2.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants