-
Notifications
You must be signed in to change notification settings - Fork 1
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
Non native tokens transfer b/w Astar & Polkadex #282
Conversation
🦋 Changeset detectedLatest commit: 8538be3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Warning Rate limit exceeded@ap211unitech has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 29 minutes and 8 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe recent updates enhance the configuration of various assets within the Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant User
participant Astar
participant Polkadex
User->>Astar: Initiate asset transfer (dot, glmr, etc.)
Astar->>Polkadex: Send asset transfer request
Polkadex->>Astar: Confirm asset transfer
Astar->>User: Transfer complete notification
Possibly related issues
Poem
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 as PR comments)
Additionally, you can add CodeRabbit Configration 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: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- .changeset/stupid-dryers-invite.md (1 hunks)
- packages/thea/src/config/substrate/chains.ts (1 hunks)
- packages/thea/src/config/substrate/config/astar.ts (2 hunks)
- packages/thea/src/config/substrate/config/polkadex.ts (2 hunks)
Files not reviewed due to errors (2)
- packages/thea/src/config/substrate/chains.ts (no review received)
- packages/thea/src/config/substrate/config/polkadex.ts (no review received)
Files skipped from review due to trivial changes (1)
- .changeset/stupid-dryers-invite.md
Additional comments not posted (7)
packages/thea/src/config/substrate/config/astar.ts (7)
142-142
: Ensure all assets are correctly included in the Astar chain configuration.
42-57
: Review the fee values for GLMR to ensure they align with network requirements.Verification successful
The fee values for GLMR in the Astar network appear to be consistent across the system. The search results show multiple instances of
AssetConfig
usingglmr
in various configuration files, includingastar.ts
,moonbeam.ts
, andpolkadex.ts
.
packages/thea/src/config/substrate/config/astar.ts
packages/thea/src/config/substrate/config/moonbeam.ts
packages/thea/src/config/substrate/config/polkadex.ts
These instances indicate that the fee values for GLMR are being used consistently.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the fee values for GLMR in the Astar network. # Test: Search for the fee values usage. Expect: Consistent usage across the system. rg --type typescript $'new AssetConfig({ asset: glmr, $$$ })'Length of output: 191
Script:
#!/bin/bash # Description: Verify the fee values for GLMR in the Astar network. # Test: Search for the fee values usage. Expect: Consistent usage across the system. rg --type typescript 'new AssetConfig\(\{ asset: glmr, .*\}\)'Length of output: 99
Script:
#!/bin/bash # Description: Verify the fee values for GLMR in the Astar network. # Test: Search for the fee values usage. Expect: Consistent usage across the system. rg --type ts 'new AssetConfig\(\{ asset: glmr, .*\}\)'Length of output: 56
Script:
#!/bin/bash # Description: Verify the fee values for GLMR in the Astar network. # Test: Search for all instances of AssetConfig and filter for GLMR usage. rg --type ts 'new AssetConfig' | xargs -I {} rg 'glmr' {}Length of output: 4590
Script:
#!/bin/bash # Description: Verify the fee values for GLMR in the Astar network. # Test: Search for all instances of AssetConfig and filter for GLMR usage. rg --type ts -l 'new AssetConfig' | xargs rg 'glmr'Length of output: 1046
59-74
: Verify the zero fee configuration for UNQ to ensure it is intentional.
93-108
: Verify the small fee configuration for BNC to ensure it is appropriate.Verification successful
The previous script encountered a syntax error due to an incorrect regex pattern. Let's correct the pattern and re-run the script to verify the small fee configuration for BNC.
The previous script encountered a syntax error due to an incorrect regex pattern. Let's correct the pattern and re-run the script to verify the small fee configuration for BNC.
The previous script encountered an error due to an unrecognized file type. Let's remove the file type specification and re-run the script to verify the small fee configuration for BNC.
The previous script did not produce any output, indicating that the specific configuration might not be used elsewhere or the search pattern might need adjustment. Let's broaden the search to include more general patterns related to
AssetConfig
andbnc
.
The previous attempts to search for the usage of
AssetConfig
withbnc
did not produce any output. To ensure thorough verification, let's useast-grep
to search for the specific configuration pattern in the codebase.
The verification process has revealed multiple instances of
AssetConfig
withbnc
across different files. The small fee configuration for BNC in the Astar network appears to be consistent with other configurations.
File:
packages/thea/src/config/substrate/config/astar.ts
- Lines: 93-108
- Fee Amount: 0.0006 BNC
File:
packages/thea/src/config/substrate/config/bifrost.ts
- Lines: 9-23
- Fee Amount: 0 BNC
File:
packages/thea/src/config/substrate/config/polkadex.ts
- Lines: 260-280
- Fee Amount: 0.001 BNC
- Lines: 445-465
- Fee Amount: 0.000563136 BNC
The small fee configuration for BNC in the Astar network is consistent with other configurations, suggesting it is appropriate.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the small fee configuration for BNC in the Astar network. # Test: Search for the small fee configuration usage. Expect: Consistent usage across the system. rg --type typescript $'new AssetConfig({ asset: bnc, $$$ })'Length of output: 189
Script:
#!/bin/bash # Description: Verify the small fee configuration for BNC in the Astar network. # Test: Search for the small fee configuration usage. Expect: Consistent usage across the system. rg --type typescript 'new AssetConfig\({ asset: bnc,'Length of output: 187
Script:
#!/bin/bash # Description: Verify the small fee configuration for BNC in the Astar network. # Test: Search for the small fee configuration usage. Expect: Consistent usage across the system. rg --type typescript 'new AssetConfig\(\{ asset: bnc,'Length of output: 91
Script:
#!/bin/bash # Description: Verify the small fee configuration for BNC in the Astar network. # Test: Search for the small fee configuration usage. Expect: Consistent usage across the system. rg 'new AssetConfig\(\{ asset: bnc,'Length of output: 38
Script:
#!/bin/bash # Description: Verify the small fee configuration for BNC in the Astar network. # Test: Search for any usage of AssetConfig with bnc. Expect: Consistent usage across the system. rg 'AssetConfig.*bnc'Length of output: 23
Script:
#!/bin/bash # Description: Verify the small fee configuration for BNC in the Astar network using ast-grep. # Test: Search for any usage of AssetConfig with bnc. Expect: Consistent usage across the system. ast-grep --lang typescript --pattern $'new AssetConfig({ asset: bnc, $$$ })'Length of output: 6382
25-40
: Ensure the destination fee and minimum asset configurations are consistent with the intended functionality.
76-91
: Review the fee values for PHA to ensure they align with network requirements.
110-125
: Review the very small fee values for VDOT to ensure they align with network requirements.
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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- packages/thea/src/config/substrate/chains.ts (1 hunks)
- packages/thea/src/config/substrate/config/polkadex.ts (2 hunks)
Files skipped from review as they are similar to previous changes (2)
- packages/thea/src/config/substrate/chains.ts
- packages/thea/src/config/substrate/config/polkadex.ts
📝 Description
As of now, we have successfully migrated exisiting THEA functionalities to
@polkadex/thea
package i.e. THEA deposits and withdrawals for existing chains and assets. This task is the second part of THEA enhancement task.Now, our next goal is to allow depositing non-native assets of exisiting chains to Polkadex network and allow withdrawals from Polkadex network back to original chain.
For example, Astar supports DOT, GLMR and more assets which are already supported by Polkadex network, but we never integrated it frontend. Technically, Transfer for these assets should work. So, we will be testing and allowing these transfers.
In this task, we will be adding these assets for Astar & Polkadex network -
Summary by CodeRabbit
astar
instance, includingdot
,glmr
,unq
,pha
,ibtc
,bnc
, andvdot
.