@@ -78,7 +78,7 @@ contract Drips is Managed, Streams, Splits {
78
78
uint8 public constant DRIVER_ID_OFFSET = 224 ;
79
79
/// @notice The total amount the protocol can store of each token.
80
80
/// It's the minimum of _MAX_STREAMS_BALANCE and _MAX_SPLITS_BALANCE.
81
- uint128 public constant MAX_TOTAL_BALANCE = _MAX_STREAMS_BALANCE;
81
+ uint256 public constant MAX_TOTAL_BALANCE = _MAX_STREAMS_BALANCE;
82
82
/// @notice On every timestamp `T`, which is a multiple of `cycleSecs`, the receivers
83
83
/// gain access to steams received during `T - cycleSecs` to `T - 1`.
84
84
/// Always higher than 1.
@@ -232,7 +232,7 @@ contract Drips is Managed, Streams, Splits {
232
232
public
233
233
view
234
234
onlyProxy
235
- returns (uint128 streamsBalance , uint128 splitsBalance )
235
+ returns (uint256 streamsBalance , uint256 splitsBalance )
236
236
{
237
237
Balance storage balance = _dripsStorage ().balances[erc20];
238
238
return (balance.streams, balance.splits);
@@ -294,7 +294,7 @@ contract Drips is Managed, Streams, Splits {
294
294
/// @param erc20 The used ERC-20 token.
295
295
/// @param amt The amount to increase the streams or splits balance by.
296
296
function _verifyBalanceIncrease (IERC20 erc20 , uint128 amt ) internal view {
297
- (uint256 streamsBalance , uint128 splitsBalance ) = balances (erc20);
297
+ (uint256 streamsBalance , uint256 splitsBalance ) = balances (erc20);
298
298
uint256 newTotalBalance = streamsBalance + splitsBalance + amt;
299
299
require (newTotalBalance <= MAX_TOTAL_BALANCE, "Total balance too high " );
300
300
require (newTotalBalance <= erc20.balanceOf (address (this )), "Token balance too low " );
@@ -316,7 +316,7 @@ contract Drips is Managed, Streams, Splits {
316
316
/// It must be at most the difference between the balance of the token held by the Drips
317
317
/// contract address and the sum of balances managed by the protocol as indicated by `balances`.
318
318
function withdraw (IERC20 erc20 , address receiver , uint256 amt ) public onlyProxy {
319
- (uint128 streamsBalance , uint128 splitsBalance ) = balances (erc20);
319
+ (uint256 streamsBalance , uint256 splitsBalance ) = balances (erc20);
320
320
uint256 withdrawable = erc20.balanceOf (address (this )) - streamsBalance - splitsBalance;
321
321
require (amt <= withdrawable, "Withdrawal amount too high " );
322
322
emit Withdrawn (erc20, receiver, amt);
0 commit comments