Skip to content

Commit

Permalink
Merge pull request #99 from sablier-labs/fix/transfer-amount-uint160
Browse files Browse the repository at this point in the history
fix: transfer amount uint160
  • Loading branch information
PaulRBerg committed Jun 28, 2023
2 parents 453a35e + 25dc4b9 commit 6bfb8ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/SablierV2ProxyTarget.sol
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ contract SablierV2ProxyTarget is
// Calculate the sum of all of stream amounts. It is safe to use unchecked addition because one of the create
// transactions will revert if there is overflow.
uint256 i;
uint128 transferAmount;
uint160 transferAmount;
for (i = 0; i < batchSize;) {
unchecked {
transferAmount += batch[i].totalAmount;
Expand Down Expand Up @@ -220,7 +220,7 @@ contract SablierV2ProxyTarget is
// Calculate the sum of all of stream amounts. It is safe to use unchecked addition because one of the create
// transactions will revert if there is overflow.
uint256 i;
uint128 transferAmount;
uint160 transferAmount;
for (i = 0; i < batchSize;) {
unchecked {
transferAmount += batch[i].totalAmount;
Expand Down Expand Up @@ -391,7 +391,7 @@ contract SablierV2ProxyTarget is
// Calculate the sum of all of stream amounts. It is safe to use unchecked addition because one of the create
// transactions will revert if there is overflow.
uint256 i;
uint128 transferAmount;
uint160 transferAmount;
for (i = 0; i < batchSize;) {
unchecked {
transferAmount += batch[i].totalAmount;
Expand Down Expand Up @@ -446,7 +446,7 @@ contract SablierV2ProxyTarget is
// Calculate the sum of all of stream amounts. It is safe to use unchecked addition because one of the create
// transactions will revert if there is overflow.
uint256 i;
uint128 transferAmount;
uint160 transferAmount;
for (i = 0; i < batchSize;) {
unchecked {
transferAmount += batch[i].totalAmount;
Expand Down

0 comments on commit 6bfb8ec

Please sign in to comment.