-
Notifications
You must be signed in to change notification settings - Fork 446
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
fix: constrain max mint limit for super XERC20 #5492
base: ccip-warp-route
Are you sure you want to change the base?
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## ccip-warp-route #5492 +/- ##
================================================
Coverage 77.11% 77.11%
================================================
Files 109 109
Lines 2163 2163
Branches 193 193
================================================
Hits 1668 1668
Misses 474 474
Partials 21 21
🚀 New features to boost your workflow:
|
destinationBalance = await adapter.getMintLimit(); | ||
|
||
if ( | ||
destinationToken.standard === TokenStandard.EvmHypVSXERC20 || |
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.
How will this standard get set? Right now, it is not yeah? wouldn't we need a corresponding change in the warp core config artifact?
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.
yes, the config artifact is only in the UI afaik?
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.
this doesnt need to be urgently merged as @Xaroz already made the change on the UI
this just protects against onchain limit changes
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.
I have asked @Xaroz to make this change and test with the UI.
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.
tested in our UI and seems to work fine
### Description Fix broken test by adding `EvmHypVSXERC20` and `EvmHypVSXERC20Lockbox` token standards to getHypAdapter <!-- What's included in this PR? --> ### Drive-by changes <!-- Are there any minor or drive-by changes also included? --> ### Related issues <!-- - Fixes #[issue number here] --> ### Backward compatibility <!-- Are these changes backward compatible? Are there any infrastructure implications, e.g. changes that would prohibit deploying older commits using this infra tooling? Yes/No --> ### Testing <!-- What kind of testing have these changes undergone? None/Manual/Unit Tests --> UI test
### Description <!-- What's included in this PR? --> Add rate limit message to `validateDestinationCollateral` depending if the token standard is is part of `MINT_LIMITED_STANDARDS`, I decided to put this here instead of modifying `isDestinationCollateralSufficient` because these were used on other places (like the [UI](https://github.com/hyperlane-xyz/hyperlane-warp-ui-template/blob/fa79e3b4e57460e6995f01eda8b0a74f1e6acd28/src/features/transfer/useTokenTransfer.ts#L121)) ### Drive-by changes <!-- Are there any minor or drive-by changes also included? --> Clean up condition check to use less code ### Related issues <!-- - Fixes #[issue number here] --> ### Backward compatibility <!-- Are these changes backward compatible? Are there any infrastructure implications, e.g. changes that would prohibit deploying older commits using this infra tooling? Yes/No --> Yes ### Testing <!-- What kind of testing have these changes undergone? None/Manual/Unit Tests --> UI 
Description
Related issues
Backward compatibility
Yes
Testing
TODO