-
Notifications
You must be signed in to change notification settings - Fork 10
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
Feat/add hmstr #339
Feat/add hmstr #339
Conversation
WalkthroughThis pull request introduces several updates to the Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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
🧹 Outside diff range and nitpick comments (2)
packages/oraidex-common/src/config/chainInfosWithIcon.ts (1)
23-24
: LGTM! Consider using HTTPS URLs for consistency.The addition of
PepeIcon
andHamsterIcon
constants is consistent with the existing code structure. However, for improved security and consistency with other icon URLs in the file, consider using HTTPS URLs instead of HTTP.Consider updating the URLs to use HTTPS:
-const PepeIcon = "http://assets.coingecko.com/coins/images/29850/standard/pepe-token.jpeg?1696528776"; -const HamsterIcon = "http://assets.coingecko.com/coins/images/39102/standard/hamster-removebg-preview.png?1720514486"; +const PepeIcon = "https://assets.coingecko.com/coins/images/29850/standard/pepe-token.jpeg?1696528776"; +const HamsterIcon = "https://assets.coingecko.com/coins/images/39102/standard/hamster-removebg-preview.png?1720514486";packages/oraidex-common/src/network.ts (1)
530-536
: New currency entry added for HMSTR tokenA new entry has been added to the
oraichainNetwork
configuration for the HMSTR token. Let's review each property:
coinDenom
: "HMSTR" - This is the display denomination of the token.coinMinimalDenom
: Uses the importedHMSTR_ORAICHAIN_DENOM
constant.coinDecimals
: 9 - This specifies the number of decimal places for the token.coinGeckoId
: "hamster-kombat" - This matches the newly added CoinGeckoId.coinImageUrl
: Points to an image on CoinGecko, which is consistent with other tokens.The structure and properties of this new entry are consistent with other token entries in the configuration.
However, I have one suggestion to improve consistency:
Consider adding a
bridgeTo
property to the HMSTR token configuration, similar to other tokens in this list. This property indicates which networks the token can be bridged to. If HMSTR is not meant to be bridged, you can omit this property, but it would be good to confirm this intention.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (4)
- packages/oraidex-common/package.json (1 hunks)
- packages/oraidex-common/src/config/chainInfosWithIcon.ts (2 hunks)
- packages/oraidex-common/src/constant.ts (1 hunks)
- packages/oraidex-common/src/network.ts (3 hunks)
✅ Files skipped from review due to trivial changes (1)
- packages/oraidex-common/package.json
🔇 Additional comments (6)
packages/oraidex-common/src/config/chainInfosWithIcon.ts (1)
129-138
: LGTM! Verify CoinGecko IDs for accuracy.The new entries for Pepe and Hamster tokens in the
tokensIcon
array are structurally consistent with existing entries.To ensure the accuracy of the CoinGecko IDs, please run the following verification script:
This script will help confirm that the CoinGecko IDs are correct and return the expected token information.
✅ Verification successful
CoinGecko IDs Verified Successfully
The CoinGecko IDs "pepe" and "hamster-kombat" are valid and return the expected token information.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence and accuracy of the new CoinGecko IDs # Test: Check if the CoinGecko IDs exist and return valid data for id in "pepe" "hamster-kombat"; do echo "Checking $id..." curl -s "https://api.coingecko.com/api/v3/coins/$id" | jq '.id, .symbol, .name' echo "------------------------" doneLength of output: 526
packages/oraidex-common/src/constant.ts (2)
Line range hint
1-103
: Summary: New token constant added successfullyThe addition of the
HMSTR_ORAICHAIN_DENOM
constant is the only change in this file. It follows the existing patterns and conventions for token denomination constants in the Oraichain ecosystem.To ensure smooth integration:
- Verify if any updates are needed in other parts of the codebase where token denominations are used.
- Consider updating any relevant documentation or configuration files that list supported tokens.
- If applicable, ensure that any token-related UI components or selectors are updated to include this new token.
103-103
: LGTM. Verify usage of the new constant across the codebase.The addition of
HMSTR_ORAICHAIN_DENOM
constant is consistent with the existing code style and naming conventions. It appears to represent a new token denomination for the Oraichain ecosystem.To ensure proper integration, please run the following script to check for any existing references to this token and verify if any updates are needed in other parts of the codebase:
✅ Verification successful
HMSTR_ORAICHAIN_DENOM Usage Verified
The
HMSTR_ORAICHAIN_DENOM
constant is properly referenced in the following files:
packages/oraidex-common/src/constant.ts
packages/oraidex-common/src/network.ts
No issues found with its integration across the codebase.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Search for potential usages or references to the new HMSTR token. # Test: Search for "HMSTR" string in all files. Expect: Occurrences related to the new token. rg --type-add 'code:*.{js,ts,tsx,json}' --type code -i 'HMSTR' # Test: Search for patterns similar to other token usage. Expect: Places where the new constant might need to be added. rg --type-add 'code:*.{js,ts,tsx,json}' --type code 'ORAICHAIN_DENOM'Length of output: 7694
packages/oraidex-common/src/network.ts (3)
62-63
: New constant imported: HMSTR_ORAICHAIN_DENOMThe new constant
HMSTR_ORAICHAIN_DENOM
has been imported from theconstant
file. This is consistent with how other token denominations are imported in this file.
124-125
: New CoinGeckoId added: "hamster-kombat"The
CoinGeckoId
type has been updated to include "hamster-kombat". This addition is consistent with the existing pattern and allows the new token to be recognized by the system.
Line range hint
1-1120
: Summary: HMSTR token integration looks goodThe changes to add support for the HMSTR (Hamster Kombat) token to the Oraichain network have been implemented correctly and consistently with the existing code structure. The new token has been properly integrated into the necessary type definitions and network configurations.
The only minor suggestion is to consider adding a
bridgeTo
property to the HMSTR token configuration if applicable, to maintain consistency with other token entries.Overall, these changes enhance the network's capability to handle transactions involving the new HMSTR token.
Summary by CodeRabbit
1.1.20
.PepeIcon
andHamsterIcon
.HMSTR
, with associated metadata and image."hamster-kombat"
.