Open
Conversation
tjcloa
requested changes
Dec 18, 2024
Contributor
tjcloa
left a comment
There was a problem hiding this comment.
pls sync from the target branch.
changes requested, see comments.
Comment on lines
161
to
163
| /* | ||
| * @notice set the user's block number for opening, and do check & reset to 0 for closing | ||
| * |
Contributor
There was a problem hiding this comment.
Suggested change
| /* | |
| * @notice set the user's block number for opening, and do check & reset to 0 for closing | |
| * | |
| /* | |
| * @notice set the user's block number for opening or increasing LoCs, and do check & reset to 0 for closing or decreasing | |
| * |
contracts/BorrowerOperations.sol
Outdated
Comment on lines
166
to
167
| function notInTheSameBlockHandler(bool _isOpening) private { | ||
| if(_isOpening) { |
Contributor
There was a problem hiding this comment.
Suggested change
| function notInTheSameBlockHandler(bool _isOpening) private { | |
| if(_isOpening) { | |
| function notInTheSameBlockHandler(bool _openOrIncrease) private { | |
| if(_openOrIncrease) { |
contracts/BorrowerOperations.sol
Outdated
| } else { | ||
| if(userBlockNumber[tx.origin] > 0) { | ||
| if(userBlockNumber[tx.origin] == block.number) { | ||
| revert("ZeroProtocolMutex: mutex locked"); |
Contributor
There was a problem hiding this comment.
Suggested change
| revert("ZeroProtocolMutex: mutex locked"); | |
| revert("Recovery mode mutex locked. Try in another block"); |
Comment on lines
40
to
44
| /* | ||
| * to store the user's block number | ||
| */ | ||
| mapping(address => uint256) public userBlockNumber; | ||
| } |
Contributor
There was a problem hiding this comment.
Suggested change
| /* | |
| * to store the user's block number | |
| */ | |
| mapping(address => uint256) public userBlockNumber; | |
| } | |
| /* | |
| * Store the LoC block number on open/increase when in the Recovery mode | |
| */ | |
| mapping(address => uint256) public recoveryModeMutex; | |
| } |
contracts/BorrowerOperations.sol
Outdated
| * | ||
| * @dev This is the function will be called by the open, close, increase, decrease trove function | ||
| */ | ||
| function notInTheSameBlockHandler(bool _isOpening) private { |
Contributor
There was a problem hiding this comment.
Suggested change
| function notInTheSameBlockHandler(bool _isOpening) private { | |
| function recoveryModeMutexHandler(bool _isOpening) private { |
remove unused test instruction
6b5079e to
9c5e883
Compare
tjcloa
requested changes
Dec 25, 2024
2 address comment review
tjcloa
reviewed
Dec 29, 2024
| IPriceFeedTestnet(_priceFeed).setPrice(1e8); | ||
|
|
||
| // repayZusd will affect(decrease) the debt, should revert due to reentrancy violation | ||
| borrowerOperations.repayZUSD(_ZUSDAmount, _upperHint, _lowerHint); |
Contributor
There was a problem hiding this comment.
this test covers only one case: open trove - repay debt.
but is missing increase debt - repay.
and open trove - increase debt - repay debt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.