Skip to content

Commit bb06f20

Browse files
authored
Increase integer size for _tokenReleased (#120)
1 parent 88dc08d commit bb06f20

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

contracts/finance/VestingWalletConfidential.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {IConfidentialFungibleToken} from "./../interfaces/IConfidentialFungibleT
2525
abstract contract VestingWalletConfidential is OwnableUpgradeable, ReentrancyGuardTransient {
2626
/// @custom:storage-location erc7201:openzeppelin.storage.VestingWalletConfidential
2727
struct VestingWalletStorage {
28-
mapping(address token => euint64) _tokenReleased;
28+
mapping(address token => euint128) _tokenReleased;
2929
uint64 _start;
3030
uint64 _duration;
3131
}
@@ -53,7 +53,7 @@ abstract contract VestingWalletConfidential is OwnableUpgradeable, ReentrancyGua
5353
}
5454

5555
/// @dev Amount of token already released
56-
function released(address token) public view virtual returns (euint64) {
56+
function released(address token) public view virtual returns (euint128) {
5757
return _getVestingWalletStorage()._tokenReleased[token];
5858
}
5959

@@ -75,7 +75,7 @@ abstract contract VestingWalletConfidential is OwnableUpgradeable, ReentrancyGua
7575
FHE.allowTransient(amount, token);
7676
euint64 amountSent = IConfidentialFungibleToken(token).confidentialTransfer(owner(), amount);
7777

78-
euint64 newReleasedAmount = FHE.add(released(token), amountSent);
78+
euint128 newReleasedAmount = FHE.add(released(token), amountSent);
7979
FHE.allow(newReleasedAmount, owner());
8080
FHE.allowThis(newReleasedAmount);
8181
_getVestingWalletStorage()._tokenReleased[token] = newReleasedAmount;

0 commit comments

Comments
 (0)