-
Notifications
You must be signed in to change notification settings - Fork 111
Routescan returns gas prices in wei (not gwei) and should not inheri… #1589
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
…t parent function
📝 WalkthroughWalkthroughReplaces Etherscan-based Arbitrum providers with RoutescanProvider instances, exposes EtherscanProvider.apiKey to subclasses, and adds a RoutescanProvider.getFeeRates implementation that returns gas prices in wei. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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)
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. Comment |
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: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.changeset/angry-drinks-boil.md(1 hunks)packages/xchain-arbitrum/src/const.ts(3 hunks)packages/xchain-evm-providers/src/providers/etherscan/etherscan-data-provider.ts(1 hunks)packages/xchain-evm-providers/src/providers/routescan/routescan-data-provider.ts(2 hunks)
⏰ 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: build
🔇 Additional comments (5)
packages/xchain-evm-providers/src/providers/etherscan/etherscan-data-provider.ts (1)
24-24: LGTM!The visibility change from
privatetoprotectedcorrectly enables subclass access toapiKeywhile maintaining encapsulation. This aligns with the RoutescanProvider's need to accessapiKeyin its overriddengetFeeRatesmethod..changeset/angry-drinks-boil.md (1)
1-6: LGTM!The changeset correctly documents patch version bumps for both affected packages with a clear description of the fix.
packages/xchain-arbitrum/src/const.ts (2)
39-45: LGTM!The mainnet Routescan provider configuration is correct with chain ID
42161for Arbitrum One.
56-60: LGTM!The provider mapping and integration with
defaultArbParamsare correctly structured.Also applies to: 119-119
packages/xchain-evm-providers/src/providers/routescan/routescan-data-provider.ts (1)
82-97: Implementation correctly handles Routescan's wei-based gas price response.The override properly removes the
10^9multiplication applied in the parent Etherscan class. Routescan's gas oracle API returns values in wei (verified: SafeGasPrice: 10000000 = 0.01 gwei on Arbitrum, which is reasonable). The documentation accurately explains this difference.Note:
this.apiKeyis an empty string (set in the constructor), but this is harmless since Routescan doesn't require authentication.
…t parent function
Summary by CodeRabbit
Bug Fixes
Chores
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.