-
Notifications
You must be signed in to change notification settings - Fork 16
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: PP_Queue_v1 & PP_Queue_ManualExecution #708
Feat: PP_Queue_v1 & PP_Queue_ManualExecution #708
Conversation
- The function `handleCollateralTokensAfterSell` was still expecting to transfer collateral, which would revert in the current implementation. - The _sellOrder` function had a conditional check which would let the contract revert given there will not be any collateral in the contract
Feat: Add collateral transfer to treasury
…ting Queue, Execute Queue
/// @notice Validates a payment order. | ||
/// @param order_ The order to validate. | ||
/// @return valid_ True if the order is valid. | ||
function _validPaymentOrder(QueuedOrder memory order_) |
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.
Might be missing something but we are not using this anywhere
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 function called within the internal function are also not utilized, like the _validateFlagsAndData()
- _orderExists would return true as it was even if the order didn't exist (which had orderId = 0) - Now we verify: 1. The order belongs to the specified client (order.client_ == address(client_)) 2. The order has been initialized (order.timestamp_ != 0)
- Checking if the queue is initialized by looking at the sentinel position in the queue's list mapping - If the sentinel position is 0, it means the queue is uninitialized, so we revert with our own error - Only if the queue is initialized, we proceed to get the head of the queue
What has been done: - Add Queue operator, queue operator admin role and getters - refactor internal _validPaymentOrder() and call the function in different funcitons to replace individual validation statements - Remove timestamp from event emit - Update natspec across different functions - Refactor _validateFlagsAndData() to return boolean instead of revert - Remove unused imports
What has been done: - Remove duplicate check for 0 order ID - Change revert in _validPaymentToken() to return boolean instead
- Fix main configuration and role assignments in E2E tests - Reorganize preconditions for better test structure - Fix and enable 8 test cases in QueueBaseFundingManagerAndPaymentProcessorE2E - Improve role assignment logic with correct module addresses - Clean up test initialization and setup process - Ensure proper role hierarchy in _setadminroles function - Format code
What has been done? - Add addresses, getters and setters for cancelled and failed order treasuries - fix _orders mapping to work with multiple clients - Add function to claim unclaimableAmount from blacklisted address to the right treasury - Refactor cancelPaymentOrderThroughQueueId - Refactor _executePaymentTransfer such that transfers are handled seperately, as transfers are needed across the module
This branch got merged into the ZealynxSecurity/Feature/FM_PC_ExternalPrice feature branch, for which a PR is open here |
What has been done?
Relevant Links