-
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
Configured minimum amount for cross chain #287
Conversation
🦋 Changeset detectedLatest commit: 6f3c20a 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 |
WalkthroughThe updates introduce modifications to the Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant User
participant Astar
participant Interlay
participant Config
participant Constants
User->>Astar: Initiate transfer
Astar->>Constants: Fetch MIN_BRIDGE_AMOUNT
Constants-->>Astar: Return min amounts
Astar->>Astar: Calculate min amount
Astar-->>User: Return result
User->>Interlay: Initiate transfer
Interlay->>Constants: Fetch MIN_BRIDGE_AMOUNT
Constants-->>Interlay: Return min amounts
Interlay->>Interlay: Calculate min amount
Interlay-->>User: Return result
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 (7)
- .changeset/yellow-swans-hang.md (1 hunks)
- packages/thea/src/config/substrate/config/astar.ts (4 hunks)
- packages/thea/src/config/substrate/config/interlay.ts (2 hunks)
- packages/thea/src/config/substrate/constants/index.ts (1 hunks)
- packages/thea/src/config/substrate/index.ts (1 hunks)
- packages/thea/src/sdk/substrate/astar.ts (2 hunks)
- packages/thea/src/sdk/substrate/interlay.ts (2 hunks)
Files skipped from review due to trivial changes (1)
- packages/thea/src/config/substrate/index.ts
Additional comments not posted (5)
.changeset/yellow-swans-hang.md (1)
5-5
: The changeset description is clear and effectively communicates the purpose of the changes.packages/thea/src/config/substrate/constants/index.ts (1)
30-33
: The implementation ofMIN_BRIDGE_AMOUNT
is correct and well-structured. It effectively supports the new feature for minimum bridge amounts.packages/thea/src/config/substrate/config/interlay.ts (1)
30-30
: The adjustments todestinationFee
amounts fordot
andvdot
are aligned with the PR objectives. Ensure these values are consistent with external documentation or other parts of the application.Also applies to: 78-78
packages/thea/src/config/substrate/config/astar.ts (1)
30-30
: Adjustments todestinationFee
amounts fordot
,unq
,pha
, andibtc
are noted. Please confirm that setting thedestinationFee
to0
forunq
is intentional and verify consistency across the application.Also applies to: 64-64, 81-81, 132-132
packages/thea/src/sdk/substrate/astar.ts (1)
18-18
: Integration ofMIN_BRIDGE_AMOUNT
ingetTransferConfig
method looks correct and aligns with the PR objectives to handle minimum transfer amounts for specific chains.Also applies to: 106-112
Verification successful
The
MIN_BRIDGE_AMOUNT
constant is used in the following files:
packages/thea/src/config/substrate/constants/index.ts
packages/thea/src/sdk/substrate/astar.ts
packages/thea/src/sdk/substrate/interlay.ts
The integration of
MIN_BRIDGE_AMOUNT
in thegetTransferConfig
method inastar.ts
aligns with the PR objectives and is consistent with its usage in other relevant parts of the system.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that `MIN_BRIDGE_AMOUNT` is consistently used across other relevant parts of the system. # Test: Search for usage of `MIN_BRIDGE_AMOUNT` across the project. Expect: Consistent usage in relevant parts. rg --type python $'MIN_BRIDGE_AMOUNT'Length of output: 67
Script:
#!/bin/bash # Description: Verify that `MIN_BRIDGE_AMOUNT` is consistently used across other relevant parts of the system. # Test: Search for usage of `MIN_BRIDGE_AMOUNT` across the project. Expect: Consistent usage in relevant parts. rg --type typescript $'MIN_BRIDGE_AMOUNT'Length of output: 75
Script:
#!/bin/bash # Description: Verify that `MIN_BRIDGE_AMOUNT` is consistently used across other relevant parts of the system. # Test: Search for usage of `MIN_BRIDGE_AMOUNT` across the project. Expect: Consistent usage in relevant parts. rg --type ts $'MIN_BRIDGE_AMOUNT'Length of output: 517
Description
In cross chain transfers, there is always a minimum amount to be transferred so that transfer never fail. We are defining it for some chains which are not being calculated correctly by
@moonbeam/sdk
package. Except this, minimum amount for other cross chain combinations are being calculated correctly.Summary by CodeRabbit
New Features
Improvements
Enhancements
MIN_BRIDGE_AMOUNT
for calculating minimum asset amounts before formatting units.