Skip to content

Commit

Permalink
removed code duplication from rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
aalavandhan committed May 22, 2022
1 parent fa89adb commit bf32adc
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 25 deletions.
2 changes: 1 addition & 1 deletion spot-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ yarn coverage

# Run solidity gas usage report
yarn profile
```
```
2 changes: 1 addition & 1 deletion spot-contracts/contracts/PerpetualTranche.sol
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ contract PerpetualTranche is ERC20Upgradeable, OwnableUpgradeable, IPerpetualTra
if (_depositBond != newBond && _isAcceptableForRedemptionQueue(newBond)) {
// Storage optimization: Zeroing out mint amounts
// from the previous deposit bond
if(address(_depositBond) != address(0)){
if (address(_depositBond) != address(0)) {
TrancheData memory td = _depositBond.getTrancheData();
for (uint8 i = 0; i < td.trancheCount; i++) {
delete _totalMintAmtPerTranche[td.tranches[i]];
Expand Down
1 change: 1 addition & 0 deletions spot-contracts/contracts/RouterV1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ contract RouterV1 {
RolloverPreview memory r;
IERC20Upgradeable feeToken = perp.feeToken();
int256 rolloverFee;
uint256 rolloverPerpAmtRemainder;

r.remainingTrancheInAmt = trancheInAmt;

Expand Down
15 changes: 0 additions & 15 deletions spot-contracts/contracts/_utils/AddressQueueHelpers.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,6 @@ error InvalidItem();
/// @param item Item to be inserted into the address queue.
error DuplicateItem(address item);

/// @notice Expected queue to not be empty.
error EmptyQueue();

/// @notice Expected accessed index to be within the queue's length bounds.
/// @param index Index of the item in the queue.
/// @param length Number of elements in the queue.
error IndexOutOfBounds(uint256 index, uint256 length);

/// @notice Expected item to not be `address(0)`.
error InvalidItem();

/// @notice Expected item to not be part of the queue.
/// @param item Item to be inserted into the address queue.
error DuplicateItem(address item);

/// @notice Expected queue to not be empty.
error EmptyQueue();

Expand Down
9 changes: 1 addition & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -879,14 +879,7 @@ __metadata:
languageName: node
linkType: hard

"@openzeppelin/contracts-upgradeable@npm:^4.1.0, @openzeppelin/contracts-upgradeable@npm:^4.3.0":
version: 4.6.0
resolution: "@openzeppelin/contracts-upgradeable@npm:4.6.0"
checksum: f9802c9cccf31bd475412ba5d862ed15eed5352302c30b29c38f84aed2dcfe0d957687935a72068f3d44292a4a55b0ff26cd018b2e14a47f16f74f087009aa29
languageName: node
linkType: hard

"@openzeppelin/contracts-upgradeable@npm:^4.6.0":
"@openzeppelin/contracts-upgradeable@npm:^4.1.0, @openzeppelin/contracts-upgradeable@npm:^4.3.0, @openzeppelin/contracts-upgradeable@npm:^4.6.0":
version: 4.6.0
resolution: "@openzeppelin/contracts-upgradeable@npm:4.6.0"
checksum: f9802c9cccf31bd475412ba5d862ed15eed5352302c30b29c38f84aed2dcfe0d957687935a72068f3d44292a4a55b0ff26cd018b2e14a47f16f74f087009aa29
Expand Down

0 comments on commit bf32adc

Please sign in to comment.