Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add CCTP rebalancing to RFQ relayer #2073
Add CCTP rebalancing to RFQ relayer #2073
Changes from 14 commits
3a73d21
6664fd9
91017b7
f7d56f2
cbf01e7
512fb30
536f227
1e9e1d6
708eab0
eabdda0
1f7c3a3
44be2b3
d2acc79
4ad03dc
7c0cf7e
fda6f90
4db711f
06e8e57
6b38ba5
90a63e6
6c70e96
3d561b0
e5868de
eca3b63
383ece0
0095c7c
58c8a7f
5aeb2c5
baab066
752763b
ab90a63
989c2d5
73e027d
a4e308c
03891fb
c9ca663
81cfc79
3a6ea21
42f24ce
ed841c8
628733d
efaf3bd
1e7175f
5c99c21
8fcfbcb
88de62a
ce32aa9
819dd14
5f4486b
c8f2c67
b7dd419
53e8129
2e33da3
45c2ad9
ba58876
4febe40
000549f
ceb8479
19dc080
085ac5e
782b869
6195502
07dbaeb
7a9a30b
f2d7ab8
cd760c2
4055168
7ff3b2a
d91525a
ecbdc0e
edeeb0e
5743f58
d8deade
e1296a4
edae452
ab2a9ab
996a82b
93a1e04
b0f9d22
3285fe6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Sure
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.
The
Rebalance
method is a significant addition, implementing the core functionality of token rebalancing. It's crucial to ensure this method is thoroughly tested, especially given its impact on the inventory management system's reliability and accuracy.Would you like assistance in creating unit tests for the
Rebalance
method?Check failure on line 149 in services/rfq/relayer/inventory/manager.go
Check failure on line 190 in services/rfq/relayer/inventory/manager.go
Check failure on line 202 in services/rfq/relayer/inventory/manager.go
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.
The updated logic in
ApproveAllTokens
to handle approvals for both RFQ and CCTP bridges is crucial for the new functionality. Ensure that error handling is robust, especially in the context of transaction submissions. Consider adding more detailed logging for each step to aid in debugging and monitoring.Consider enhancing error logging with more context, such as the chain ID and token address, to improve traceability in case of failures.
Check failure on line 293 in services/rfq/relayer/inventory/manager.go
Check warning on line 310 in services/rfq/relayer/inventory/manager.go
Check failure on line 340 in services/rfq/relayer/inventory/manager.go
Check failure on line 343 in services/rfq/relayer/inventory/manager.go
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.
The
rebalanceCCTP
method performs the actual rebalancing operation using the CCTP bridge. Ensure that the contract interaction logic is secure and correctly handles potential errors. The use of placeholders (0
and[]byte{}
) in theSendCircleToken
call should be reviewed and replaced with actual values if necessary.Consider replacing the placeholders in the
SendCircleToken
call with actual values or configurations, as these might impact the functionality of the rebalancing operation.