sablier-labs / flow

🍃 Smart contracts of the Sablier Flow protocol.
Other
8 stars 0 forks source link

DRY'ify `Vars` struct #275

Closed smol-ninja closed 5 days ago

smol-ninja commented 2 weeks ago

We now have a common pattern at multiple places where the following struct is used to avoid stack too deep error. We should look into DRY'ifying the same, if possible.

struct Vars {
    IERC20 token;
    uint40 previousSnapshotTime;
    uint128 previousTotalDebt;
    uint256 previousAggregateAmount;
    uint128 expectedProtocolRevenue;
    uint256 initialTokenBalance;
    uint40 expectedSnapshotTime;
    uint128 expectedTotalDebt;
    uint128 expectedStreamBalance;
    uint256 expectedTokenBalance;
}