Skip to content

Commit 443adb8

Browse files
committed
Standardize data types
1 parent 9832b0f commit 443adb8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

contracts/finance/VestingWalletCliffConfidential.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ abstract contract VestingWalletCliffConfidential is VestingWalletConfidential {
6060
* effect from calling the inherited implementation (i.e. `super._vestingSchedule`). Carefully consider
6161
* this caveat if the overridden implementation of this function has any (e.g. writing to memory or reverting).
6262
*/
63-
function _vestingSchedule(euint128 totalAllocation, uint64 timestamp) internal virtual override returns (euint128) {
63+
function _vestingSchedule(euint128 totalAllocation, uint48 timestamp) internal virtual override returns (euint128) {
6464
return timestamp < cliff() ? euint128.wrap(0) : super._vestingSchedule(totalAllocation, timestamp);
6565
}
6666

contracts/finance/VestingWalletConfidential.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ abstract contract VestingWalletConfidential is OwnableUpgradeable, ReentrancyGua
6565
* {IConfidentialFungibleToken} contract.
6666
*/
6767
function releasable(address token) public virtual returns (euint64) {
68-
euint128 vestedAmount_ = vestedAmount(token, uint64(block.timestamp));
68+
euint128 vestedAmount_ = vestedAmount(token, uint48(block.timestamp));
6969
euint128 releasedAmount = released(token);
7070
ebool success = FHE.ge(vestedAmount_, releasedAmount);
7171
return FHE.select(success, FHE.asEuint64(FHE.sub(vestedAmount_, releasedAmount)), FHE.asEuint64(0));
@@ -93,7 +93,7 @@ abstract contract VestingWalletConfidential is OwnableUpgradeable, ReentrancyGua
9393
* @dev Calculates the amount of tokens that have been vested at the given timestamp.
9494
* Default implementation is a linear vesting curve.
9595
*/
96-
function vestedAmount(address token, uint64 timestamp) public virtual returns (euint128) {
96+
function vestedAmount(address token, uint48 timestamp) public virtual returns (euint128) {
9797
return
9898
_vestingSchedule(
9999
FHE.add(
@@ -129,7 +129,7 @@ abstract contract VestingWalletConfidential is OwnableUpgradeable, ReentrancyGua
129129
}
130130

131131
/// @dev This returns the amount vested, as a function of time, for an asset given its total historical allocation.
132-
function _vestingSchedule(euint128 totalAllocation, uint64 timestamp) internal virtual returns (euint128) {
132+
function _vestingSchedule(euint128 totalAllocation, uint48 timestamp) internal virtual returns (euint128) {
133133
if (timestamp < start()) {
134134
return euint128.wrap(0);
135135
} else if (timestamp >= end()) {

0 commit comments

Comments
 (0)