Skip to content

Commit

Permalink
Merge pull request #10 from symbioticfi/tests
Browse files Browse the repository at this point in the history
Minor fix
  • Loading branch information
1kresh authored Jul 12, 2024
2 parents 3c6ff25 + 1e650eb commit 4596753
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/contracts/libraries/Checkpoints.sol
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ library Checkpoints {
function upperLookupRecentCheckpoint(
Trace208 storage self,
uint48 key
) internal view returns (bool, uint48, uint208, uint256) {
) internal view returns (bool, uint48, uint208, uint32) {
uint256 len = self._trace._checkpoints.length;

uint256 low = 0;
Expand All @@ -94,7 +94,7 @@ library Checkpoints {
}

OZCheckpoints.Checkpoint208 memory checkpoint = _unsafeAccess(self._trace._checkpoints, pos - 1);
return (true, checkpoint._key, checkpoint._value, pos - 1);
return (true, checkpoint._key, checkpoint._value, uint32(pos - 1));
}

/**
Expand Down Expand Up @@ -177,7 +177,7 @@ library Checkpoints {
function upperLookupRecentCheckpoint(
Trace256 storage self,
uint48 key
) internal view returns (bool, uint48, uint256, uint256) {
) internal view returns (bool, uint48, uint256, uint32) {
uint256 len = self._trace._checkpoints.length;

uint256 low = 0;
Expand All @@ -199,7 +199,7 @@ library Checkpoints {
}

OZCheckpoints.Checkpoint208 memory checkpoint = _unsafeAccess(self._trace._checkpoints, pos - 1);
return (true, checkpoint._key, self._values[checkpoint._value], pos - 1);
return (true, checkpoint._key, self._values[checkpoint._value], uint32(pos - 1));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/vault/VaultStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ contract VaultStorage is IVaultStorage {
function activeSharesOfCheckpointAt(
address account,
uint48 timestamp
) external view returns (bool, uint48, uint256, uint256) {
) external view returns (bool, uint48, uint256, uint32) {
return _activeSharesOf[account].upperLookupRecentCheckpoint(timestamp);
}

Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/vault/IVaultStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ interface IVaultStorage {
function activeSharesOfCheckpointAt(
address account,
uint48 timestamp
) external view returns (bool, uint48, uint256, uint256);
) external view returns (bool, uint48, uint256, uint32);

/**
* @notice Get an amount of active shares for a particular account.
Expand Down

0 comments on commit 4596753

Please sign in to comment.