@@ -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