diff --git a/.gas-snapshot b/.gas-snapshot index 108269f64..36efba67a 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -1,254 +1,245 @@ -Burn_LockupDynamic_Integration_Concrete_Test:test_Burn_CallerApprovedOperator() (gas: 87490) -Burn_LockupDynamic_Integration_Concrete_Test:test_Burn_CallerNFTOwner() (gas: 78074) -Burn_LockupDynamic_Integration_Concrete_Test:test_Burn_NonTransferableNFT() (gas: 78083) -Burn_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_NFTDoesNotExist() (gas: 79288) +Burn_LockupDynamic_Integration_Concrete_Test:test_Burn_CallerApprovedOperator() (gas: 87467) +Burn_LockupDynamic_Integration_Concrete_Test:test_Burn_CallerNFTOwner() (gas: 78051) +Burn_LockupDynamic_Integration_Concrete_Test:test_Burn_NonTransferableNFT() (gas: 78060) +Burn_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_NFTDoesNotExist() (gas: 79265) Burn_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11325) Burn_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StatusCanceled() (gas: 90245) Burn_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StatusPending() (gas: 14289) -Burn_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StatusSettled() (gas: 19525) -Burn_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StatusStreaming() (gas: 19561) -Burn_LockupLinear_Integration_Concrete_Test:test_Burn_CallerApprovedOperator() (gas: 87770) -Burn_LockupLinear_Integration_Concrete_Test:test_Burn_CallerNFTOwner() (gas: 78343) -Burn_LockupLinear_Integration_Concrete_Test:test_Burn_NonTransferableNFT() (gas: 78352) -Burn_LockupLinear_Integration_Concrete_Test:test_RevertGiven_NFTDoesNotExist() (gas: 79539) +Burn_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StatusSettled() (gas: 19502) +Burn_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StatusStreaming() (gas: 19583) +Burn_LockupLinear_Integration_Concrete_Test:test_Burn_CallerApprovedOperator() (gas: 87747) +Burn_LockupLinear_Integration_Concrete_Test:test_Burn_CallerNFTOwner() (gas: 78320) +Burn_LockupLinear_Integration_Concrete_Test:test_Burn_NonTransferableNFT() (gas: 78329) +Burn_LockupLinear_Integration_Concrete_Test:test_RevertGiven_NFTDoesNotExist() (gas: 79516) Burn_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11311) Burn_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StatusCanceled() (gas: 81013) Burn_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StatusPending() (gas: 14275) -Burn_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StatusSettled() (gas: 19511) -Burn_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StatusStreaming() (gas: 19547) -CancelMultiple_LockupDynamic_Integration_Concrete_Test:test_CancelMultiple() (gas: 833032) +Burn_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StatusSettled() (gas: 19488) +Burn_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StatusStreaming() (gas: 19569) +CancelMultiple_LockupDynamic_Integration_Concrete_Test:test_CancelMultiple() (gas: 832905) CancelMultiple_LockupDynamic_Integration_Concrete_Test:test_CancelMultiple_ArrayCountZero() (gas: 6271) -CancelMultiple_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_AllStreamsCold() (gas: 32346) -CancelMultiple_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_AllStreamsNotCancelable() (gas: 859296) +CancelMultiple_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_AllStreamsCold() (gas: 32323) +CancelMultiple_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_AllStreamsNotCancelable() (gas: 858977) CancelMultiple_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_OnlyNull() (gas: 12362) CancelMultiple_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_SomeNull() (gas: 78511) -CancelMultiple_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_SomeStreamsCold() (gas: 341157) -CancelMultiple_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_SomeStreamsNotCancelable() (gas: 945711) -CancelMultiple_LockupDynamic_Integration_Fuzz_Test:testFuzz_CancelMultiple(uint256,uint40) (runs: 50, μ: 1196571, ~: 1201304) -CancelMultiple_LockupLinear_Integration_Concrete_Test:test_CancelMultiple() (gas: 565457) +CancelMultiple_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_SomeStreamsCold() (gas: 341083) +CancelMultiple_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_SomeStreamsNotCancelable() (gas: 945392) +CancelMultiple_LockupDynamic_Integration_Fuzz_Test:testFuzz_CancelMultiple(uint256,uint40) (runs: 50, μ: 1193272, ~: 1199808) +CancelMultiple_LockupLinear_Integration_Concrete_Test:test_CancelMultiple() (gas: 565330) CancelMultiple_LockupLinear_Integration_Concrete_Test:test_CancelMultiple_ArrayCountZero() (gas: 6294) -CancelMultiple_LockupLinear_Integration_Concrete_Test:test_RevertGiven_AllStreamsCold() (gas: 32494) -CancelMultiple_LockupLinear_Integration_Concrete_Test:test_RevertGiven_AllStreamsNotCancelable() (gas: 572656) +CancelMultiple_LockupLinear_Integration_Concrete_Test:test_RevertGiven_AllStreamsCold() (gas: 32471) +CancelMultiple_LockupLinear_Integration_Concrete_Test:test_RevertGiven_AllStreamsNotCancelable() (gas: 572337) CancelMultiple_LockupLinear_Integration_Concrete_Test:test_RevertGiven_OnlyNull() (gas: 12391) CancelMultiple_LockupLinear_Integration_Concrete_Test:test_RevertGiven_SomeNull() (gas: 78577) -CancelMultiple_LockupLinear_Integration_Concrete_Test:test_RevertGiven_SomeStreamsCold() (gas: 245358) -CancelMultiple_LockupLinear_Integration_Concrete_Test:test_RevertGiven_SomeStreamsNotCancelable() (gas: 657145) -CancelMultiple_LockupLinear_Integration_Fuzz_Test:testFuzz_CancelMultiple(uint256,uint40) (runs: 50, μ: 797212, ~: 798269) -Cancel_LockupDynamic_Integration_Concrete_Test:test_Cancel() (gas: 386086) -Cancel_LockupDynamic_Integration_Concrete_Test:test_Cancel_RecipientDoesNotImplementHook() (gas: 371238) -Cancel_LockupDynamic_Integration_Concrete_Test:test_Cancel_RecipientNotContract() (gas: 97103) -Cancel_LockupDynamic_Integration_Concrete_Test:test_Cancel_RecipientReentrancy() (gas: 373429) -Cancel_LockupDynamic_Integration_Concrete_Test:test_Cancel_RecipientReverts() (gas: 371805) +CancelMultiple_LockupLinear_Integration_Concrete_Test:test_RevertGiven_SomeStreamsCold() (gas: 245284) +CancelMultiple_LockupLinear_Integration_Concrete_Test:test_RevertGiven_SomeStreamsNotCancelable() (gas: 656826) +CancelMultiple_LockupLinear_Integration_Fuzz_Test:testFuzz_CancelMultiple(uint256,uint40) (runs: 50, μ: 796137, ~: 797068) +Cancel_LockupDynamic_Integration_Concrete_Test:test_Cancel() (gas: 386034) +Cancel_LockupDynamic_Integration_Concrete_Test:test_Cancel_RecipientDoesNotImplementHook() (gas: 371186) +Cancel_LockupDynamic_Integration_Concrete_Test:test_Cancel_RecipientNotContract() (gas: 97125) +Cancel_LockupDynamic_Integration_Concrete_Test:test_Cancel_RecipientReentrancy() (gas: 373377) +Cancel_LockupDynamic_Integration_Concrete_Test:test_Cancel_RecipientReverts() (gas: 371753) Cancel_LockupDynamic_Integration_Concrete_Test:test_Cancel_StatusPending() (gas: 76356) Cancel_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11321) Cancel_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StatusCanceled() (gas: 87331) -Cancel_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StatusDepleted() (gas: 67976) -Cancel_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StatusSettled() (gas: 27022) -Cancel_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StreamNotCancelable() (gas: 261461) -Cancel_LockupDynamic_Integration_Fuzz_Test:testFuzz_Cancel(uint256,uint128) (runs: 50, μ: 452520, ~: 454733) -Cancel_LockupDynamic_Integration_Fuzz_Test:testFuzz_Cancel_StatusPending(uint256) (runs: 50, μ: 76862, ~: 76937) -Cancel_LockupLinear_Integration_Concrete_Test:test_Cancel() (gas: 269459) -Cancel_LockupLinear_Integration_Concrete_Test:test_Cancel_RecipientDoesNotImplementHook() (gas: 254587) -Cancel_LockupLinear_Integration_Concrete_Test:test_Cancel_RecipientNotContract() (gas: 77523) -Cancel_LockupLinear_Integration_Concrete_Test:test_Cancel_RecipientReentrancy() (gas: 256767) -Cancel_LockupLinear_Integration_Concrete_Test:test_Cancel_RecipientReverts() (gas: 255154) +Cancel_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StatusDepleted() (gas: 67953) +Cancel_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StatusSettled() (gas: 26999) +Cancel_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StreamNotCancelable() (gas: 261387) +Cancel_LockupDynamic_Integration_Fuzz_Test:testFuzz_Cancel(uint256,uint128) (runs: 50, μ: 453460, ~: 454703) +Cancel_LockupDynamic_Integration_Fuzz_Test:testFuzz_Cancel_StatusPending(uint256) (runs: 50, μ: 76876, ~: 77083) +Cancel_LockupLinear_Integration_Concrete_Test:test_Cancel() (gas: 269407) +Cancel_LockupLinear_Integration_Concrete_Test:test_Cancel_RecipientDoesNotImplementHook() (gas: 254535) +Cancel_LockupLinear_Integration_Concrete_Test:test_Cancel_RecipientNotContract() (gas: 77545) +Cancel_LockupLinear_Integration_Concrete_Test:test_Cancel_RecipientReentrancy() (gas: 256715) +Cancel_LockupLinear_Integration_Concrete_Test:test_Cancel_RecipientReverts() (gas: 255102) Cancel_LockupLinear_Integration_Concrete_Test:test_Cancel_StatusPending() (gas: 76441) Cancel_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11307) Cancel_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StatusCanceled() (gas: 78102) -Cancel_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StatusDepleted() (gas: 68238) -Cancel_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StatusSettled() (gas: 27130) -Cancel_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StreamNotCancelable() (gas: 185625) -Cancel_LockupLinear_Integration_Fuzz_Test:testFuzz_Cancel(uint256,uint128) (runs: 50, μ: 309321, ~: 310032) -Cancel_LockupLinear_Integration_Fuzz_Test:testFuzz_Cancel_StatusPending(uint256) (runs: 50, μ: 77016, ~: 77168) -ClaimProtocolRevenues_LockupDynamic_Integration_Concrete_Test:test_ClaimProtocolRevenues() (gas: 319657) +Cancel_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StatusDepleted() (gas: 68215) +Cancel_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StatusSettled() (gas: 27107) +Cancel_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StreamNotCancelable() (gas: 185551) +Cancel_LockupLinear_Integration_Fuzz_Test:testFuzz_Cancel(uint256,uint128) (runs: 50, μ: 310087, ~: 309980) +Cancel_LockupLinear_Integration_Fuzz_Test:testFuzz_Cancel_StatusPending(uint256) (runs: 50, μ: 77030, ~: 77168) +ClaimProtocolRevenues_LockupDynamic_Integration_Concrete_Test:test_ClaimProtocolRevenues() (gas: 319605) ClaimProtocolRevenues_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_ProtocolRevenuesZero() (gas: 18907) -ClaimProtocolRevenues_LockupLinear_Integration_Concrete_Test:test_ClaimProtocolRevenues() (gas: 246434) +ClaimProtocolRevenues_LockupLinear_Integration_Concrete_Test:test_ClaimProtocolRevenues() (gas: 246382) ClaimProtocolRevenues_LockupLinear_Integration_Concrete_Test:test_RevertGiven_ProtocolRevenuesZero() (gas: 18915) -Constructor_LockupDynamic_Integration_Concrete_Test:test_Constructor() (gas: 5375661) +Constructor_LockupDynamic_Integration_Concrete_Test:test_Constructor() (gas: 5375705) Constructor_LockupLinear_Integration_Concrete_Test:test_Constructor() (gas: 4181201) -CreateWithDeltas_LockupDynamic_Integration_Concrete_Test:test_CreateWithDeltas() (gas: 380563) -CreateWithDeltas_LockupDynamic_Integration_Fuzz_Test:testFuzz_CreateWithDeltas((uint128,uint64,uint40)[]) (runs: 50, μ: 4094598, ~: 3552269) -CreateWithDurations_LockupLinear_Integration_Concrete_Test:test_CreateWithDurations() (gas: 287570) -CreateWithDurations_LockupLinear_Integration_Fuzz_Test:testFuzz_CreateWithDurations((uint40,uint40)) (runs: 50, μ: 286462, ~: 286521) -CreateWithMilestones_LockupDynamic_Integration_Concrete_Test:test_CreateWithMilestones() (gas: 370909) -CreateWithMilestones_LockupDynamic_Integration_Concrete_Test:test_CreateWithMilestones_AssetMissingReturnValue() (gas: 377697) -CreateWithMilestones_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_EndTimeNotInTheFuture() (gas: 47557) -CreateWithMilestones_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_ProtocolFeeTooHigh() (gas: 58099) -CreateWithMilestones_LockupDynamic_Integration_Fuzz_Test:testFuzz_CreateWithMilestones(address,(address,uint40,bool,bool,address,uint128,address,(address,uint256),(uint128,uint64,uint40)[]),uint256) (runs: 50, μ: 3941438, ~: 3983919) -CreateWithRange_LockupLinear_Integration_Concrete_Test:test_CreateWithRange() (gas: 282968) -CreateWithRange_LockupLinear_Integration_Concrete_Test:test_CreateWithRange_AssetMissingReturnValue() (gas: 289735) -CreateWithRange_LockupLinear_Integration_Concrete_Test:test_RevertGiven_EndTimeNotInTheFuture() (gas: 41154) -CreateWithRange_LockupLinear_Integration_Concrete_Test:test_RevertGiven_ProtocolFeeTooHigh() (gas: 51749) -CreateWithRange_LockupLinear_Integration_Fuzz_Test:testFuzz_CreateWithRange(address,(address,address,uint128,address,bool,bool,(uint40,uint40,uint40),(address,uint256)),uint256) (runs: 50, μ: 367857, ~: 375714) -FlashFee_Integration_Concrete_Test:test_FlashFee() (gas: 50968) -FlashFee_Integration_Concrete_Test:test_RevertGiven_AssetNotFlashLoanable() (gas: 18626) -FlashFee_Integration_Fuzz_Test:testFuzz_FlashFee(uint256,uint256) (runs: 50, μ: 51835, ~: 52081) -FlashLoanFunction_Integration_Concrete_Test:test_FlashLoan() (gas: 394969) -FlashLoanFunction_Integration_Concrete_Test:test_RevertGiven_AssetNotFlashLoanable() (gas: 21603) -FlashLoanFunction_Integration_Fuzz_Test:testFuzz_FlashLoanFunction(uint256,uint128,bytes) (runs: 50, μ: 395010, ~: 399680) +CreateWithDeltas_LockupDynamic_Integration_Concrete_Test:test_CreateWithDeltas() (gas: 380468) +CreateWithDeltas_LockupDynamic_Integration_Fuzz_Test:testFuzz_CreateWithDeltas((uint128,uint64,uint40)[]) (runs: 50, μ: 4093934, ~: 3551084) +CreateWithDurations_LockupLinear_Integration_Concrete_Test:test_CreateWithDurations() (gas: 287497) +CreateWithDurations_LockupLinear_Integration_Fuzz_Test:testFuzz_CreateWithDurations((uint40,uint40)) (runs: 50, μ: 286429, ~: 286529) +CreateWithMilestones_LockupDynamic_Integration_Concrete_Test:test_CreateWithMilestones() (gas: 370814) +CreateWithMilestones_LockupDynamic_Integration_Concrete_Test:test_CreateWithMilestones_AssetMissingReturnValue() (gas: 377602) +CreateWithMilestones_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_EndTimeNotInTheFuture() (gas: 47460) +CreateWithMilestones_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_ProtocolFeeTooHigh() (gas: 57967) +CreateWithMilestones_LockupDynamic_Integration_Fuzz_Test:testFuzz_CreateWithMilestones(address,(address,uint40,bool,bool,address,uint128,address,(address,uint256),(uint128,uint64,uint40)[]),uint256) (runs: 50, μ: 3960440, ~: 3983787) +CreateWithRange_LockupLinear_Integration_Concrete_Test:test_CreateWithRange() (gas: 282850) +CreateWithRange_LockupLinear_Integration_Concrete_Test:test_CreateWithRange_AssetMissingReturnValue() (gas: 289617) +CreateWithRange_LockupLinear_Integration_Concrete_Test:test_RevertGiven_EndTimeNotInTheFuture() (gas: 41034) +CreateWithRange_LockupLinear_Integration_Concrete_Test:test_RevertGiven_ProtocolFeeTooHigh() (gas: 51617) +CreateWithRange_LockupLinear_Integration_Fuzz_Test:testFuzz_CreateWithRange(address,(address,address,uint128,address,bool,bool,(uint40,uint40,uint40),(address,uint256)),uint256) (runs: 50, μ: 368550, ~: 383704) GenerateAccentColor_Integration_Concrete_Test:test_GenerateAccentColor() (gas: 13215) -GetAsset_LockupDynamic_Integration_Concrete_Test:test_GetAsset() (gas: 307700) +GetAsset_LockupDynamic_Integration_Concrete_Test:test_GetAsset() (gas: 307626) GetAsset_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 12049) -GetAsset_LockupLinear_Integration_Concrete_Test:test_GetAsset() (gas: 234445) +GetAsset_LockupLinear_Integration_Concrete_Test:test_GetAsset() (gas: 234371) GetAsset_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 12035) -GetCliffTime_LockupLinear_Integration_Concrete_Test:test_GetCliffTime() (gas: 234929) +GetCliffTime_LockupLinear_Integration_Concrete_Test:test_GetCliffTime() (gas: 234855) GetCliffTime_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11392) -GetDepositedAmount_LockupDynamic_Integration_Concrete_Test:test_GetDepositedAmount() (gas: 310497) +GetDepositedAmount_LockupDynamic_Integration_Concrete_Test:test_GetDepositedAmount() (gas: 310423) GetDepositedAmount_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11682) -GetDepositedAmount_LockupLinear_Integration_Concrete_Test:test_GetDepositedAmount() (gas: 237216) +GetDepositedAmount_LockupLinear_Integration_Concrete_Test:test_GetDepositedAmount() (gas: 237142) GetDepositedAmount_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11678) -GetEndTime_LockupDynamic_Integration_Concrete_Test:test_GetEndTime() (gas: 310295) +GetEndTime_LockupDynamic_Integration_Concrete_Test:test_GetEndTime() (gas: 310198) GetEndTime_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11538) -GetEndTime_LockupLinear_Integration_Concrete_Test:test_GetEndTime() (gas: 237068) +GetEndTime_LockupLinear_Integration_Concrete_Test:test_GetEndTime() (gas: 236971) GetEndTime_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11546) -GetRange_LockupDynamic_Integration_Concrete_Test:test_GetRange() (gas: 309721) +GetRange_LockupDynamic_Integration_Concrete_Test:test_GetRange() (gas: 309669) GetRange_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 13125) -GetRange_LockupLinear_Integration_Concrete_Test:test_GetRange() (gas: 237286) +GetRange_LockupLinear_Integration_Concrete_Test:test_GetRange() (gas: 237189) GetRange_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 13308) GetRecipient_LockupDynamic_Integration_Concrete_Test:test_GetRecipient() (gas: 12585) -GetRecipient_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_NFTBurned() (gas: 72382) +GetRecipient_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_NFTBurned() (gas: 72359) GetRecipient_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 10989) GetRecipient_LockupLinear_Integration_Concrete_Test:test_GetRecipient() (gas: 12565) -GetRecipient_LockupLinear_Integration_Concrete_Test:test_RevertGiven_NFTBurned() (gas: 72651) +GetRecipient_LockupLinear_Integration_Concrete_Test:test_RevertGiven_NFTBurned() (gas: 72628) GetRecipient_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 10993) -GetRefundedAmount_LockupDynamic_Integration_Concrete_Test:test_GetRefundedAmount_StatusDepleted() (gas: 362699) -GetRefundedAmount_LockupDynamic_Integration_Concrete_Test:test_GetRefundedAmount_StatusPending() (gas: 332639) -GetRefundedAmount_LockupDynamic_Integration_Concrete_Test:test_GetRefundedAmount_StatusSettled() (gas: 337847) -GetRefundedAmount_LockupDynamic_Integration_Concrete_Test:test_GetRefundedAmount_StatusStreaming() (gas: 337861) -GetRefundedAmount_LockupDynamic_Integration_Concrete_Test:test_GetRefundedAmount_StreamHasBeenCanceled_StatusCanceled() (gas: 377426) -GetRefundedAmount_LockupDynamic_Integration_Concrete_Test:test_GetRefundedAmount_StreamHasBeenCanceled_StatusDepleted() (gas: 399155) -GetRefundedAmount_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 12045) -GetRefundedAmount_LockupLinear_Integration_Concrete_Test:test_GetRefundedAmount_StatusDepleted() (gas: 287732) -GetRefundedAmount_LockupLinear_Integration_Concrete_Test:test_GetRefundedAmount_StatusPending() (gas: 257396) -GetRefundedAmount_LockupLinear_Integration_Concrete_Test:test_GetRefundedAmount_StatusSettled() (gas: 262604) -GetRefundedAmount_LockupLinear_Integration_Concrete_Test:test_GetRefundedAmount_StatusStreaming() (gas: 262618) -GetRefundedAmount_LockupLinear_Integration_Concrete_Test:test_GetRefundedAmount_StreamHasBeenCanceled_StatusCanceled() (gas: 298965) -GetRefundedAmount_LockupLinear_Integration_Concrete_Test:test_GetRefundedAmount_StreamHasBeenCanceled_StatusDepleted() (gas: 320726) -GetRefundedAmount_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 12031) -GetSegments_LockupDynamic_Integration_Concrete_Test:test_GetSegments() (gas: 315199) +GetRefundedAmount_LockupDynamic_Integration_Concrete_Test:test_GetRefundedAmount_StatusDepleted() (gas: 362569) +GetRefundedAmount_LockupDynamic_Integration_Concrete_Test:test_GetRefundedAmount_StatusPending() (gas: 332532) +GetRefundedAmount_LockupDynamic_Integration_Concrete_Test:test_GetRefundedAmount_StatusSettled() (gas: 337717) +GetRefundedAmount_LockupDynamic_Integration_Concrete_Test:test_GetRefundedAmount_StatusStreaming() (gas: 337776) +GetRefundedAmount_LockupDynamic_Integration_Concrete_Test:test_GetRefundedAmount_StreamHasBeenCanceled_StatusCanceled() (gas: 377296) +GetRefundedAmount_LockupDynamic_Integration_Concrete_Test:test_GetRefundedAmount_StreamHasBeenCanceled_StatusDepleted() (gas: 399025) +GetRefundedAmount_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 12012) +GetRefundedAmount_LockupLinear_Integration_Concrete_Test:test_GetRefundedAmount_StatusDepleted() (gas: 287602) +GetRefundedAmount_LockupLinear_Integration_Concrete_Test:test_GetRefundedAmount_StatusPending() (gas: 257289) +GetRefundedAmount_LockupLinear_Integration_Concrete_Test:test_GetRefundedAmount_StatusSettled() (gas: 262474) +GetRefundedAmount_LockupLinear_Integration_Concrete_Test:test_GetRefundedAmount_StatusStreaming() (gas: 262533) +GetRefundedAmount_LockupLinear_Integration_Concrete_Test:test_GetRefundedAmount_StreamHasBeenCanceled_StatusCanceled() (gas: 298835) +GetRefundedAmount_LockupLinear_Integration_Concrete_Test:test_GetRefundedAmount_StreamHasBeenCanceled_StatusDepleted() (gas: 320596) +GetRefundedAmount_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11998) +GetSegments_LockupDynamic_Integration_Concrete_Test:test_GetSegments() (gas: 315125) GetSegments_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 13758) -GetSender_LockupDynamic_Integration_Concrete_Test:test_GetSender() (gas: 307418) +GetSender_LockupDynamic_Integration_Concrete_Test:test_GetSender() (gas: 307344) GetSender_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11814) -GetSender_LockupLinear_Integration_Concrete_Test:test_GetSender() (gas: 234179) +GetSender_LockupLinear_Integration_Concrete_Test:test_GetSender() (gas: 234105) GetSender_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11816) -GetStartTime_LockupDynamic_Integration_Concrete_Test:test_GetStartTime() (gas: 310624) +GetStartTime_LockupDynamic_Integration_Concrete_Test:test_GetStartTime() (gas: 310550) GetStartTime_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11823) -GetStartTime_LockupLinear_Integration_Concrete_Test:test_GetStartTime() (gas: 237391) +GetStartTime_LockupLinear_Integration_Concrete_Test:test_GetStartTime() (gas: 237317) GetStartTime_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11831) -GetStream_LockupDynamic_Integration_Concrete_Test:test_GetStream() (gas: 278661) -GetStream_LockupDynamic_Integration_Concrete_Test:test_GetStream_StatusSettled() (gas: 52024) +GetStream_LockupDynamic_Integration_Concrete_Test:test_GetStream() (gas: 278587) +GetStream_LockupDynamic_Integration_Concrete_Test:test_GetStream_StatusSettled() (gas: 52001) GetStream_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 15544) -GetStream_LockupLinear_Integration_Concrete_Test:test_GetStream() (gas: 34920) -GetStream_LockupLinear_Integration_Concrete_Test:test_GetStream_StatusSettled() (gas: 39431) +GetStream_LockupLinear_Integration_Concrete_Test:test_GetStream() (gas: 34942) +GetStream_LockupLinear_Integration_Concrete_Test:test_GetStream_StatusSettled() (gas: 39430) GetStream_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 14299) -GetWithdrawnAmount_LockupDynamic_Integration_Concrete_Test:test_GetWithdrawnAmount() (gas: 384601) -GetWithdrawnAmount_LockupDynamic_Integration_Concrete_Test:test_GetWithdrawnAmount_NoPreviousWithdrawals() (gas: 335821) +GetWithdrawnAmount_LockupDynamic_Integration_Concrete_Test:test_GetWithdrawnAmount() (gas: 384549) +GetWithdrawnAmount_LockupDynamic_Integration_Concrete_Test:test_GetWithdrawnAmount_NoPreviousWithdrawals() (gas: 335769) GetWithdrawnAmount_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 12012) -GetWithdrawnAmount_LockupDynamic_Integration_Fuzz_Test:testFuzz_GetWithdrawnAmount(uint256,uint128) (runs: 50, μ: 387573, ~: 388098) -GetWithdrawnAmount_LockupDynamic_Integration_Fuzz_Test:testFuzz_GetWithdrawnAmount_NoPreviousWithdrawals(uint256) (runs: 50, μ: 337524, ~: 337745) -GetWithdrawnAmount_LockupLinear_Integration_Concrete_Test:test_GetWithdrawnAmount() (gas: 282096) -GetWithdrawnAmount_LockupLinear_Integration_Concrete_Test:test_GetWithdrawnAmount_NoPreviousWithdrawals() (gas: 262578) +GetWithdrawnAmount_LockupDynamic_Integration_Fuzz_Test:testFuzz_GetWithdrawnAmount(uint256,uint128) (runs: 50, μ: 387484, ~: 388043) +GetWithdrawnAmount_LockupDynamic_Integration_Fuzz_Test:testFuzz_GetWithdrawnAmount_NoPreviousWithdrawals(uint256) (runs: 50, μ: 337464, ~: 337671) +GetWithdrawnAmount_LockupLinear_Integration_Concrete_Test:test_GetWithdrawnAmount() (gas: 282044) +GetWithdrawnAmount_LockupLinear_Integration_Concrete_Test:test_GetWithdrawnAmount_NoPreviousWithdrawals() (gas: 262526) GetWithdrawnAmount_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11998) -GetWithdrawnAmount_LockupLinear_Integration_Fuzz_Test:testFuzz_GetWithdrawnAmount(uint256,uint128) (runs: 50, μ: 285296, ~: 285238) -GetWithdrawnAmount_LockupLinear_Integration_Fuzz_Test:testFuzz_GetWithdrawnAmount_NoPreviousWithdrawals(uint256) (runs: 50, μ: 264308, ~: 264502) -IsCancelable_LockupDynamic_Integration_Concrete_Test:test_IsCancelable() (gas: 515747) -IsCancelable_LockupDynamic_Integration_Concrete_Test:test_IsCancelable_Cold() (gas: 336044) -IsCancelable_LockupDynamic_Integration_Concrete_Test:test_IsCancelable_StreamCancelable() (gas: 327288) +GetWithdrawnAmount_LockupLinear_Integration_Fuzz_Test:testFuzz_GetWithdrawnAmount(uint256,uint128) (runs: 50, μ: 285208, ~: 285164) +GetWithdrawnAmount_LockupLinear_Integration_Fuzz_Test:testFuzz_GetWithdrawnAmount_NoPreviousWithdrawals(uint256) (runs: 50, μ: 264276, ~: 264428) +IsCancelable_LockupDynamic_Integration_Concrete_Test:test_IsCancelable() (gas: 515599) +IsCancelable_LockupDynamic_Integration_Concrete_Test:test_IsCancelable_Cold() (gas: 335947) +IsCancelable_LockupDynamic_Integration_Concrete_Test:test_IsCancelable_StreamCancelable() (gas: 327214) IsCancelable_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11239) -IsCancelable_LockupLinear_Integration_Concrete_Test:test_IsCancelable() (gas: 372735) -IsCancelable_LockupLinear_Integration_Concrete_Test:test_IsCancelable_Cold() (gas: 262953) -IsCancelable_LockupLinear_Integration_Concrete_Test:test_IsCancelable_StreamCancelable() (gas: 254080) +IsCancelable_LockupLinear_Integration_Concrete_Test:test_IsCancelable() (gas: 372587) +IsCancelable_LockupLinear_Integration_Concrete_Test:test_IsCancelable_Cold() (gas: 262856) +IsCancelable_LockupLinear_Integration_Concrete_Test:test_IsCancelable_StreamCancelable() (gas: 254006) IsCancelable_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11263) -IsCold_LockupDynamic_Integration_Concrete_Test:test_IsCold_StatusCanceled() (gas: 376124) -IsCold_LockupDynamic_Integration_Concrete_Test:test_IsCold_StatusDepleted() (gas: 362345) -IsCold_LockupDynamic_Integration_Concrete_Test:test_IsCold_StatusPending() (gas: 330545) -IsCold_LockupDynamic_Integration_Concrete_Test:test_IsCold_StatusSettled() (gas: 336315) -IsCold_LockupDynamic_Integration_Concrete_Test:test_IsCold_StatusStreaming() (gas: 352597) +IsCold_LockupDynamic_Integration_Concrete_Test:test_IsCold_StatusCanceled() (gas: 376050) +IsCold_LockupDynamic_Integration_Concrete_Test:test_IsCold_StatusDepleted() (gas: 362248) +IsCold_LockupDynamic_Integration_Concrete_Test:test_IsCold_StatusPending() (gas: 330471) +IsCold_LockupDynamic_Integration_Concrete_Test:test_IsCold_StatusSettled() (gas: 336218) +IsCold_LockupDynamic_Integration_Concrete_Test:test_IsCold_StatusStreaming() (gas: 352545) IsCold_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11525) -IsCold_LockupLinear_Integration_Concrete_Test:test_IsCold_StatusCanceled() (gas: 297714) -IsCold_LockupLinear_Integration_Concrete_Test:test_IsCold_StatusDepleted() (gas: 287436) -IsCold_LockupLinear_Integration_Concrete_Test:test_IsCold_StatusPending() (gas: 257360) -IsCold_LockupLinear_Integration_Concrete_Test:test_IsCold_StatusSettled() (gas: 263242) -IsCold_LockupLinear_Integration_Concrete_Test:test_IsCold_StatusStreaming() (gas: 263777) +IsCold_LockupLinear_Integration_Concrete_Test:test_IsCold_StatusCanceled() (gas: 297640) +IsCold_LockupLinear_Integration_Concrete_Test:test_IsCold_StatusDepleted() (gas: 287339) +IsCold_LockupLinear_Integration_Concrete_Test:test_IsCold_StatusPending() (gas: 257286) +IsCold_LockupLinear_Integration_Concrete_Test:test_IsCold_StatusSettled() (gas: 263145) +IsCold_LockupLinear_Integration_Concrete_Test:test_IsCold_StatusStreaming() (gas: 263725) IsCold_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11568) -IsDepleted_LockupDynamic_Integration_Concrete_Test:test_IsDepleted() (gas: 361783) -IsDepleted_LockupDynamic_Integration_Concrete_Test:test_IsDepleted_StreamNotDepleted() (gas: 326712) +IsDepleted_LockupDynamic_Integration_Concrete_Test:test_IsDepleted() (gas: 361686) +IsDepleted_LockupDynamic_Integration_Concrete_Test:test_IsDepleted_StreamNotDepleted() (gas: 326638) IsDepleted_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11191) -IsDepleted_LockupLinear_Integration_Concrete_Test:test_IsDepleted() (gas: 286836) -IsDepleted_LockupLinear_Integration_Concrete_Test:test_IsDepleted_StreamNotDepleted() (gas: 253489) +IsDepleted_LockupLinear_Integration_Concrete_Test:test_IsDepleted() (gas: 286739) +IsDepleted_LockupLinear_Integration_Concrete_Test:test_IsDepleted_StreamNotDepleted() (gas: 253415) IsDepleted_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11212) -IsStream_LockupDynamic_Integration_Concrete_Test:test_IsStream() (gas: 327052) +IsStream_LockupDynamic_Integration_Concrete_Test:test_IsStream() (gas: 326978) IsStream_LockupDynamic_Integration_Concrete_Test:test_IsStream_Null() (gas: 8527) -IsStream_LockupLinear_Integration_Concrete_Test:test_IsStream() (gas: 253851) +IsStream_LockupLinear_Integration_Concrete_Test:test_IsStream() (gas: 253777) IsStream_LockupLinear_Integration_Concrete_Test:test_IsStream_Null() (gas: 8570) -IsTransferable_LockupDynamic_Integration_Concrete_Test:test_IsTransferable_Stream() (gas: 327214) +IsTransferable_LockupDynamic_Integration_Concrete_Test:test_IsTransferable_Stream() (gas: 327140) IsTransferable_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11674) -IsTransferable_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StreamTransferNotEnabled() (gas: 515746) -IsTransferable_LockupLinear_Integration_Concrete_Test:test_IsTransferable_Stream() (gas: 254035) +IsTransferable_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StreamTransferNotEnabled() (gas: 515598) +IsTransferable_LockupLinear_Integration_Concrete_Test:test_IsTransferable_Stream() (gas: 253961) IsTransferable_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11739) -IsTransferable_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StreamTransferNotEnabled() (gas: 372790) -IsWarm_LockupDynamic_Integration_Concrete_Test:test_IsWarm_StatusCanceled() (gas: 375662) -IsWarm_LockupDynamic_Integration_Concrete_Test:test_IsWarm_StatusDepleted() (gas: 361859) -IsWarm_LockupDynamic_Integration_Concrete_Test:test_IsWarm_StatusPending() (gas: 329982) -IsWarm_LockupDynamic_Integration_Concrete_Test:test_IsWarm_StatusSettled() (gas: 335926) -IsWarm_LockupDynamic_Integration_Concrete_Test:test_IsWarm_StatusStreaming() (gas: 352082) +IsTransferable_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StreamTransferNotEnabled() (gas: 372642) +IsWarm_LockupDynamic_Integration_Concrete_Test:test_IsWarm_StatusCanceled() (gas: 375588) +IsWarm_LockupDynamic_Integration_Concrete_Test:test_IsWarm_StatusDepleted() (gas: 361762) +IsWarm_LockupDynamic_Integration_Concrete_Test:test_IsWarm_StatusPending() (gas: 329908) +IsWarm_LockupDynamic_Integration_Concrete_Test:test_IsWarm_StatusSettled() (gas: 335829) +IsWarm_LockupDynamic_Integration_Concrete_Test:test_IsWarm_StatusStreaming() (gas: 352030) IsWarm_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11085) -IsWarm_LockupLinear_Integration_Concrete_Test:test_IsWarm_StatusCanceled() (gas: 297221) -IsWarm_LockupLinear_Integration_Concrete_Test:test_IsWarm_StatusDepleted() (gas: 286912) -IsWarm_LockupLinear_Integration_Concrete_Test:test_IsWarm_StatusPending() (gas: 256759) -IsWarm_LockupLinear_Integration_Concrete_Test:test_IsWarm_StatusSettled() (gas: 262825) -IsWarm_LockupLinear_Integration_Concrete_Test:test_IsWarm_StatusStreaming() (gas: 263224) +IsWarm_LockupLinear_Integration_Concrete_Test:test_IsWarm_StatusCanceled() (gas: 297147) +IsWarm_LockupLinear_Integration_Concrete_Test:test_IsWarm_StatusDepleted() (gas: 286815) +IsWarm_LockupLinear_Integration_Concrete_Test:test_IsWarm_StatusPending() (gas: 256685) +IsWarm_LockupLinear_Integration_Concrete_Test:test_IsWarm_StatusSettled() (gas: 262728) +IsWarm_LockupLinear_Integration_Concrete_Test:test_IsWarm_StatusStreaming() (gas: 263172) IsWarm_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11106) MapSymbol_Integration_Concrete_Test:test_MapSymbol_LockupDynamic() (gas: 16961) MapSymbol_Integration_Concrete_Test:test_MapSymbol_LockupLinear() (gas: 16735) MapSymbol_Integration_Concrete_Test:test_RevertGiven_UnknownNFT() (gas: 1039755) -MaxFlashLoan_Integration_Concrete_Test:test_MaxFlashLoan() (gas: 175401) -MaxFlashLoan_Integration_Concrete_Test:test_MaxFlashLoan_AssetNotFlashLoanable() (gas: 15248) -MaxFlashLoan_Integration_Fuzz_Test:testFuzz_MaxFlashLoan(uint256) (runs: 50, μ: 175401, ~: 175418) -ProtocolFees_Integration_Concrete_Test:test_ProtocolFees() (gas: 41254) -ProtocolFees_Integration_Concrete_Test:test_ProtocolFees_ProtocolFeeNotSet() (gas: 9943) -ProtocolRevenues_LockupDynamic_Integration_Concrete_Test:test_ProtocolRevenues() (gas: 320169) +ProtocolFees_Integration_Concrete_Test:test_ProtocolFees() (gas: 41122) +ProtocolFees_Integration_Concrete_Test:test_ProtocolFees_ProtocolFeeNotSet() (gas: 9869) +ProtocolRevenues_LockupDynamic_Integration_Concrete_Test:test_ProtocolRevenues() (gas: 320117) ProtocolRevenues_LockupDynamic_Integration_Concrete_Test:test_ProtocolRevenues_ProtocolRevenuesZero() (gas: 10125) -ProtocolRevenues_LockupLinear_Integration_Concrete_Test:test_ProtocolRevenues() (gas: 246923) +ProtocolRevenues_LockupLinear_Integration_Concrete_Test:test_ProtocolRevenues() (gas: 246871) ProtocolRevenues_LockupLinear_Integration_Concrete_Test:test_ProtocolRevenues_ProtocolRevenuesZero() (gas: 10111) -RefundableAmountOf_LockupDynamic_Integration_Concrete_Test:test_RefundableAmountOf_StatusDepleted() (gas: 361820) -RefundableAmountOf_LockupDynamic_Integration_Concrete_Test:test_RefundableAmountOf_StatusPending() (gas: 335782) -RefundableAmountOf_LockupDynamic_Integration_Concrete_Test:test_RefundableAmountOf_StatusSettled() (gas: 335775) -RefundableAmountOf_LockupDynamic_Integration_Concrete_Test:test_RefundableAmountOf_StatusStreaming() (gas: 342622) -RefundableAmountOf_LockupDynamic_Integration_Concrete_Test:test_RefundableAmountOf_StreamHasBeenCanceled_StatusCanceled() (gas: 375571) -RefundableAmountOf_LockupDynamic_Integration_Concrete_Test:test_RefundableAmountOf_StreamHasBeenCanceled_StatusDepleted() (gas: 398663) -RefundableAmountOf_LockupDynamic_Integration_Concrete_Test:test_RefundableAmountOf_StreamNotCancelable() (gas: 523373) -RefundableAmountOf_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11099) -RefundableAmountOf_LockupDynamic_Integration_Fuzz_Test:testFuzz_RefundableAmountOf(uint256) (runs: 50, μ: 45465, ~: 30742) -RefundableAmountOf_LockupLinear_Integration_Concrete_Test:test_RefundableAmountOf_StatusDepleted() (gas: 286869) -RefundableAmountOf_LockupLinear_Integration_Concrete_Test:test_RefundableAmountOf_StatusPending() (gas: 262546) -RefundableAmountOf_LockupLinear_Integration_Concrete_Test:test_RefundableAmountOf_StatusSettled() (gas: 262669) -RefundableAmountOf_LockupLinear_Integration_Concrete_Test:test_RefundableAmountOf_StatusStreaming() (gas: 264156) -RefundableAmountOf_LockupLinear_Integration_Concrete_Test:test_RefundableAmountOf_StreamHasBeenCanceled_StatusCanceled() (gas: 297126) -RefundableAmountOf_LockupLinear_Integration_Concrete_Test:test_RefundableAmountOf_StreamHasBeenCanceled_StatusDepleted() (gas: 320250) -RefundableAmountOf_LockupLinear_Integration_Concrete_Test:test_RefundableAmountOf_StreamNotCancelable() (gas: 380366) -RefundableAmountOf_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11110) -RefundableAmountOf_LockupLinear_Integration_Fuzz_Test:testFuzz_RefundableAmountOf(uint256) (runs: 50, μ: 30817, ~: 30858) -Renounce_LockupDynamic_Integration_Concrete_Test:test_Renounce() (gas: 694189) -Renounce_LockupDynamic_Integration_Concrete_Test:test_Renounce_RecipientDoesNotImplementHook() (gas: 687264) -Renounce_LockupDynamic_Integration_Concrete_Test:test_Renounce_RecipientNotContract() (gas: 292481) -Renounce_LockupDynamic_Integration_Concrete_Test:test_Renounce_RecipientReentrancy() (gas: 692393) -Renounce_LockupDynamic_Integration_Concrete_Test:test_Renounce_RecipientReverts() (gas: 687871) +RefundableAmountOf_LockupDynamic_Integration_Concrete_Test:test_RefundableAmountOf_StatusDepleted() (gas: 361690) +RefundableAmountOf_LockupDynamic_Integration_Concrete_Test:test_RefundableAmountOf_StatusPending() (gas: 335675) +RefundableAmountOf_LockupDynamic_Integration_Concrete_Test:test_RefundableAmountOf_StatusSettled() (gas: 335645) +RefundableAmountOf_LockupDynamic_Integration_Concrete_Test:test_RefundableAmountOf_StatusStreaming() (gas: 342492) +RefundableAmountOf_LockupDynamic_Integration_Concrete_Test:test_RefundableAmountOf_StreamHasBeenCanceled_StatusCanceled() (gas: 375464) +RefundableAmountOf_LockupDynamic_Integration_Concrete_Test:test_RefundableAmountOf_StreamHasBeenCanceled_StatusDepleted() (gas: 398523) +RefundableAmountOf_LockupDynamic_Integration_Concrete_Test:test_RefundableAmountOf_StreamNotCancelable() (gas: 523192) +RefundableAmountOf_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11066) +RefundableAmountOf_LockupDynamic_Integration_Fuzz_Test:testFuzz_RefundableAmountOf(uint256) (runs: 50, μ: 48183, ~: 63495) +RefundableAmountOf_LockupLinear_Integration_Concrete_Test:test_RefundableAmountOf_StatusDepleted() (gas: 286739) +RefundableAmountOf_LockupLinear_Integration_Concrete_Test:test_RefundableAmountOf_StatusPending() (gas: 262439) +RefundableAmountOf_LockupLinear_Integration_Concrete_Test:test_RefundableAmountOf_StatusSettled() (gas: 262539) +RefundableAmountOf_LockupLinear_Integration_Concrete_Test:test_RefundableAmountOf_StatusStreaming() (gas: 264026) +RefundableAmountOf_LockupLinear_Integration_Concrete_Test:test_RefundableAmountOf_StreamHasBeenCanceled_StatusCanceled() (gas: 297019) +RefundableAmountOf_LockupLinear_Integration_Concrete_Test:test_RefundableAmountOf_StreamHasBeenCanceled_StatusDepleted() (gas: 320110) +RefundableAmountOf_LockupLinear_Integration_Concrete_Test:test_RefundableAmountOf_StreamNotCancelable() (gas: 380185) +RefundableAmountOf_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11077) +RefundableAmountOf_LockupLinear_Integration_Fuzz_Test:testFuzz_RefundableAmountOf(uint256) (runs: 50, μ: 30877, ~: 30917) +Renounce_LockupDynamic_Integration_Concrete_Test:test_Renounce() (gas: 693967) +Renounce_LockupDynamic_Integration_Concrete_Test:test_Renounce_RecipientDoesNotImplementHook() (gas: 687042) +Renounce_LockupDynamic_Integration_Concrete_Test:test_Renounce_RecipientNotContract() (gas: 292407) +Renounce_LockupDynamic_Integration_Concrete_Test:test_Renounce_RecipientReentrancy() (gas: 692171) +Renounce_LockupDynamic_Integration_Concrete_Test:test_Renounce_RecipientReverts() (gas: 687649) Renounce_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11567) Renounce_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StatusCanceled() (gas: 87318) -Renounce_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StatusDepleted() (gas: 68280) -Renounce_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StatusSettled() (gas: 24692) -Renounce_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StreamNotCancelable() (gas: 649669) -Renounce_LockupLinear_Integration_Concrete_Test:test_Renounce() (gas: 481487) -Renounce_LockupLinear_Integration_Concrete_Test:test_Renounce_RecipientDoesNotImplementHook() (gas: 474530) -Renounce_LockupLinear_Integration_Concrete_Test:test_Renounce_RecipientNotContract() (gas: 219327) -Renounce_LockupLinear_Integration_Concrete_Test:test_Renounce_RecipientReentrancy() (gas: 479667) -Renounce_LockupLinear_Integration_Concrete_Test:test_Renounce_RecipientReverts() (gas: 475137) +Renounce_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StatusDepleted() (gas: 68257) +Renounce_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StatusSettled() (gas: 24669) +Renounce_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StreamNotCancelable() (gas: 649447) +Renounce_LockupLinear_Integration_Concrete_Test:test_Renounce() (gas: 481265) +Renounce_LockupLinear_Integration_Concrete_Test:test_Renounce_RecipientDoesNotImplementHook() (gas: 474308) +Renounce_LockupLinear_Integration_Concrete_Test:test_Renounce_RecipientNotContract() (gas: 219253) +Renounce_LockupLinear_Integration_Concrete_Test:test_Renounce_RecipientReentrancy() (gas: 479445) +Renounce_LockupLinear_Integration_Concrete_Test:test_Renounce_RecipientReverts() (gas: 474915) Renounce_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11575) Renounce_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StatusCanceled() (gas: 78108) -Renounce_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StatusDepleted() (gas: 68564) -Renounce_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StatusSettled() (gas: 24822) -Renounce_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StreamNotCancelable() (gas: 436859) +Renounce_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StatusDepleted() (gas: 68541) +Renounce_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StatusSettled() (gas: 24799) +Renounce_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StreamNotCancelable() (gas: 436637) SafeAssetDecimals_Integration_Concrete_Test:test_SafeAssetDecimals() (gas: 12117) SafeAssetDecimals_Integration_Concrete_Test:test_SafeAssetDecimals_DecimalsNotImplemented() (gas: 10852) SafeAssetDecimals_Integration_Concrete_Test:test_SafeAssetDecimals_EOA() (gas: 11625) @@ -257,157 +248,152 @@ SafeAssetSymbol_Integration_Concrete_Test:test_SafeAssetSymbol_Bytes32() (gas: 6 SafeAssetSymbol_Integration_Concrete_Test:test_SafeAssetSymbol_EOA() (gas: 13222) SafeAssetSymbol_Integration_Concrete_Test:test_SafeAssetSymbol_LongSymbol() (gas: 625096) SafeAssetSymbol_Integration_Concrete_Test:test_SafeAssetSymbol_SymbolNotImplemented() (gas: 12399) -SetComptroller_LockupDynamic_Integration_Concrete_Test:test_SetComptroller_NewComptroller() (gas: 311753) +SetComptroller_LockupDynamic_Integration_Concrete_Test:test_SetComptroller_NewComptroller() (gas: 214569) SetComptroller_LockupDynamic_Integration_Concrete_Test:test_SetComptroller_SameComptroller() (gas: 23283) -SetComptroller_LockupLinear_Integration_Concrete_Test:test_SetComptroller_NewComptroller() (gas: 311750) +SetComptroller_LockupLinear_Integration_Concrete_Test:test_SetComptroller_NewComptroller() (gas: 214566) SetComptroller_LockupLinear_Integration_Concrete_Test:test_SetComptroller_SameComptroller() (gas: 23280) -SetFlashFee_Integration_Fuzz_Test:testFuzz_SetFlashFee(uint256) (runs: 50, μ: 37712, ~: 39448) SetNFTDescriptor_LockupDynamic_Integration_Concrete_Test:test_SetNFTDescriptor_NewNFTDescriptor() (gas: 6551561) SetNFTDescriptor_LockupDynamic_Integration_Concrete_Test:test_SetNFTDescriptor_SameNFTDescriptor() (gas: 2301931) -SetNFTDescriptor_LockupLinear_Integration_Concrete_Test:test_SetNFTDescriptor_NewNFTDescriptor() (gas: 6550197) -SetNFTDescriptor_LockupLinear_Integration_Concrete_Test:test_SetNFTDescriptor_SameNFTDescriptor() (gas: 2300372) -SetProtocolFee_Integration_Concrete_Test:test_SetProtocolFee() (gas: 47804) -SetProtocolFee_Integration_Concrete_Test:test_SetProtocolFee_SameFee() (gas: 22636) -SetProtocolFee_Integration_Fuzz_Test:testFuzz_SetProtocolFee(uint256) (runs: 50, μ: 43103, ~: 43074) +SetNFTDescriptor_LockupLinear_Integration_Concrete_Test:test_SetNFTDescriptor_NewNFTDescriptor() (gas: 6550746) +SetNFTDescriptor_LockupLinear_Integration_Concrete_Test:test_SetNFTDescriptor_SameNFTDescriptor() (gas: 2300992) +SetProtocolFee_Integration_Fuzz_Test:testFuzz_SetProtocolFee(uint256) (runs: 50, μ: 42999, ~: 42942) StatusOf_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11651) -StatusOf_LockupDynamic_Integration_Concrete_Test:test_StatusOf() (gas: 352719) -StatusOf_LockupDynamic_Integration_Concrete_Test:test_StatusOf_AssetsFullyWithdrawn() (gas: 362484) -StatusOf_LockupDynamic_Integration_Concrete_Test:test_StatusOf_RefundableAmountNotZero() (gas: 336527) -StatusOf_LockupDynamic_Integration_Concrete_Test:test_StatusOf_StartTimeInTheFuture() (gas: 330626) -StatusOf_LockupDynamic_Integration_Concrete_Test:test_StatusOf_StreamCanceled() (gas: 376298) +StatusOf_LockupDynamic_Integration_Concrete_Test:test_StatusOf() (gas: 352645) +StatusOf_LockupDynamic_Integration_Concrete_Test:test_StatusOf_AssetsFullyWithdrawn() (gas: 362387) +StatusOf_LockupDynamic_Integration_Concrete_Test:test_StatusOf_RefundableAmountNotZero() (gas: 336430) +StatusOf_LockupDynamic_Integration_Concrete_Test:test_StatusOf_StartTimeInTheFuture() (gas: 330552) +StatusOf_LockupDynamic_Integration_Concrete_Test:test_StatusOf_StreamCanceled() (gas: 376224) StatusOf_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11681) -StatusOf_LockupLinear_Integration_Concrete_Test:test_StatusOf() (gas: 263275) -StatusOf_LockupLinear_Integration_Concrete_Test:test_StatusOf_AssetsFullyWithdrawn() (gas: 287551) -StatusOf_LockupLinear_Integration_Concrete_Test:test_StatusOf_RefundableAmountNotZero() (gas: 263440) -StatusOf_LockupLinear_Integration_Concrete_Test:test_StatusOf_StartTimeInTheFuture() (gas: 257417) -StatusOf_LockupLinear_Integration_Concrete_Test:test_StatusOf_StreamCanceled() (gas: 297871) +StatusOf_LockupLinear_Integration_Concrete_Test:test_StatusOf() (gas: 263201) +StatusOf_LockupLinear_Integration_Concrete_Test:test_StatusOf_AssetsFullyWithdrawn() (gas: 287454) +StatusOf_LockupLinear_Integration_Concrete_Test:test_StatusOf_RefundableAmountNotZero() (gas: 263343) +StatusOf_LockupLinear_Integration_Concrete_Test:test_StatusOf_StartTimeInTheFuture() (gas: 257343) +StatusOf_LockupLinear_Integration_Concrete_Test:test_StatusOf_StreamCanceled() (gas: 297797) StreamedAmountOf_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11319) StreamedAmountOf_LockupDynamic_Integration_Concrete_Test:test_StreamedAmountOf_CurrentMilestone1st() (gas: 45903) StreamedAmountOf_LockupDynamic_Integration_Concrete_Test:test_StreamedAmountOf_CurrentMilestoneNot1st() (gas: 50746) -StreamedAmountOf_LockupDynamic_Integration_Concrete_Test:test_StreamedAmountOf_OneSegment() (gas: 256899) +StreamedAmountOf_LockupDynamic_Integration_Concrete_Test:test_StreamedAmountOf_OneSegment() (gas: 256802) StreamedAmountOf_LockupDynamic_Integration_Concrete_Test:test_StreamedAmountOf_StartTimeInTheFuture() (gas: 20230) StreamedAmountOf_LockupDynamic_Integration_Concrete_Test:test_StreamedAmountOf_StartTimeInThePresent() (gas: 25593) -StreamedAmountOf_LockupDynamic_Integration_Concrete_Test:test_StreamedAmountOf_StatusDepleted() (gas: 68614) +StreamedAmountOf_LockupDynamic_Integration_Concrete_Test:test_StreamedAmountOf_StatusDepleted() (gas: 68591) StreamedAmountOf_LockupDynamic_Integration_Concrete_Test:test_StreamedAmountOf_StatusPending() (gas: 20360) -StreamedAmountOf_LockupDynamic_Integration_Concrete_Test:test_StreamedAmountOf_StatusSettled() (gas: 26624) -StreamedAmountOf_LockupDynamic_Integration_Concrete_Test:test_StreamedAmountOf_StreamHasBeenCanceled_StatusCanceled() (gas: 87731) -StreamedAmountOf_LockupDynamic_Integration_Concrete_Test:test_StreamedAmountOf_StreamHasBeenCanceled_StatusDepleted() (gas: 116269) -StreamedAmountOf_LockupDynamic_Integration_Fuzz_Test:testFuzz_StreamedAmountOf_Calculation((uint128,uint64,uint40)[],uint40) (runs: 50, μ: 3515843, ~: 3102346) -StreamedAmountOf_LockupDynamic_Integration_Fuzz_Test:testFuzz_StreamedAmountOf_Monotonicity((uint128,uint64,uint40)[],uint40,uint40) (runs: 50, μ: 3963864, ~: 4082808) -StreamedAmountOf_LockupDynamic_Integration_Fuzz_Test:testFuzz_StreamedAmountOf_OneSegment((uint128,uint64,uint40),uint40) (runs: 50, μ: 275280, ~: 268771) -StreamedAmountOf_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11349) -StreamedAmountOf_LockupLinear_Integration_Concrete_Test:test_StreamedAmountOf_CliffTimeInTheFuture() (gas: 26236) +StreamedAmountOf_LockupDynamic_Integration_Concrete_Test:test_StreamedAmountOf_StatusSettled() (gas: 26601) +StreamedAmountOf_LockupDynamic_Integration_Concrete_Test:test_StreamedAmountOf_StreamHasBeenCanceled_StatusCanceled() (gas: 87753) +StreamedAmountOf_LockupDynamic_Integration_Concrete_Test:test_StreamedAmountOf_StreamHasBeenCanceled_StatusDepleted() (gas: 116291) +StreamedAmountOf_LockupDynamic_Integration_Fuzz_Test:testFuzz_StreamedAmountOf_Calculation((uint128,uint64,uint40)[],uint40) (runs: 50, μ: 3517521, ~: 3128319) +StreamedAmountOf_LockupDynamic_Integration_Fuzz_Test:testFuzz_StreamedAmountOf_Monotonicity((uint128,uint64,uint40)[],uint40,uint40) (runs: 50, μ: 3967659, ~: 4100727) +StreamedAmountOf_LockupDynamic_Integration_Fuzz_Test:testFuzz_StreamedAmountOf_OneSegment((uint128,uint64,uint40),uint40) (runs: 50, μ: 274652, ~: 268659) +StreamedAmountOf_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 11316) +StreamedAmountOf_LockupLinear_Integration_Concrete_Test:test_StreamedAmountOf_CliffTimeInTheFuture() (gas: 26225) StreamedAmountOf_LockupLinear_Integration_Concrete_Test:test_StreamedAmountOf_CliffTimeInThePast() (gas: 17291) -StreamedAmountOf_LockupLinear_Integration_Concrete_Test:test_StreamedAmountOf_CliffTimeInThePresent() (gas: 27121) -StreamedAmountOf_LockupLinear_Integration_Concrete_Test:test_StreamedAmountOf_StatusDepleted() (gas: 68877) -StreamedAmountOf_LockupLinear_Integration_Concrete_Test:test_StreamedAmountOf_StatusPending() (gas: 20305) -StreamedAmountOf_LockupLinear_Integration_Concrete_Test:test_StreamedAmountOf_StatusSettled() (gas: 26688) -StreamedAmountOf_LockupLinear_Integration_Concrete_Test:test_StreamedAmountOf_StreamHasBeenCanceled_StatusCanceled() (gas: 78522) -StreamedAmountOf_LockupLinear_Integration_Concrete_Test:test_StreamedAmountOf_StreamHasBeenCanceled_StatusDepleted() (gas: 107059) -StreamedAmountOf_LockupLinear_Integration_Fuzz_Test:testFuzz_StreamedAmountOf_Calculation(uint40,uint128) (runs: 50, μ: 232550, ~: 232497) -StreamedAmountOf_LockupLinear_Integration_Fuzz_Test:testFuzz_StreamedAmountOf_CliffTimeInTheFuture(uint40) (runs: 50, μ: 27341, ~: 27604) -StreamedAmountOf_LockupLinear_Integration_Fuzz_Test:testFuzz_StreamedAmountOf_Monotonicity(uint40,uint40,uint128) (runs: 50, μ: 237703, ~: 239647) -ToggleFlashAsset_Integration_Concrete_Test:test_ToggleFlashAsset() (gas: 31848) -ToggleFlashAsset_Integration_Concrete_Test:test_ToggleFlashAsset_FlagNotEnabled() (gas: 41868) +StreamedAmountOf_LockupLinear_Integration_Concrete_Test:test_StreamedAmountOf_CliffTimeInThePresent() (gas: 27110) +StreamedAmountOf_LockupLinear_Integration_Concrete_Test:test_StreamedAmountOf_StatusDepleted() (gas: 68821) +StreamedAmountOf_LockupLinear_Integration_Concrete_Test:test_StreamedAmountOf_StatusPending() (gas: 20272) +StreamedAmountOf_LockupLinear_Integration_Concrete_Test:test_StreamedAmountOf_StatusSettled() (gas: 26632) +StreamedAmountOf_LockupLinear_Integration_Concrete_Test:test_StreamedAmountOf_StreamHasBeenCanceled_StatusCanceled() (gas: 78511) +StreamedAmountOf_LockupLinear_Integration_Concrete_Test:test_StreamedAmountOf_StreamHasBeenCanceled_StatusDepleted() (gas: 107015) +StreamedAmountOf_LockupLinear_Integration_Fuzz_Test:testFuzz_StreamedAmountOf_Calculation(uint40,uint128) (runs: 50, μ: 232606, ~: 233276) +StreamedAmountOf_LockupLinear_Integration_Fuzz_Test:testFuzz_StreamedAmountOf_CliffTimeInTheFuture(uint40) (runs: 50, μ: 27328, ~: 27604) +StreamedAmountOf_LockupLinear_Integration_Fuzz_Test:testFuzz_StreamedAmountOf_Monotonicity(uint40,uint40,uint128) (runs: 50, μ: 237475, ~: 239593) TokenURI_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_NFTDoesNotExist() (gas: 13542) TokenURI_LockupDynamic_Integration_Concrete_Test:test_TokenURI_Decoded() (gas: 6624) TokenURI_LockupDynamic_Integration_Concrete_Test:test_TokenURI_Full() (gas: 6601) TokenURI_LockupLinear_Integration_Concrete_Test:test_RevertGiven_NFTDoesNotExist() (gas: 13525) TokenURI_LockupLinear_Integration_Concrete_Test:test_TokenURI_Decoded() (gas: 6624) TokenURI_LockupLinear_Integration_Concrete_Test:test_TokenURI_Full() (gas: 6601) -TransferFrom_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StreamNotTransferable() (gas: 314151) -TransferFrom_LockupDynamic_Integration_Concrete_Test:test_TransferFrom() (gas: 326457) -TransferFrom_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StreamNotTransferable() (gas: 240338) -TransferFrom_LockupLinear_Integration_Concrete_Test:test_TransferFrom() (gas: 253182) +TransferFrom_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StreamNotTransferable() (gas: 314077) +TransferFrom_LockupDynamic_Integration_Concrete_Test:test_TransferFrom() (gas: 326383) +TransferFrom_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StreamNotTransferable() (gas: 240264) +TransferFrom_LockupLinear_Integration_Concrete_Test:test_TransferFrom() (gas: 253108) WasCanceled_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 12048) -WasCanceled_LockupDynamic_Integration_Concrete_Test:test_WasCanceled() (gas: 364415) -WasCanceled_LockupDynamic_Integration_Concrete_Test:test_WasCanceled_StreamNotCanceled() (gas: 327602) +WasCanceled_LockupDynamic_Integration_Concrete_Test:test_WasCanceled() (gas: 364341) +WasCanceled_LockupDynamic_Integration_Concrete_Test:test_WasCanceled_StreamNotCanceled() (gas: 327528) WasCanceled_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 12069) -WasCanceled_LockupLinear_Integration_Concrete_Test:test_WasCanceled() (gas: 289206) -WasCanceled_LockupLinear_Integration_Concrete_Test:test_WasCanceled_StreamNotCanceled() (gas: 254379) -WithdrawMaxAndTransfer_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_NFTBurned() (gas: 75301) +WasCanceled_LockupLinear_Integration_Concrete_Test:test_WasCanceled() (gas: 289132) +WasCanceled_LockupLinear_Integration_Concrete_Test:test_WasCanceled_StreamNotCanceled() (gas: 254305) +WithdrawMaxAndTransfer_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_NFTBurned() (gas: 75278) WithdrawMaxAndTransfer_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 14165) -WithdrawMaxAndTransfer_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StreamNotTransferable() (gas: 265000) -WithdrawMaxAndTransfer_LockupDynamic_Integration_Concrete_Test:test_WithdrawMaxAndTransfer() (gas: 158508) -WithdrawMaxAndTransfer_LockupDynamic_Integration_Concrete_Test:test_WithdrawMaxAndTransfer_WithdrawableAmountZero() (gas: 100445) -WithdrawMaxAndTransfer_LockupDynamic_Integration_Fuzz_Test:testFuzz_WithdrawMaxAndTransfer(uint256,address) (runs: 50, μ: 136366, ~: 155717) -WithdrawMaxAndTransfer_LockupLinear_Integration_Concrete_Test:test_RevertGiven_NFTBurned() (gas: 75583) +WithdrawMaxAndTransfer_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StreamNotTransferable() (gas: 264926) +WithdrawMaxAndTransfer_LockupDynamic_Integration_Concrete_Test:test_WithdrawMaxAndTransfer() (gas: 158530) +WithdrawMaxAndTransfer_LockupDynamic_Integration_Concrete_Test:test_WithdrawMaxAndTransfer_WithdrawableAmountZero() (gas: 100422) +WithdrawMaxAndTransfer_LockupDynamic_Integration_Fuzz_Test:testFuzz_WithdrawMaxAndTransfer(uint256,address) (runs: 50, μ: 137956, ~: 155649) +WithdrawMaxAndTransfer_LockupLinear_Integration_Concrete_Test:test_RevertGiven_NFTBurned() (gas: 75560) WithdrawMaxAndTransfer_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 14179) -WithdrawMaxAndTransfer_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StreamNotTransferable() (gas: 189268) -WithdrawMaxAndTransfer_LockupLinear_Integration_Concrete_Test:test_WithdrawMaxAndTransfer() (gas: 111578) -WithdrawMaxAndTransfer_LockupLinear_Integration_Concrete_Test:test_WithdrawMaxAndTransfer_WithdrawableAmountZero() (gas: 100775) -WithdrawMaxAndTransfer_LockupLinear_Integration_Fuzz_Test:testFuzz_WithdrawMaxAndTransfer(uint256,address) (runs: 50, μ: 101446, ~: 109924) -WithdrawMax_LockupDynamic_Integration_Concrete_Test:test_WithdrawMax() (gas: 134996) -WithdrawMax_LockupDynamic_Integration_Concrete_Test:test_WithdrawMax_EndTimeNotInTheFuture() (gas: 80178) -WithdrawMax_LockupDynamic_Integration_Fuzz_Test:testFuzz_WithdrawMax(uint256) (runs: 50, μ: 117466, ~: 120596) -WithdrawMax_LockupDynamic_Integration_Fuzz_Test:testFuzz_WithdrawMax_EndTimeNotInTheFuture(uint256) (runs: 50, μ: 82778, ~: 82960) -WithdrawMax_LockupLinear_Integration_Concrete_Test:test_WithdrawMax() (gas: 74491) -WithdrawMax_LockupLinear_Integration_Concrete_Test:test_WithdrawMax_EndTimeNotInTheFuture() (gas: 80494) -WithdrawMax_LockupLinear_Integration_Fuzz_Test:testFuzz_WithdrawMax(uint256) (runs: 50, μ: 73602, ~: 73703) +WithdrawMaxAndTransfer_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StreamNotTransferable() (gas: 189194) +WithdrawMaxAndTransfer_LockupLinear_Integration_Concrete_Test:test_WithdrawMaxAndTransfer() (gas: 111600) +WithdrawMaxAndTransfer_LockupLinear_Integration_Concrete_Test:test_WithdrawMaxAndTransfer_WithdrawableAmountZero() (gas: 100752) +WithdrawMaxAndTransfer_LockupLinear_Integration_Fuzz_Test:testFuzz_WithdrawMaxAndTransfer(uint256,address) (runs: 50, μ: 99586, ~: 109924) +WithdrawMax_LockupDynamic_Integration_Concrete_Test:test_WithdrawMax() (gas: 135018) +WithdrawMax_LockupDynamic_Integration_Concrete_Test:test_WithdrawMax_EndTimeNotInTheFuture() (gas: 80155) +WithdrawMax_LockupDynamic_Integration_Fuzz_Test:testFuzz_WithdrawMax(uint256) (runs: 50, μ: 117353, ~: 120534) +WithdrawMax_LockupDynamic_Integration_Fuzz_Test:testFuzz_WithdrawMax_EndTimeNotInTheFuture(uint256) (runs: 50, μ: 82847, ~: 82960) +WithdrawMax_LockupLinear_Integration_Concrete_Test:test_WithdrawMax() (gas: 74513) +WithdrawMax_LockupLinear_Integration_Concrete_Test:test_WithdrawMax_EndTimeNotInTheFuture() (gas: 80471) +WithdrawMax_LockupLinear_Integration_Fuzz_Test:testFuzz_WithdrawMax(uint256) (runs: 50, μ: 73547, ~: 73702) WithdrawMax_LockupLinear_Integration_Fuzz_Test:testFuzz_WithdrawMax_EndTimeNotInTheFuture(uint256) (runs: 50, μ: 83094, ~: 83276) -WithdrawMultiple_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_AllStatusesDepleted() (gas: 73755) +WithdrawMultiple_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_AllStatusesDepleted() (gas: 73732) WithdrawMultiple_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_OnlyNull() (gas: 21033) -WithdrawMultiple_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_SomeNull() (gas: 124543) -WithdrawMultiple_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_SomeStatusesDepleted() (gas: 83228) -WithdrawMultiple_LockupDynamic_Integration_Concrete_Test:test_WithdrawMultiple() (gas: 1830075) +WithdrawMultiple_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_SomeNull() (gas: 124565) +WithdrawMultiple_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_SomeStatusesDepleted() (gas: 83205) +WithdrawMultiple_LockupDynamic_Integration_Concrete_Test:test_WithdrawMultiple() (gas: 1829631) WithdrawMultiple_LockupDynamic_Integration_Concrete_Test:test_WithdrawMultiple_ArrayCountsZero() (gas: 9112) -WithdrawMultiple_LockupDynamic_Integration_Fuzz_Test:testFuzz_WithdrawMultiple(uint256,address,uint128) (runs: 50, μ: 2744527, ~: 2744738) -WithdrawMultiple_LockupLinear_Integration_Concrete_Test:test_RevertGiven_AllStatusesDepleted() (gas: 74018) +WithdrawMultiple_LockupDynamic_Integration_Fuzz_Test:testFuzz_WithdrawMultiple(uint256,address,uint128) (runs: 50, μ: 2743359, ~: 2743632) +WithdrawMultiple_LockupLinear_Integration_Concrete_Test:test_RevertGiven_AllStatusesDepleted() (gas: 73995) WithdrawMultiple_LockupLinear_Integration_Concrete_Test:test_RevertGiven_OnlyNull() (gas: 21020) -WithdrawMultiple_LockupLinear_Integration_Concrete_Test:test_RevertGiven_SomeNull() (gas: 105130) -WithdrawMultiple_LockupLinear_Integration_Concrete_Test:test_RevertGiven_SomeStatusesDepleted() (gas: 83491) -WithdrawMultiple_LockupLinear_Integration_Concrete_Test:test_WithdrawMultiple() (gas: 1263872) +WithdrawMultiple_LockupLinear_Integration_Concrete_Test:test_RevertGiven_SomeNull() (gas: 105152) +WithdrawMultiple_LockupLinear_Integration_Concrete_Test:test_RevertGiven_SomeStatusesDepleted() (gas: 83468) +WithdrawMultiple_LockupLinear_Integration_Concrete_Test:test_WithdrawMultiple() (gas: 1263428) WithdrawMultiple_LockupLinear_Integration_Concrete_Test:test_WithdrawMultiple_ArrayCountsZero() (gas: 9165) -WithdrawMultiple_LockupLinear_Integration_Fuzz_Test:testFuzz_WithdrawMultiple(uint256,address,uint128) (runs: 50, μ: 1773301, ~: 1773175) +WithdrawMultiple_LockupLinear_Integration_Fuzz_Test:testFuzz_WithdrawMultiple(uint256,address,uint128) (runs: 50, μ: 1772371, ~: 1772218) Withdraw_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 19930) -Withdraw_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StreamDepleted() (gas: 67757) -Withdraw_LockupDynamic_Integration_Concrete_Test:test_Withdraw() (gas: 385016) -Withdraw_LockupDynamic_Integration_Concrete_Test:test_Withdraw_CallerApprovedOperator() (gas: 112705) -Withdraw_LockupDynamic_Integration_Concrete_Test:test_Withdraw_CallerRecipient() (gas: 81264) -Withdraw_LockupDynamic_Integration_Concrete_Test:test_Withdraw_EndTimeNotInTheFuture() (gas: 72522) -Withdraw_LockupDynamic_Integration_Concrete_Test:test_Withdraw_RecipientDoesNotImplementHook() (gas: 362691) -Withdraw_LockupDynamic_Integration_Concrete_Test:test_Withdraw_RecipientNotContract() (gas: 122619) -Withdraw_LockupDynamic_Integration_Concrete_Test:test_Withdraw_RecipientReentrancy() (gas: 390024) -Withdraw_LockupDynamic_Integration_Concrete_Test:test_Withdraw_RecipientReverts() (gas: 363246) -Withdraw_LockupDynamic_Integration_Concrete_Test:test_Withdraw_StreamHasBeenCanceled() (gas: 382203) -Withdraw_LockupDynamic_Integration_Fuzz_Test:testFuzz_Withdraw(uint256,address,uint128) (runs: 50, μ: 124033, ~: 98708) -Withdraw_LockupDynamic_Integration_Fuzz_Test:testFuzz_Withdraw_CallerApprovedOperator(address) (runs: 50, μ: 145420, ~: 145420) -Withdraw_LockupDynamic_Integration_Fuzz_Test:testFuzz_Withdraw_SegmentFuzing(((uint128,uint64,uint40)[],uint256,address)) (runs: 50, μ: 3963949, ~: 3999433) -Withdraw_LockupDynamic_Integration_Fuzz_Test:testFuzz_Withdraw_StreamHasBeenCanceled(uint256,address,uint128) (runs: 50, μ: 160726, ~: 160927) +Withdraw_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_StreamDepleted() (gas: 67734) +Withdraw_LockupDynamic_Integration_Concrete_Test:test_Withdraw() (gas: 384964) +Withdraw_LockupDynamic_Integration_Concrete_Test:test_Withdraw_CallerApprovedOperator() (gas: 112727) +Withdraw_LockupDynamic_Integration_Concrete_Test:test_Withdraw_CallerRecipient() (gas: 81286) +Withdraw_LockupDynamic_Integration_Concrete_Test:test_Withdraw_EndTimeNotInTheFuture() (gas: 72499) +Withdraw_LockupDynamic_Integration_Concrete_Test:test_Withdraw_RecipientDoesNotImplementHook() (gas: 362639) +Withdraw_LockupDynamic_Integration_Concrete_Test:test_Withdraw_RecipientNotContract() (gas: 122641) +Withdraw_LockupDynamic_Integration_Concrete_Test:test_Withdraw_RecipientReentrancy() (gas: 389972) +Withdraw_LockupDynamic_Integration_Concrete_Test:test_Withdraw_RecipientReverts() (gas: 363194) +Withdraw_LockupDynamic_Integration_Concrete_Test:test_Withdraw_StreamHasBeenCanceled() (gas: 382151) +Withdraw_LockupDynamic_Integration_Fuzz_Test:testFuzz_Withdraw(uint256,address,uint128) (runs: 50, μ: 125250, ~: 98709) +Withdraw_LockupDynamic_Integration_Fuzz_Test:testFuzz_Withdraw_CallerApprovedOperator(address) (runs: 50, μ: 145442, ~: 145442) +Withdraw_LockupDynamic_Integration_Fuzz_Test:testFuzz_Withdraw_SegmentFuzing(((uint128,uint64,uint40)[],uint256,address)) (runs: 50, μ: 3959980, ~: 3999315) +Withdraw_LockupDynamic_Integration_Fuzz_Test:testFuzz_Withdraw_StreamHasBeenCanceled(uint256,address,uint128) (runs: 50, μ: 160679, ~: 160866) Withdraw_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 19917) -Withdraw_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StreamDepleted() (gas: 68020) -Withdraw_LockupLinear_Integration_Concrete_Test:test_Withdraw() (gas: 268373) -Withdraw_LockupLinear_Integration_Concrete_Test:test_Withdraw_CallerApprovedOperator() (gas: 93092) -Withdraw_LockupLinear_Integration_Concrete_Test:test_Withdraw_CallerRecipient() (gas: 61640) -Withdraw_LockupLinear_Integration_Concrete_Test:test_Withdraw_EndTimeNotInTheFuture() (gas: 72719) -Withdraw_LockupLinear_Integration_Concrete_Test:test_Withdraw_RecipientDoesNotImplementHook() (gas: 259672) -Withdraw_LockupLinear_Integration_Concrete_Test:test_Withdraw_RecipientNotContract() (gas: 75746) -Withdraw_LockupLinear_Integration_Concrete_Test:test_Withdraw_RecipientReentrancy() (gas: 273408) -Withdraw_LockupLinear_Integration_Concrete_Test:test_Withdraw_RecipientReverts() (gas: 260227) -Withdraw_LockupLinear_Integration_Concrete_Test:test_Withdraw_StreamHasBeenCanceled() (gas: 292836) -Withdraw_LockupLinear_Integration_Fuzz_Test:testFuzz_Withdraw(uint256,address,uint128) (runs: 50, μ: 99421, ~: 99269) -Withdraw_LockupLinear_Integration_Fuzz_Test:testFuzz_Withdraw_CallerApprovedOperator(address) (runs: 50, μ: 112211, ~: 112211) -Withdraw_LockupLinear_Integration_Fuzz_Test:testFuzz_Withdraw_StreamHasBeenCanceled(uint256,address,uint128) (runs: 50, μ: 141225, ~: 141111) +Withdraw_LockupLinear_Integration_Concrete_Test:test_RevertGiven_StreamDepleted() (gas: 67997) +Withdraw_LockupLinear_Integration_Concrete_Test:test_Withdraw() (gas: 268321) +Withdraw_LockupLinear_Integration_Concrete_Test:test_Withdraw_CallerApprovedOperator() (gas: 93114) +Withdraw_LockupLinear_Integration_Concrete_Test:test_Withdraw_CallerRecipient() (gas: 61662) +Withdraw_LockupLinear_Integration_Concrete_Test:test_Withdraw_EndTimeNotInTheFuture() (gas: 72696) +Withdraw_LockupLinear_Integration_Concrete_Test:test_Withdraw_RecipientDoesNotImplementHook() (gas: 259620) +Withdraw_LockupLinear_Integration_Concrete_Test:test_Withdraw_RecipientNotContract() (gas: 75768) +Withdraw_LockupLinear_Integration_Concrete_Test:test_Withdraw_RecipientReentrancy() (gas: 273356) +Withdraw_LockupLinear_Integration_Concrete_Test:test_Withdraw_RecipientReverts() (gas: 260175) +Withdraw_LockupLinear_Integration_Concrete_Test:test_Withdraw_StreamHasBeenCanceled() (gas: 292784) +Withdraw_LockupLinear_Integration_Fuzz_Test:testFuzz_Withdraw(uint256,address,uint128) (runs: 50, μ: 99363, ~: 99269) +Withdraw_LockupLinear_Integration_Fuzz_Test:testFuzz_Withdraw_CallerApprovedOperator(address) (runs: 50, μ: 112233, ~: 112233) +Withdraw_LockupLinear_Integration_Fuzz_Test:testFuzz_Withdraw_StreamHasBeenCanceled(uint256,address,uint128) (runs: 50, μ: 141175, ~: 141030) WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 12045) -WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test:test_WithdrawableAmountOf() (gas: 378069) -WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test:test_WithdrawableAmountOf_NoPreviousWithdrawals() (gas: 347594) -WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test:test_WithdrawableAmountOf_StartTimeInThePresent() (gas: 337199) -WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test:test_WithdrawableAmountOf_StatusDepleted() (gas: 363614) -WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test:test_WithdrawableAmountOf_StatusPending() (gas: 333948) -WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test:test_WithdrawableAmountOf_StatusSettled() (gas: 340171) -WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test:test_WithdrawableAmountOf_StreamHasBeenCanceled_StatusCanceled() (gas: 378411) -WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test:test_WithdrawableAmountOf_StreamHasBeenCanceled_StatusDepleted() (gas: 400456) -WithdrawableAmountOf_LockupDynamic_Integration_Fuzz_Test:testFuzz_WithdrawableAmountOf(uint40,uint128) (runs: 50, μ: 332901, ~: 320879) -WithdrawableAmountOf_LockupDynamic_Integration_Fuzz_Test:testFuzz_WithdrawableAmountOf_NoPreviousWithdrawals(uint40) (runs: 50, μ: 301928, ~: 300161) -WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 12076) -WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test:test_WithdrawableAmountOf_CliffTimeInTheFuture() (gas: 253600) -WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test:test_WithdrawableAmountOf_NoPreviousWithdrawals() (gas: 263471) -WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test:test_WithdrawableAmountOf_StatusDepleted() (gas: 288644) -WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test:test_WithdrawableAmountOf_StatusPending() (gas: 258672) -WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test:test_WithdrawableAmountOf_StatusSettled() (gas: 265025) -WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test:test_WithdrawableAmountOf_StreamHasBeenCanceled_StatusCanceled() (gas: 299992) -WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test:test_WithdrawableAmountOf_StreamHasBeenCanceled_StatusDepleted() (gas: 322002) -WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test:test_WithdrawableAmountOf_WithWithdrawals() (gas: 287022) -WithdrawableAmountOf_LockupLinear_Integration_Fuzz_Test:testFuzz_WithdrawableAmountOf(uint40,uint128,uint128) (runs: 50, μ: 461540, ~: 460821) -WithdrawableAmountOf_LockupLinear_Integration_Fuzz_Test:testFuzz_WithdrawableAmountOf_CliffTimeInTheFuture(uint40) (runs: 50, μ: 263665, ~: 263941) -WithdrawableAmountOf_LockupLinear_Integration_Fuzz_Test:testFuzz_WithdrawableAmountOf_NoPreviousWithdrawals(uint40,uint128) (runs: 50, μ: 437724, ~: 436534) \ No newline at end of file +WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test:test_WithdrawableAmountOf() (gas: 377995) +WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test:test_WithdrawableAmountOf_NoPreviousWithdrawals() (gas: 347520) +WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test:test_WithdrawableAmountOf_StartTimeInThePresent() (gas: 337125) +WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test:test_WithdrawableAmountOf_StatusDepleted() (gas: 363517) +WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test:test_WithdrawableAmountOf_StatusPending() (gas: 333874) +WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test:test_WithdrawableAmountOf_StatusSettled() (gas: 340074) +WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test:test_WithdrawableAmountOf_StreamHasBeenCanceled_StatusCanceled() (gas: 378359) +WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test:test_WithdrawableAmountOf_StreamHasBeenCanceled_StatusDepleted() (gas: 400382) +WithdrawableAmountOf_LockupDynamic_Integration_Fuzz_Test:testFuzz_WithdrawableAmountOf(uint40,uint128) (runs: 50, μ: 334198, ~: 351909) +WithdrawableAmountOf_LockupDynamic_Integration_Fuzz_Test:testFuzz_WithdrawableAmountOf_NoPreviousWithdrawals(uint40) (runs: 50, μ: 296030, ~: 289610) +WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test:test_RevertGiven_Null() (gas: 12043) +WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test:test_WithdrawableAmountOf_CliffTimeInTheFuture() (gas: 253526) +WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test:test_WithdrawableAmountOf_NoPreviousWithdrawals() (gas: 263386) +WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test:test_WithdrawableAmountOf_StatusDepleted() (gas: 288514) +WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test:test_WithdrawableAmountOf_StatusPending() (gas: 258565) +WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test:test_WithdrawableAmountOf_StatusSettled() (gas: 264895) +WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test:test_WithdrawableAmountOf_StreamHasBeenCanceled_StatusCanceled() (gas: 299907) +WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test:test_WithdrawableAmountOf_StreamHasBeenCanceled_StatusDepleted() (gas: 321862) +WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test:test_WithdrawableAmountOf_WithWithdrawals() (gas: 286937) +WithdrawableAmountOf_LockupLinear_Integration_Fuzz_Test:testFuzz_WithdrawableAmountOf(uint40,uint128,uint128) (runs: 50, μ: 461607, ~: 462240) +WithdrawableAmountOf_LockupLinear_Integration_Fuzz_Test:testFuzz_WithdrawableAmountOf_CliffTimeInTheFuture(uint40) (runs: 50, μ: 263604, ~: 263867) +WithdrawableAmountOf_LockupLinear_Integration_Fuzz_Test:testFuzz_WithdrawableAmountOf_NoPreviousWithdrawals(uint40,uint128) (runs: 50, μ: 437554, ~: 438494) \ No newline at end of file diff --git a/README.md b/README.md index 84c7526ea..55b3785f1 100644 --- a/README.md +++ b/README.md @@ -104,10 +104,6 @@ it is explained in depth [here](https://github.com/sablier-labs/v2-core/wiki/Tes The list of all deployment addresses can be found [here](https://docs.sablier.com). For guidance on the deploy scripts, see the [Deployments wiki](https://github.com/sablier-labs/v2-core/wiki/Deployments). -It is worth noting that not every file in this repository is included in the current deployments. For instance, the -`SablierV2FlashLoan` abstract is not inherited by any contract on the `main` branch, but we have kept it in version -control because we may decide to use it in the future. - ## Security The codebase has undergone rigorous audits by leading security experts from Cantina, as well as independent auditors. diff --git a/script/Init.s.sol b/script/Init.s.sol index 8a99762ac..f3169f902 100644 --- a/script/Init.s.sol +++ b/script/Init.s.sol @@ -7,7 +7,6 @@ import { ud60x18 } from "@prb/math/src/UD60x18.sol"; import { Solarray } from "solarray/src/Solarray.sol"; -import { ISablierV2Comptroller } from "../src/interfaces/ISablierV2Comptroller.sol"; import { ISablierV2LockupDynamic } from "../src/interfaces/ISablierV2LockupDynamic.sol"; import { ISablierV2LockupLinear } from "../src/interfaces/ISablierV2LockupLinear.sol"; import { Broker, LockupDynamic, LockupLinear } from "../src/types/DataTypes.sol"; @@ -21,7 +20,6 @@ interface IERC20Mint { /// @notice Initializes the protocol by setting up the comptroller and creating some streams. contract Init is BaseScript { function run( - ISablierV2Comptroller comptroller, ISablierV2LockupLinear lockupLinear, ISablierV2LockupDynamic lockupDynamic, IERC20 asset @@ -32,18 +30,6 @@ contract Init is BaseScript { address sender = broadcaster; address recipient = vm.addr(vm.deriveKey({ mnemonic: mnemonic, index: 1 })); - /*////////////////////////////////////////////////////////////////////////// - COMPTROLLER - //////////////////////////////////////////////////////////////////////////*/ - - // Enable the ERC-20 asset for flash loaning. - if (!comptroller.isFlashAsset(asset)) { - comptroller.toggleFlashAsset(asset); - } - - // Set the flash fee to 0.05%. - comptroller.setFlashFee({ newFlashFee: ud60x18(0.0005e18) }); - /*////////////////////////////////////////////////////////////////////////// LOCKUP-LINEAR //////////////////////////////////////////////////////////////////////////*/ diff --git a/src/SablierV2Comptroller.sol b/src/SablierV2Comptroller.sol index 2c7390980..696866d0d 100644 --- a/src/SablierV2Comptroller.sol +++ b/src/SablierV2Comptroller.sol @@ -36,12 +36,6 @@ contract SablierV2Comptroller is PUBLIC STORAGE //////////////////////////////////////////////////////////////////////////*/ - /// @inheritdoc ISablierV2Comptroller - UD60x18 public override flashFee; - - /// @inheritdoc ISablierV2Comptroller - mapping(IERC20 asset => bool supported) public override isFlashAsset; - /// @inheritdoc ISablierV2Comptroller mapping(IERC20 asset => UD60x18 fee) public override protocolFees; @@ -60,16 +54,6 @@ contract SablierV2Comptroller is USER-FACING NON-CONSTANT FUNCTIONS //////////////////////////////////////////////////////////////////////////*/ - /// @inheritdoc ISablierV2Comptroller - function setFlashFee(UD60x18 newFlashFee) external override onlyAdmin { - // Effects: set the new flash fee. - UD60x18 oldFlashFee = flashFee; - flashFee = newFlashFee; - - // Log the change of the flash fee. - emit ISablierV2Comptroller.SetFlashFee({ admin: msg.sender, oldFlashFee: oldFlashFee, newFlashFee: newFlashFee }); - } - /// @inheritdoc ISablierV2Comptroller function setProtocolFee(IERC20 asset, UD60x18 newProtocolFee) external override onlyAdmin { // Effects: set the new global fee. @@ -84,14 +68,4 @@ contract SablierV2Comptroller is newProtocolFee: newProtocolFee }); } - - /// @inheritdoc ISablierV2Comptroller - function toggleFlashAsset(IERC20 asset) external override onlyAdmin { - // Effects: enable the ERC-20 asset for flash loaning. - bool oldFlag = isFlashAsset[asset]; - isFlashAsset[asset] = !oldFlag; - - // Log the change of the flash asset flag. - emit ISablierV2Comptroller.ToggleFlashAsset({ admin: msg.sender, asset: asset, newFlag: !oldFlag }); - } } diff --git a/src/abstracts/SablierV2FlashLoan.sol b/src/abstracts/SablierV2FlashLoan.sol deleted file mode 100644 index 2b2002f74..000000000 --- a/src/abstracts/SablierV2FlashLoan.sol +++ /dev/null @@ -1,174 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -pragma solidity >=0.8.19; - -import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; -import { ud } from "@prb/math/src/UD60x18.sol"; - -import { IERC3156FlashBorrower } from "../interfaces/erc3156/IERC3156FlashBorrower.sol"; -import { IERC3156FlashLender } from "../interfaces/erc3156/IERC3156FlashLender.sol"; -import { Errors } from "../libraries/Errors.sol"; -import { SablierV2Base } from "./SablierV2Base.sol"; - -/// @title SablierV2FlashLoan -/// @notice This contract implements the ERC-3156 standard to enable flash loans. -/// @dev See https://eips.ethereum.org/EIPS/eip-3156. -abstract contract SablierV2FlashLoan is - IERC3156FlashLender, // 0 inherited components - SablierV2Base // 4 inherited components -{ - using SafeERC20 for IERC20; - - /*////////////////////////////////////////////////////////////////////////// - EVENTS - //////////////////////////////////////////////////////////////////////////*/ - - /// @notice Emitted when a flash loan is executed. - /// @param initiator The address of the flash loan initiator. - /// @param receiver The address of the flash borrower. - /// @param asset The address of the ERC-20 asset that has been flash loaned. - /// @param amount The amount of `asset` flash loaned. - /// @param feeAmount The fee amount of `asset` charged by the protocol. - /// @param data The data passed to the flash borrower. - event FlashLoan( - address indexed initiator, - IERC3156FlashBorrower indexed receiver, - IERC20 indexed asset, - uint256 amount, - uint256 feeAmount, - bytes data - ); - - /*////////////////////////////////////////////////////////////////////////// - INTERNAL CONSTANTS - //////////////////////////////////////////////////////////////////////////*/ - - bytes32 internal constant CALLBACK_SUCCESS = keccak256("ERC3156FlashBorrower.onFlashLoan"); - - /*////////////////////////////////////////////////////////////////////////// - CONSTANT FUNCTIONS - //////////////////////////////////////////////////////////////////////////*/ - - /// @notice The amount of fees to charge for a hypothetical flash loan amount. - /// - /// @dev You might notice a bit of a terminology clash here, since the ERC-3156 standard refers to the "flash fee" - /// as an amount, whereas the flash fee retrieved from the comptroller is a percentage. Throughout the code base, - /// the "amount" suffix is typically appended to variables that represent amounts, but, in this context, the name - /// must be kept unchanged to comply with the ERC. - /// - /// Requirements: - /// - The ERC-20 asset must be flash loanable. - /// - /// @param asset The ERC-20 asset to flash loan. - /// @param amount The amount of `asset` flash loaned. - /// @return fee The amount of `asset` to charge for the loan on top of the returned principal. - function flashFee(address asset, uint256 amount) public view override returns (uint256 fee) { - // Checks: the ERC-20 asset is flash loanable. - if (!comptroller.isFlashAsset(IERC20(asset))) { - revert Errors.SablierV2FlashLoan_AssetNotFlashLoanable(IERC20(asset)); - } - - // Calculate the flash fee. - fee = ud(amount).mul(comptroller.flashFee()).intoUint256(); - } - - /// @notice The amount of ERC-20 assets available for flash loan. - /// @dev If the ERC-20 asset is not flash loanable, this function returns zero. - /// @param asset The address of the ERC-20 asset to query. - /// @return amount The amount of `asset` that can be flash loaned. - function maxFlashLoan(address asset) external view override returns (uint256 amount) { - // The default value is zero, so it doesn't have to be explicitly set. - if (comptroller.isFlashAsset(IERC20(asset))) { - amount = IERC20(asset).balanceOf(address(this)); - } - } - - /*////////////////////////////////////////////////////////////////////////// - NON-CONSTANT FUNCTIONS - //////////////////////////////////////////////////////////////////////////*/ - - /// @notice Allows smart contracts to access the entire liquidity of the Sablier V2 contract within one - /// transaction as long as the principal plus a flash fee is returned. - /// - /// @dev Emits a {FlashLoan} event. - /// - /// Requirements: - /// - Must not be delegate called. - /// - Refer to the requirements in {flashFee}. - /// - `amount` must be less than 2^128. - /// - `fee` must be less than 2^128. - /// - `amount` must not exceed the liquidity available for `asset`. - /// - `msg.sender` must allow this contract to spend at least `amount + fee` assets. - /// - `receiver` implementation of {IERC3156FlashBorrower.onFlashLoan} must return `CALLBACK_SUCCESS`. - /// - /// @param receiver The receiver of the flash loaned assets, and the receiver of the callback. - /// @param asset The address of the ERC-20 asset to use for flash borrowing. - /// @param amount The amount of `asset` to flash loan. - /// @param data Arbitrary data structure, intended to contain user-defined parameters. - /// @return success `true` on success. - function flashLoan( - IERC3156FlashBorrower receiver, - address asset, - uint256 amount, - bytes calldata data - ) - external - override - noDelegateCall - returns (bool success) - { - // Checks: the amount is less than 2^128. This prevents the below calculations from overflowing. - if (amount > type(uint128).max) { - revert Errors.SablierV2FlashLoan_AmountTooHigh(amount); - } - - // Calculate the flash fee. This also checks that the ERC-20 asset is flash loanable. - uint256 fee = flashFee(asset, amount); - - // Checks: the calculated fee is less than 2^128. This check can fail only when the comptroller flash fee - // is set to an abnormally high value. - if (fee > type(uint128).max) { - revert Errors.SablierV2FlashLoan_CalculatedFeeTooHigh(fee); - } - - // Interactions: perform the ERC-20 transfer to flash loan the assets to the borrower. - IERC20(asset).safeTransfer({ to: address(receiver), value: amount }); - - // Interactions: perform the borrower callback. - bytes32 response = - receiver.onFlashLoan({ initiator: msg.sender, asset: asset, amount: amount, fee: fee, data: data }); - - // Checks: the response matches the expected callback success hash. - if (response != CALLBACK_SUCCESS) { - revert Errors.SablierV2FlashLoan_FlashBorrowFail(); - } - - uint256 returnAmount; - - // Using unchecked arithmetic because the checks above prevent these calculations from overflowing. - unchecked { - // Effects: record the flash fee amount in the protocol revenues. The casting to uint128 is safe due - // to the check at the start of the function. - protocolRevenues[IERC20(asset)] = protocolRevenues[IERC20(asset)] + uint128(fee); - - // Calculate the amount that the borrower must return. - returnAmount = amount + fee; - } - - // Interactions: perform the ERC-20 transfer to get the principal back plus the fee. - IERC20(asset).safeTransferFrom({ from: address(receiver), to: address(this), value: returnAmount }); - - // Log the flash loan. - emit FlashLoan({ - initiator: msg.sender, - receiver: receiver, - asset: IERC20(asset), - amount: amount, - feeAmount: fee, - data: data - }); - - // Set the success flag. - success = true; - } -} diff --git a/src/interfaces/ISablierV2Comptroller.sol b/src/interfaces/ISablierV2Comptroller.sol index a6a471530..d7b779d69 100644 --- a/src/interfaces/ISablierV2Comptroller.sol +++ b/src/interfaces/ISablierV2Comptroller.sol @@ -14,12 +14,6 @@ interface ISablierV2Comptroller is IAdminable { EVENTS //////////////////////////////////////////////////////////////////////////*/ - /// @notice Emitted when the admin sets a new flash fee. - /// @param admin The address of the contract admin. - /// @param oldFlashFee The old flash fee, denoted as a fixed-point number. - /// @param newFlashFee The new flash fee, denoted as a fixed-point number. - event SetFlashFee(address indexed admin, UD60x18 oldFlashFee, UD60x18 newFlashFee); - /// @notice Emitted when the admin sets a new protocol fee for the provided ERC-20 asset. /// @param admin The address of the contract admin. /// @param asset The contract address of the ERC-20 asset the new protocol fee has been set for. @@ -27,28 +21,10 @@ interface ISablierV2Comptroller is IAdminable { /// @param newProtocolFee The new protocol fee, denoted as a fixed-point number. event SetProtocolFee(address indexed admin, IERC20 indexed asset, UD60x18 oldProtocolFee, UD60x18 newProtocolFee); - /// @notice Emitted when the admin enables or disables an ERC-20 asset for flash loaning. - /// @param admin The address of the contract admin. - /// @param asset The contract address of the ERC-20 asset to toggle. - /// @param newFlag Whether the ERC-20 asset can be flash loaned. - event ToggleFlashAsset(address indexed admin, IERC20 indexed asset, bool newFlag); - /*////////////////////////////////////////////////////////////////////////// CONSTANT FUNCTIONS //////////////////////////////////////////////////////////////////////////*/ - /// @notice Retrieves the global flash fee, denoted as a fixed-point number where 1e18 is 100%. - /// - /// @dev Notes: - /// - This fee represents a percentage, not an amount. Do not confuse it with {IERC3156FlashLender.flashFee}, - /// which calculates the fee amount for a specified flash loan amount. - /// - Unlike the protocol fee, this is a global fee applied to all flash loans, not a per-asset fee. - function flashFee() external view returns (UD60x18 fee); - - /// @notice Retrieves a flag indicating whether the provided ERC-20 asset can be flash loaned. - /// @param token The contract address of the ERC-20 asset to check. - function isFlashAsset(IERC20 token) external view returns (bool result); - /// @notice Retrieves the protocol fee for all streams created with the provided ERC-20 asset. /// @param asset The contract address of the ERC-20 asset to query. /// @return fee The protocol fee denoted as a fixed-point number where 1e18 is 100%. @@ -58,19 +34,6 @@ interface ISablierV2Comptroller is IAdminable { NON-CONSTANT FUNCTIONS //////////////////////////////////////////////////////////////////////////*/ - /// @notice Updates the flash fee charged on all flash loans made with any ERC-20 asset. - /// - /// @dev Emits a {SetFlashFee} event. - /// - /// Notes: - /// - Does not revert if the fee is the same. - /// - /// Requirements: - /// - `msg.sender` must be the contract admin. - /// - /// @param newFlashFee The new flash fee to set, denoted as a fixed-point number where 1e18 is 100%. - function setFlashFee(UD60x18 newFlashFee) external; - /// @notice Sets a new protocol fee that will be charged on all streams created with the provided ERC-20 asset. /// /// @dev Emits a {SetProtocolFee} event. @@ -86,14 +49,4 @@ interface ISablierV2Comptroller is IAdminable { /// @param asset The contract address of the ERC-20 asset to update the fee for. /// @param newProtocolFee The new protocol fee, denoted as a fixed-point number where 1e18 is 100%. function setProtocolFee(IERC20 asset, UD60x18 newProtocolFee) external; - - /// @notice Toggles the flash loanability of an ERC-20 asset. - /// - /// @dev Emits a {ToggleFlashAsset} event. - /// - /// Requirements: - /// - `msg.sender` must be the admin. - /// - /// @param asset The address of the ERC-20 asset to toggle. - function toggleFlashAsset(IERC20 asset) external; } diff --git a/src/interfaces/erc3156/IERC3156FlashBorrower.sol b/src/interfaces/erc3156/IERC3156FlashBorrower.sol deleted file mode 100644 index d065ba3c3..000000000 --- a/src/interfaces/erc3156/IERC3156FlashBorrower.sol +++ /dev/null @@ -1,17 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19; - -/// @title IERC3156FlashBorrower -/// @notice Interface for ERC-3156 flash borrowers. -/// @dev See https://eips.ethereum.org/EIPS/eip-3156. -interface IERC3156FlashBorrower { - function onFlashLoan( - address initiator, - address asset, - uint256 amount, - uint256 fee, - bytes calldata data - ) - external - returns (bytes32); -} diff --git a/src/interfaces/erc3156/IERC3156FlashLender.sol b/src/interfaces/erc3156/IERC3156FlashLender.sol deleted file mode 100644 index bfecc2757..000000000 --- a/src/interfaces/erc3156/IERC3156FlashLender.sol +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19; - -import { IERC3156FlashBorrower } from "./IERC3156FlashBorrower.sol"; - -/// @title IERC3156FlashLender -/// @notice Interface for ERC-3156 flash lenders. -/// @dev See https://eips.ethereum.org/EIPS/eip-3156. -interface IERC3156FlashLender { - function maxFlashLoan(address asset) external view returns (uint256); - - function flashFee(address asset, uint256 amount) external view returns (uint256); - - function flashLoan( - IERC3156FlashBorrower receiver, - address asset, - uint256 amount, - bytes calldata data - ) - external - returns (bool); -} diff --git a/src/libraries/Errors.sol b/src/libraries/Errors.sol index 147cf9d1a..4332ab068 100644 --- a/src/libraries/Errors.sol +++ b/src/libraries/Errors.sol @@ -25,22 +25,6 @@ library Errors { /// @notice Thrown when trying to claim protocol revenues for an asset with no accrued revenues. error SablierV2Base_NoProtocolRevenues(IERC20 asset); - /*////////////////////////////////////////////////////////////////////////// - SABLIER-V2-FLASH-LOAN - //////////////////////////////////////////////////////////////////////////*/ - - /// @notice Thrown when trying to flash loan an unsupported asset. - error SablierV2FlashLoan_AssetNotFlashLoanable(IERC20 asset); - - /// @notice Thrown when trying to flash loan an amount greater than or equal to 2^128. - error SablierV2FlashLoan_AmountTooHigh(uint256 amount); - - /// @notice Thrown when the calculated fee during a flash loan is greater than or equal to 2^128. - error SablierV2FlashLoan_CalculatedFeeTooHigh(uint256 amount); - - /// @notice Thrown when the callback to the flash borrower fails. - error SablierV2FlashLoan_FlashBorrowFail(); - /*////////////////////////////////////////////////////////////////////////// SABLIER-V2-LOCKUP //////////////////////////////////////////////////////////////////////////*/ diff --git a/test/Base.t.sol b/test/Base.t.sol index b735e2f5f..7d24c7ba1 100644 --- a/test/Base.t.sol +++ b/test/Base.t.sol @@ -14,7 +14,6 @@ import { SablierV2LockupLinear } from "../src/SablierV2LockupLinear.sol"; import { SablierV2NFTDescriptor } from "../src/SablierV2NFTDescriptor.sol"; import { ERC20MissingReturn } from "./mocks/erc20/ERC20MissingReturn.sol"; -import { GoodFlashLoanReceiver } from "./mocks/flash-loan/GoodFlashLoanReceiver.sol"; import { Noop } from "./mocks/Noop.sol"; import { GoodRecipient } from "./mocks/hooks/GoodRecipient.sol"; import { Assertions } from "./utils/Assertions.sol"; @@ -41,7 +40,6 @@ abstract contract Base_Test is Assertions, Calculations, Constants, DeployOptimi ISablierV2Comptroller internal comptroller; ERC20 internal dai; Defaults internal defaults; - GoodFlashLoanReceiver internal goodFlashLoanReceiver; GoodRecipient internal goodRecipient; ISablierV2LockupDynamic internal lockupDynamic; ISablierV2LockupLinear internal lockupLinear; @@ -56,14 +54,12 @@ abstract contract Base_Test is Assertions, Calculations, Constants, DeployOptimi function setUp() public virtual { // Deploy the base test contracts. dai = new ERC20("Dai Stablecoin", "DAI"); - goodFlashLoanReceiver = new GoodFlashLoanReceiver(); goodRecipient = new GoodRecipient(); noop = new Noop(); usdt = new ERC20MissingReturn("Tether USD", "USDT", 6); // Label the base test contracts. vm.label({ account: address(dai), newLabel: "DAI" }); - vm.label({ account: address(goodFlashLoanReceiver), newLabel: "Good Flash Loan Receiver" }); vm.label({ account: address(goodRecipient), newLabel: "Good Recipient" }); vm.label({ account: address(nftDescriptor), newLabel: "NFT Descriptor" }); vm.label({ account: address(noop), newLabel: "Noop" }); diff --git a/test/integration/Integration.t.sol b/test/integration/Integration.t.sol index 2e0c62ab9..bdcd271d8 100644 --- a/test/integration/Integration.t.sol +++ b/test/integration/Integration.t.sol @@ -4,8 +4,6 @@ pragma solidity >=0.8.19 <0.9.0; import { Errors } from "src/libraries/Errors.sol"; import { Base_Test } from "../Base.t.sol"; -import { FaultyFlashLoanReceiver } from "../mocks/flash-loan/FaultyFlashLoanReceiver.sol"; -import { ReentrantFlashLoanReceiver } from "../mocks/flash-loan/ReentrantFlashLoanReceiver.sol"; import { ReentrantRecipient } from "../mocks/hooks/ReentrantRecipient.sol"; import { RevertingRecipient } from "../mocks/hooks/RevertingRecipient.sol"; @@ -15,8 +13,6 @@ abstract contract Integration_Test is Base_Test { TEST CONTRACTS //////////////////////////////////////////////////////////////////////////*/ - FaultyFlashLoanReceiver internal faultyFlashLoanReceiver = new FaultyFlashLoanReceiver(); - ReentrantFlashLoanReceiver internal reentrantFlashLoanReceiver = new ReentrantFlashLoanReceiver(); ReentrantRecipient internal reentrantRecipient = new ReentrantRecipient(); RevertingRecipient internal revertingRecipient = new RevertingRecipient(); @@ -46,8 +42,6 @@ abstract contract Integration_Test is Base_Test { /// @dev Labels the most relevant contracts. function labelContracts() internal { - vm.label({ account: address(faultyFlashLoanReceiver), newLabel: "Faulty Flash Loan Receiver" }); - vm.label({ account: address(reentrantFlashLoanReceiver), newLabel: "Reentrant Flash Loan Receiver" }); vm.label({ account: address(reentrantRecipient), newLabel: "Reentrant Lockup Recipient" }); vm.label({ account: address(revertingRecipient), newLabel: "Reverting Lockup Recipient" }); } diff --git a/test/integration/concrete/comptroller/set-protocol-fee/setProtocolFee.t.sol b/test/integration/concrete/comptroller/set-protocol-fee/setProtocolFee.s.sol similarity index 97% rename from test/integration/concrete/comptroller/set-protocol-fee/setProtocolFee.t.sol rename to test/integration/concrete/comptroller/set-protocol-fee/setProtocolFee.s.sol index 91944a606..bf16f79ee 100644 --- a/test/integration/concrete/comptroller/set-protocol-fee/setProtocolFee.t.sol +++ b/test/integration/concrete/comptroller/set-protocol-fee/setProtocolFee.s.sol @@ -41,7 +41,7 @@ contract SetProtocolFee_Integration_Concrete_Test is Integration_Test { } function test_SetProtocolFee() external whenCallerAdmin whenNewFee { - UD60x18 newProtocolFee = defaults.FLASH_FEE(); + UD60x18 newProtocolFee = defaults.PROTOCOL_FEE(); // Expect the relevant event to be emitted. vm.expectEmit({ emitter: address(comptroller) }); diff --git a/test/integration/concrete/comptroller/set-protocol-fee/setProtocolFee.tree b/test/integration/concrete/comptroller/set-protocol-fee/setProtocolFee.tree index 7bd610ee8..ed8ffcc23 100644 --- a/test/integration/concrete/comptroller/set-protocol-fee/setProtocolFee.tree +++ b/test/integration/concrete/comptroller/set-protocol-fee/setProtocolFee.tree @@ -7,5 +7,4 @@ setProtocolFee.t.sol │ └── it should emit a {SetProtocolFee} event └── when the new protocol fee is not the same as the current protocol fee ├── it should set the new protocol fee - └── it should emit a {SetProtocolFee} event - + └── it should emit a {SetProtocolFee} event \ No newline at end of file diff --git a/test/integration/concrete/comptroller/toggle-flash-asset/toggleFlashAsset.t.sol b/test/integration/concrete/comptroller/toggle-flash-asset/toggleFlashAsset.t.sol deleted file mode 100644 index 98ede2015..000000000 --- a/test/integration/concrete/comptroller/toggle-flash-asset/toggleFlashAsset.t.sol +++ /dev/null @@ -1,53 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; - -import { Errors } from "src/libraries/Errors.sol"; - -import { Integration_Test } from "../../../Integration.t.sol"; - -contract ToggleFlashAsset_Integration_Concrete_Test is Integration_Test { - function test_RevertWhen_CallerNotAdmin() external { - // Make Eve the caller in this test. - changePrank({ msgSender: users.eve }); - - // Run the test. - vm.expectRevert(abi.encodeWithSelector(Errors.CallerNotAdmin.selector, users.admin, users.eve)); - comptroller.toggleFlashAsset(dai); - } - - /// @dev The admin is the default caller in the comptroller tests. - modifier whenCallerAdmin() { - _; - } - - function test_ToggleFlashAsset_FlagNotEnabled() external whenCallerAdmin { - // Expect the relevant event to be emitted. - vm.expectEmit({ emitter: address(comptroller) }); - emit ToggleFlashAsset({ admin: users.admin, asset: dai, newFlag: true }); - - // Toggle the flash asset. - comptroller.toggleFlashAsset(dai); - - // Assert that the flash asset has been toggled. - bool isFlashAsset = comptroller.isFlashAsset(dai); - assertTrue(isFlashAsset, "isFlashAsset"); - } - - modifier givenFlagEnabled() { - comptroller.toggleFlashAsset(dai); - _; - } - - function test_ToggleFlashAsset() external whenCallerAdmin givenFlagEnabled { - // Expect the relevant event to be emitted. - vm.expectEmit({ emitter: address(comptroller) }); - emit ToggleFlashAsset({ admin: users.admin, asset: dai, newFlag: false }); - - // Toggle the flash asset. - comptroller.toggleFlashAsset(dai); - - // Assert that the flash asset has been toggled. - bool isFlashAsset = comptroller.isFlashAsset(dai); - assertFalse(isFlashAsset, "isFlashAsset"); - } -} diff --git a/test/integration/concrete/comptroller/toggle-flash-asset/toggleFlashAsset.tree b/test/integration/concrete/comptroller/toggle-flash-asset/toggleFlashAsset.tree deleted file mode 100644 index e6184a843..000000000 --- a/test/integration/concrete/comptroller/toggle-flash-asset/toggleFlashAsset.tree +++ /dev/null @@ -1,10 +0,0 @@ -toggleFlashAsset.t.sol -├── when the caller is not the admin -│ └── it should revert -└── when the caller is the admin - ├── given the flag is not enabled - │ ├── it should toggle the flash asset - │ └── it should emit a {ToggleFlashAsset} event - └── given the flag is enabled - ├── it should toggle the flash asset - └── it should emit a {ToggleFlashAsset} event diff --git a/test/integration/concrete/flash-loan/flash-fee/flashFee.t.sol b/test/integration/concrete/flash-loan/flash-fee/flashFee.t.sol deleted file mode 100644 index f7eaf9f79..000000000 --- a/test/integration/concrete/flash-loan/flash-fee/flashFee.t.sol +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; - -import { ud } from "@prb/math/src/UD60x18.sol"; - -import { Errors } from "src/libraries/Errors.sol"; - -import { FlashLoan_Integration_Shared_Test } from "../../../shared/flash-loan/FlashLoan.t.sol"; - -contract FlashFee_Integration_Concrete_Test is FlashLoan_Integration_Shared_Test { - function test_RevertGiven_AssetNotFlashLoanable() external { - vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2FlashLoan_AssetNotFlashLoanable.selector, dai)); - flashLoan.flashFee({ asset: address(dai), amount: 0 }); - } - - modifier givenAssetFlashLoanable() { - comptroller.toggleFlashAsset(dai); - _; - } - - function test_FlashFee() external givenAssetFlashLoanable { - uint256 amount = 782.23e18; - uint256 actualFlashFee = flashLoan.flashFee({ asset: address(dai), amount: amount }); - uint256 expectedFlashFee = ud(amount).mul(defaults.FLASH_FEE()).intoUint256(); - assertEq(actualFlashFee, expectedFlashFee, "flashFee"); - } -} diff --git a/test/integration/concrete/flash-loan/flash-fee/flashFee.tree b/test/integration/concrete/flash-loan/flash-fee/flashFee.tree deleted file mode 100644 index 106525e37..000000000 --- a/test/integration/concrete/flash-loan/flash-fee/flashFee.tree +++ /dev/null @@ -1,5 +0,0 @@ -flashFee.t.sol -├── given the asset is not flash loanable -│ └── it should revert -└── given the asset is flash loanable - └── it should return the correct flash fee diff --git a/test/integration/concrete/flash-loan/flash-loan/flashLoan.t.sol b/test/integration/concrete/flash-loan/flash-loan/flashLoan.t.sol deleted file mode 100644 index 6f67dcf6b..000000000 --- a/test/integration/concrete/flash-loan/flash-loan/flashLoan.t.sol +++ /dev/null @@ -1,145 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19; - -import { ud } from "@prb/math/src/UD60x18.sol"; - -import { IERC3156FlashLender } from "src/interfaces/erc3156/IERC3156FlashLender.sol"; -import { Errors } from "src/libraries/Errors.sol"; - -import { FlashLoanFunction_Integration_Shared_Test } from "../../../shared/flash-loan/flashLoanFunction.t.sol"; - -contract FlashLoanFunction_Integration_Concrete_Test is FlashLoanFunction_Integration_Shared_Test { - function setUp() public virtual override { - FlashLoanFunction_Integration_Shared_Test.setUp(); - } - - function test_RevertWhen_DelegateCalled() external { - bytes memory callData = - abi.encodeCall(IERC3156FlashLender.flashLoan, (goodFlashLoanReceiver, address(dai), 0, bytes(""))); - (bool success, bytes memory returnData) = address(flashLoan).delegatecall(callData); - expectRevertDueToDelegateCall(success, returnData); - } - - function test_RevertWhen_AmountTooHigh() external whenNotDelegateCalled { - uint256 amount = uint256(MAX_UINT128) + 1; - vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2FlashLoan_AmountTooHigh.selector, amount)); - flashLoan.flashLoan({ receiver: goodFlashLoanReceiver, asset: address(dai), amount: amount, data: bytes("") }); - } - - function test_RevertGiven_AssetNotFlashLoanable() external whenNotDelegateCalled whenAmountNotTooHigh { - vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2FlashLoan_AssetNotFlashLoanable.selector, dai)); - flashLoan.flashLoan({ receiver: goodFlashLoanReceiver, asset: address(dai), amount: 0, data: bytes("") }); - } - - function test_RevertWhen_CalculatedFeeTooHigh() - external - whenNotDelegateCalled - whenAmountNotTooHigh - givenAssetFlashLoanable - { - // Set the comptroller flash fee so that the calculated fee ends up being greater than 2^128. - comptroller.setFlashFee({ newFlashFee: ud(1.1e18) }); - - uint256 fee = flashLoan.flashFee({ asset: address(dai), amount: MAX_UINT128 }); - vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2FlashLoan_CalculatedFeeTooHigh.selector, fee)); - flashLoan.flashLoan({ - receiver: goodFlashLoanReceiver, - asset: address(dai), - amount: MAX_UINT128, - data: bytes("") - }); - } - - function test_RevertWhen_BorrowFailed() - external - whenNotDelegateCalled - whenAmountNotTooHigh - givenAssetFlashLoanable - whenCalculatedFeeNotTooHigh - { - deal({ token: address(dai), to: address(flashLoan), give: LIQUIDITY_AMOUNT }); - vm.expectRevert(Errors.SablierV2FlashLoan_FlashBorrowFail.selector); - flashLoan.flashLoan({ - receiver: faultyFlashLoanReceiver, - asset: address(dai), - amount: LIQUIDITY_AMOUNT, - data: bytes("") - }); - } - - function test_RevertWhen_Reentrancy() - external - whenNotDelegateCalled - whenAmountNotTooHigh - givenAssetFlashLoanable - whenCalculatedFeeNotTooHigh - whenBorrowDoesNotFail - { - uint256 amount = 100e18; - deal({ token: address(dai), to: address(flashLoan), give: amount * 2 }); - vm.expectRevert("ERC20: transfer amount exceeds balance"); - flashLoan.flashLoan({ - receiver: reentrantFlashLoanReceiver, - asset: address(dai), - amount: LIQUIDITY_AMOUNT / 4, - data: bytes("") - }); - } - - function test_FlashLoan() - external - whenNotDelegateCalled - whenAmountNotTooHigh - givenAssetFlashLoanable - whenCalculatedFeeNotTooHigh - whenBorrowDoesNotFail - whenNoReentrancy - { - // Mint the liquidity amount to the contract. - deal({ token: address(dai), to: address(flashLoan), give: LIQUIDITY_AMOUNT }); - - // Load the initial protocol revenues. - uint128 initialProtocolRevenues = flashLoan.protocolRevenues(dai); - - // Load the flash fee. - uint256 fee = flashLoan.flashFee({ asset: address(dai), amount: LIQUIDITY_AMOUNT }); - - // Mint the flash fee to the receiver so that they can repay the flash loan. - deal({ token: address(dai), to: address(goodFlashLoanReceiver), give: fee }); - - // Expect `amount` of assets to be transferred to the receiver. - expectCallToTransfer({ to: address(goodFlashLoanReceiver), amount: LIQUIDITY_AMOUNT }); - - // Expect `amount+fee` of assets to be transferred back from the receiver. - uint256 returnAmount = LIQUIDITY_AMOUNT + fee; - expectCallToTransferFrom({ from: address(goodFlashLoanReceiver), to: address(flashLoan), amount: returnAmount }); - - // Expect the relevant event to be emitted. - vm.expectEmit({ emitter: address(flashLoan) }); - bytes memory data = bytes("Hello World"); - emit FlashLoan({ - initiator: users.admin, - receiver: goodFlashLoanReceiver, - asset: dai, - amount: LIQUIDITY_AMOUNT, - feeAmount: fee, - data: data - }); - - // Execute the flash loan. - bool response = flashLoan.flashLoan({ - receiver: goodFlashLoanReceiver, - asset: address(dai), - amount: LIQUIDITY_AMOUNT, - data: data - }); - - // Assert that the returned response is `true`. - assertTrue(response, "flashLoan response"); - - // Assert that the protocol fee has been recorded. - uint128 actualProtocolRevenues = flashLoan.protocolRevenues(dai); - uint128 expectedProtocolRevenues = initialProtocolRevenues + uint128(fee); - assertEq(actualProtocolRevenues, expectedProtocolRevenues, "protocolRevenues"); - } -} diff --git a/test/integration/concrete/flash-loan/flash-loan/flashLoan.tree b/test/integration/concrete/flash-loan/flash-loan/flashLoan.tree deleted file mode 100644 index f2af3ec8b..000000000 --- a/test/integration/concrete/flash-loan/flash-loan/flashLoan.tree +++ /dev/null @@ -1,26 +0,0 @@ -flashLoan.t.sol -├── when delegate called -│ └── it should revert -└── when not delegate called - ├── when the flash loan amount is too high - │ └── it should revert - └── when the flash loan amount is not too high - ├── given the asset is not flash loanable - │ └── it should revert - └── given the asset is flash loanable - ├── when the calculated fee is too high - │ └── it should revert - └── when the calculated fee is not too high - ├── when the flash loan amount is greater than the available liquidity - │ └── it should revert - └── when the flash loan amount is less than or equal to the available liquidity - ├── when the receiver does not return the correct response - │ └── it should revert - └── when the receiver returns the correct response - ├── when there is reentrancy - │ └── it should revert - └── when there is no reentrancy - ├── it should execute the flash loan - ├── it should make the ERC-20 transfers - ├── it should update the protocol revenues - └── it should emit a {FlashLoan} event diff --git a/test/integration/concrete/flash-loan/max-flash-loan/maxFlashLoan.t.sol b/test/integration/concrete/flash-loan/max-flash-loan/maxFlashLoan.t.sol deleted file mode 100644 index 2f52a376c..000000000 --- a/test/integration/concrete/flash-loan/max-flash-loan/maxFlashLoan.t.sol +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; - -import { FlashLoan_Integration_Shared_Test } from "../../../shared/flash-loan/FlashLoan.t.sol"; - -contract MaxFlashLoan_Integration_Concrete_Test is FlashLoan_Integration_Shared_Test { - function test_MaxFlashLoan_AssetNotFlashLoanable() external { - uint256 actualAmount = flashLoan.maxFlashLoan(address(dai)); - uint256 expectedAmount = 0; - assertEq(actualAmount, expectedAmount, "maxFlashLoan amount"); - } - - modifier givenAssetFlashLoanable() { - comptroller.toggleFlashAsset(dai); - _; - } - - function test_MaxFlashLoan() external givenAssetFlashLoanable { - uint256 dealAmount = 14_607_904e18; - deal({ token: address(dai), to: address(flashLoan), give: dealAmount }); - uint256 actualAmount = flashLoan.maxFlashLoan(address(dai)); - uint256 expectedAmount = dealAmount; - assertEq(actualAmount, expectedAmount, "maxFlashLoan amount"); - } -} diff --git a/test/integration/concrete/flash-loan/max-flash-loan/maxFlashLoan.tree b/test/integration/concrete/flash-loan/max-flash-loan/maxFlashLoan.tree deleted file mode 100644 index 7eedfcdd9..000000000 --- a/test/integration/concrete/flash-loan/max-flash-loan/maxFlashLoan.tree +++ /dev/null @@ -1,5 +0,0 @@ -maxFlashLoan.t.sol -├── given the asset is not flash loanable -│ └── it should revert -└── given the asset is flash loanable - └── it should return the correct max flash loan diff --git a/test/integration/concrete/nft-descriptor/generateAccentColor.t.sol b/test/integration/concrete/nft-descriptor/generateAccentColor.t.sol index 4e956be9c..c2cd2f1cc 100644 --- a/test/integration/concrete/nft-descriptor/generateAccentColor.t.sol +++ b/test/integration/concrete/nft-descriptor/generateAccentColor.t.sol @@ -7,7 +7,7 @@ contract GenerateAccentColor_Integration_Concrete_Test is NFTDescriptor_Integrat function test_GenerateAccentColor() external { // Passing a dummy contract instead of a real Sablier contract to make this test easy to maintain. string memory actualColor = nftDescriptorMock.generateAccentColor_({ sablier: address(noop), streamId: 1337 }); - string memory expectedColor = "hsl(302,69%,44%)"; + string memory expectedColor = "hsl(268,54%,64%)"; assertEq(actualColor, expectedColor, "accentColor"); } } diff --git a/test/integration/fuzz/comptroller/setFlashFee.t.sol b/test/integration/fuzz/comptroller/setFlashFee.t.sol deleted file mode 100644 index e8b27e0f0..000000000 --- a/test/integration/fuzz/comptroller/setFlashFee.t.sol +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; - -import { UD60x18, ZERO } from "@prb/math/src/UD60x18.sol"; - -import { Integration_Test } from "../../Integration.t.sol"; - -contract SetFlashFee_Integration_Fuzz_Test is Integration_Test { - modifier givenCallerAdmin() { - _; - } - - function testFuzz_SetFlashFee(UD60x18 newFlashFee) external givenCallerAdmin { - newFlashFee = _bound(newFlashFee, 0, MAX_FEE); - - // Expect the relevant event to be emitted. - vm.expectEmit({ emitter: address(comptroller) }); - emit SetFlashFee({ admin: users.admin, oldFlashFee: ZERO, newFlashFee: newFlashFee }); - - // Set the new flash fee. - comptroller.setFlashFee(newFlashFee); - - // Assert that the flash fee has been updated. - UD60x18 actualFlashFee = comptroller.flashFee(); - UD60x18 expectedFlashFee = newFlashFee; - assertEq(actualFlashFee, expectedFlashFee, "flashFee"); - } -} diff --git a/test/integration/fuzz/flash-loan/flashFee.t.sol b/test/integration/fuzz/flash-loan/flashFee.t.sol deleted file mode 100644 index fb73de14a..000000000 --- a/test/integration/fuzz/flash-loan/flashFee.t.sol +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; - -import { UD60x18, ud } from "@prb/math/src/UD60x18.sol"; - -import { FlashLoan_Integration_Shared_Test } from "../../shared/flash-loan/FlashLoan.t.sol"; - -contract FlashFee_Integration_Fuzz_Test is FlashLoan_Integration_Shared_Test { - modifier givenAssetFlashLoanable() { - comptroller.toggleFlashAsset(dai); - _; - } - - /// @dev Given enough fuzz runs, all of the following scenarios will be fuzzed: - /// - /// - Multiple values for the comptroller flash fee, including zero - /// - Multiple values for the flash loan amount, including zero - function testFuzz_FlashFee(UD60x18 comptrollerFlashFee, uint256 amount) external givenAssetFlashLoanable { - comptrollerFlashFee = _bound(comptrollerFlashFee, 0, MAX_FEE); - comptroller.setFlashFee(comptrollerFlashFee); - uint256 actualFlashFee = flashLoan.flashFee({ asset: address(dai), amount: amount }); - uint256 expectedFlashFee = ud(amount).mul(comptrollerFlashFee).intoUint256(); - assertEq(actualFlashFee, expectedFlashFee, "flashFee"); - } -} diff --git a/test/integration/fuzz/flash-loan/flashLoan.t.sol b/test/integration/fuzz/flash-loan/flashLoan.t.sol deleted file mode 100644 index c783a2d90..000000000 --- a/test/integration/fuzz/flash-loan/flashLoan.t.sol +++ /dev/null @@ -1,111 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19; - -import { UD60x18, ud } from "@prb/math/src/UD60x18.sol"; - -import { IERC3156FlashBorrower } from "src/interfaces/erc3156/IERC3156FlashBorrower.sol"; -import { Errors } from "src/libraries/Errors.sol"; - -import { FlashLoanFunction_Integration_Shared_Test } from "../../shared/flash-loan/flashLoanFunction.t.sol"; - -contract FlashLoanFunction_Integration_Fuzz_Test is FlashLoanFunction_Integration_Shared_Test { - function setUp() public virtual override { - FlashLoanFunction_Integration_Shared_Test.setUp(); - } - - function testFuzz_RevertWhen_AmountTooHigh(uint256 amount) external whenNotDelegateCalled { - amount = _bound(amount, uint256(MAX_UINT128) + 1, MAX_UINT256); - vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2FlashLoan_AmountTooHigh.selector, amount)); - flashLoan.flashLoan({ - receiver: IERC3156FlashBorrower(address(0)), - asset: address(dai), - amount: amount, - data: bytes("") - }); - } - - function testFuzz_RevertWhen_CalculatedFeeTooHigh(UD60x18 flashFee) - external - whenNotDelegateCalled - whenAmountNotTooHigh - givenAssetFlashLoanable - { - // Bound the flash fee so that the calculated fee ends up being greater than 2^128. - flashFee = _bound(flashFee, ud(1.1e18), ud(10e18)); - comptroller.setFlashFee(flashFee); - - // Run the test. - uint256 fee = flashLoan.flashFee({ asset: address(dai), amount: MAX_UINT128 }); - vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2FlashLoan_CalculatedFeeTooHigh.selector, fee)); - flashLoan.flashLoan({ - receiver: IERC3156FlashBorrower(address(0)), - asset: address(dai), - amount: MAX_UINT128, - data: bytes("") - }); - } - - /// @dev Given enough fuzz runs, all of the following scenarios will be fuzzed: - /// - /// - Multiple values for the comptroller flash fee, including zero - /// - Multiple values for the flash loan amount, including zero - /// - Multiple values for the data bytes array, including zero length - function testFuzz_FlashLoanFunction( - UD60x18 comptrollerFlashFee, - uint128 amount, - bytes calldata data - ) - external - whenNotDelegateCalled - whenAmountNotTooHigh - givenAssetFlashLoanable - whenCalculatedFeeNotTooHigh - whenBorrowDoesNotFail - whenNoReentrancy - { - comptrollerFlashFee = _bound(comptrollerFlashFee, 0, MAX_FEE); - comptroller.setFlashFee(comptrollerFlashFee); - - // Load the initial protocol revenues. - uint128 initialProtocolRevenues = flashLoan.protocolRevenues(dai); - - // Load the flash fee. - uint256 fee = flashLoan.flashFee({ asset: address(dai), amount: amount }); - - // Mint the flash loan amount to the contract. - deal({ token: address(dai), to: address(flashLoan), give: amount }); - - // Mint the flash fee to the receiver so that they can repay the flash loan. - deal({ token: address(dai), to: address(goodFlashLoanReceiver), give: fee }); - - // Expect `amount` of assets to be transferred from {SablierV2FlashLoan} to the receiver. - expectCallToTransfer({ to: address(goodFlashLoanReceiver), amount: amount }); - - // Expect `amount+fee` of assets to be transferred back from the receiver. - uint256 returnAmount = amount + fee; - expectCallToTransferFrom({ from: address(goodFlashLoanReceiver), to: address(flashLoan), amount: returnAmount }); - - // Expect the relevant event to be emitted. - vm.expectEmit({ emitter: address(flashLoan) }); - emit FlashLoan({ - initiator: users.admin, - receiver: goodFlashLoanReceiver, - asset: dai, - amount: amount, - feeAmount: fee, - data: data - }); - - // Execute the flash loan. - bool response = - flashLoan.flashLoan({ receiver: goodFlashLoanReceiver, asset: address(dai), amount: amount, data: data }); - - // Assert that the returned response is `true`. - assertTrue(response, "flashLoan response"); - - // Assert that the protocol fee has been recorded. - uint128 actualProtocolRevenues = flashLoan.protocolRevenues(dai); - uint128 expectedProtocolRevenues = initialProtocolRevenues + uint128(fee); - assertEq(actualProtocolRevenues, expectedProtocolRevenues, "protocolRevenues"); - } -} diff --git a/test/integration/fuzz/flash-loan/maxFlashLoan.t.sol b/test/integration/fuzz/flash-loan/maxFlashLoan.t.sol deleted file mode 100644 index 5afbd58d5..000000000 --- a/test/integration/fuzz/flash-loan/maxFlashLoan.t.sol +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; - -import { FlashLoan_Integration_Shared_Test } from "../../shared/flash-loan/FlashLoan.t.sol"; - -contract MaxFlashLoan_Integration_Fuzz_Test is FlashLoan_Integration_Shared_Test { - modifier givenAssetFlashLoanable() { - comptroller.toggleFlashAsset(dai); - _; - } - - function testFuzz_MaxFlashLoan(uint256 dealAmount) external givenAssetFlashLoanable { - deal({ token: address(dai), to: address(flashLoan), give: dealAmount }); - uint256 actualAmount = flashLoan.maxFlashLoan(address(dai)); - uint256 expectedAmount = dealAmount; - assertEq(actualAmount, expectedAmount, "maxFlashLoan amount"); - } -} diff --git a/test/integration/shared/flash-loan/FlashLoan.t.sol b/test/integration/shared/flash-loan/FlashLoan.t.sol deleted file mode 100644 index e0609c920..000000000 --- a/test/integration/shared/flash-loan/FlashLoan.t.sol +++ /dev/null @@ -1,30 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; - -import { SablierV2FlashLoan } from "src/abstracts/SablierV2FlashLoan.sol"; - -import { FlashLoanMock } from "../../../mocks/flash-loan/FlashLoanMock.sol"; -import { Integration_Test } from "../../Integration.t.sol"; - -/// @notice Common testing logic needed by all {SablierV2FlashLoan} integration tests. -abstract contract FlashLoan_Integration_Shared_Test is Integration_Test { - /*////////////////////////////////////////////////////////////////////////// - TEST CONTRACTS - //////////////////////////////////////////////////////////////////////////*/ - - SablierV2FlashLoan internal flashLoan; - - /*////////////////////////////////////////////////////////////////////////// - SET-UP FUNCTION - //////////////////////////////////////////////////////////////////////////*/ - - function setUp() public virtual override { - Integration_Test.setUp(); - - // Deploy the flash loan mock. - flashLoan = new FlashLoanMock(users.admin, comptroller); - - // Set the default flash fee in the comptroller. - comptroller.setFlashFee({ newFlashFee: defaults.FLASH_FEE() }); - } -} diff --git a/test/integration/shared/flash-loan/flashLoanFunction.t.sol b/test/integration/shared/flash-loan/flashLoanFunction.t.sol deleted file mode 100644 index 032b72d97..000000000 --- a/test/integration/shared/flash-loan/flashLoanFunction.t.sol +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19; - -import { FlashLoan_Integration_Shared_Test } from "./FlashLoan.t.sol"; - -contract FlashLoanFunction_Integration_Shared_Test is FlashLoan_Integration_Shared_Test { - uint128 internal constant LIQUIDITY_AMOUNT = 8_755_001e18; - - function setUp() public virtual override { - FlashLoan_Integration_Shared_Test.setUp(); - } - - modifier whenNotDelegateCalled() { - _; - } - - modifier whenAmountNotTooHigh() { - _; - } - - modifier givenAssetFlashLoanable() { - if (!comptroller.isFlashAsset(dai)) { - comptroller.toggleFlashAsset(dai); - } - _; - } - - modifier whenCalculatedFeeNotTooHigh() { - _; - } - - modifier whenBorrowDoesNotFail() { - _; - } - - modifier whenNoReentrancy() { - _; - } -} diff --git a/test/invariant/handlers/ComptrollerHandler.sol b/test/invariant/handlers/ComptrollerHandler.sol index c5d9f5e6c..8c374a788 100644 --- a/test/invariant/handlers/ComptrollerHandler.sol +++ b/test/invariant/handlers/ComptrollerHandler.sol @@ -36,18 +36,6 @@ contract ComptrollerHandler is BaseHandler { SABLIER-V2-COMPTROLLER //////////////////////////////////////////////////////////////////////////*/ - function setFlashFee( - uint256 timeJumpSeed, - UD60x18 newFlashFee - ) - external - instrument("setFlashFee") - adjustTimestamp(timeJumpSeed) - { - newFlashFee = _bound(newFlashFee, 0, UNIT); - comptroller.setFlashFee(newFlashFee); - } - function setProtocolFee( uint256 timeJumpSeed, UD60x18 newProtocolFee @@ -59,12 +47,4 @@ contract ComptrollerHandler is BaseHandler { newProtocolFee = _bound(newProtocolFee, 0, MAX_FEE); comptroller.setProtocolFee(asset, newProtocolFee); } - - function toggleFlashAsset(uint256 timeJumpSeed) - external - instrument("toggleFlashAsset") - adjustTimestamp(timeJumpSeed) - { - comptroller.toggleFlashAsset(asset); - } } diff --git a/test/invariant/handlers/FlashLoanHandler.sol b/test/invariant/handlers/FlashLoanHandler.sol deleted file mode 100644 index 8165e152f..000000000 --- a/test/invariant/handlers/FlashLoanHandler.sol +++ /dev/null @@ -1,93 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; - -import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import { Math } from "@openzeppelin/contracts/utils/math/Math.sol"; - -import { SablierV2FlashLoan } from "src/abstracts/SablierV2FlashLoan.sol"; -import { IERC3156FlashBorrower } from "src/interfaces/erc3156/IERC3156FlashBorrower.sol"; -import { ISablierV2Comptroller } from "src/interfaces/ISablierV2Comptroller.sol"; - -import { TimestampStore } from "../stores/TimestampStore.sol"; -import { BaseHandler } from "./BaseHandler.sol"; - -/// @dev This contract and not {SablierV2FlashLoan} is exposed to Foundry for invariant testing. The point is -/// to bound and restrict the inputs that get passed to the real-world contract to avoid getting reverts. -contract FlashLoanHandler is BaseHandler { - /*////////////////////////////////////////////////////////////////////////// - TEST CONTRACTS - //////////////////////////////////////////////////////////////////////////*/ - - ISablierV2Comptroller public comptroller; - SablierV2FlashLoan public flashLoanContract; - IERC3156FlashBorrower internal receiver; - - /*////////////////////////////////////////////////////////////////////////// - CONSTRUCTOR - //////////////////////////////////////////////////////////////////////////*/ - - constructor( - IERC20 asset_, - TimestampStore timestampStore_, - ISablierV2Comptroller comptroller_, - SablierV2FlashLoan flashLoanContract_, - IERC3156FlashBorrower receiver_ - ) - BaseHandler(asset_, timestampStore_) - { - comptroller = comptroller_; - flashLoanContract = flashLoanContract_; - receiver = receiver_; - } - - /*////////////////////////////////////////////////////////////////////////// - SABLIER-V2-FLASH-LOAN - //////////////////////////////////////////////////////////////////////////*/ - - function flashLoan( - uint256 timeJumpSeed, - uint128 amount - ) - external - instrument("flashLoan") - adjustTimestamp(timeJumpSeed) - { - // Only up to `MAX_UINT128` assets can be flash loaned. - uint256 balance = asset.balanceOf(address(this)); - uint128 upperBound = uint128(Math.min(balance, MAX_UINT128)); - amount = boundUint128(amount, 0, upperBound); - - // Only supported assets can be flash loaned. - bool isFlashAsset = comptroller.isFlashAsset(asset); - if (!isFlashAsset) { - return; - } - - // The flash fee must be less than or equal to `MAX_UINT128`. - uint256 fee = flashLoanContract.flashFee(address(asset), amount); - if (fee > type(uint128).max) { - return; - } - - // Mint the flash fee to the receiver so that they can repay the flash loan. - deal({ token: address(asset), to: address(receiver), give: fee }); - - // Some contracts do not inherit from {SablierV2FlashLoan}. - (bool success,) = address(flashLoanContract).staticcall( - abi.encodeWithSelector( - SablierV2FlashLoan.flashLoan.selector, receiver, address(asset), amount, bytes("Some Data") - ) - ); - if (!success) { - return; - } - - // Execute the flash loan. - flashLoanContract.flashLoan({ - receiver: receiver, - asset: address(asset), - amount: amount, - data: bytes("Some Data") - }); - } -} diff --git a/test/mocks/flash-loan/FaultyFlashLoanReceiver.sol b/test/mocks/flash-loan/FaultyFlashLoanReceiver.sol deleted file mode 100644 index 98c18a999..000000000 --- a/test/mocks/flash-loan/FaultyFlashLoanReceiver.sol +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19; - -import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; - -import { IERC3156FlashBorrower } from "../../../src/interfaces/erc3156/IERC3156FlashBorrower.sol"; - -contract FaultyFlashLoanReceiver is IERC3156FlashBorrower { - bytes32 internal constant FAULTY_RESPONSE = keccak256("This is a faulty response"); - - function onFlashLoan( - address initiator, - address asset, - uint256 amount, - uint256 fee, - bytes calldata data - ) - external - returns (bytes32 response) - { - initiator; - data; - IERC20(asset).approve({ spender: msg.sender, amount: amount + fee }); - response = FAULTY_RESPONSE; - } -} diff --git a/test/mocks/flash-loan/FlashLoanMock.sol b/test/mocks/flash-loan/FlashLoanMock.sol deleted file mode 100644 index 232c06cb1..000000000 --- a/test/mocks/flash-loan/FlashLoanMock.sol +++ /dev/null @@ -1,16 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19; - -import { SablierV2Base } from "../../../src/abstracts/SablierV2Base.sol"; -import { ISablierV2Comptroller } from "../../../src/interfaces/ISablierV2Comptroller.sol"; -import { SablierV2FlashLoan } from "../../../src/abstracts/SablierV2FlashLoan.sol"; - -/// @dev Needed to test the {SablierV2FlashLoan} abstract. -contract FlashLoanMock is SablierV2FlashLoan { - constructor( - address initialAdmin, - ISablierV2Comptroller initialComptroller - ) - SablierV2Base(initialAdmin, initialComptroller) - { } -} diff --git a/test/mocks/flash-loan/GoodFlashLoanReceiver.sol b/test/mocks/flash-loan/GoodFlashLoanReceiver.sol deleted file mode 100644 index 85c9794dc..000000000 --- a/test/mocks/flash-loan/GoodFlashLoanReceiver.sol +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19; - -import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; - -import { IERC3156FlashBorrower } from "../../../src/interfaces/erc3156/IERC3156FlashBorrower.sol"; - -import { Constants } from "../../utils/Constants.sol"; - -contract GoodFlashLoanReceiver is Constants, IERC3156FlashBorrower { - function onFlashLoan( - address initiator, - address asset, - uint256 amount, - uint256 fee, - bytes calldata data - ) - external - returns (bytes32 response) - { - initiator; - data; - IERC20(asset).approve({ spender: msg.sender, amount: amount + fee }); - response = FLASH_LOAN_CALLBACK_SUCCESS; - } -} diff --git a/test/mocks/flash-loan/ReentrantFlashLoanReceiver.sol b/test/mocks/flash-loan/ReentrantFlashLoanReceiver.sol deleted file mode 100644 index e0fbc12a8..000000000 --- a/test/mocks/flash-loan/ReentrantFlashLoanReceiver.sol +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-or-later -pragma solidity >=0.8.19; - -import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; - -import { IERC3156FlashBorrower } from "../../../src/interfaces/erc3156/IERC3156FlashBorrower.sol"; -import { IERC3156FlashLender } from "../../../src/interfaces/erc3156/IERC3156FlashLender.sol"; - -import { Constants } from "../../utils/Constants.sol"; - -contract ReentrantFlashLoanReceiver is Constants, IERC3156FlashBorrower { - function onFlashLoan( - address initiator, - address asset, - uint256 amount, - uint256 fee, - bytes calldata data - ) - external - returns (bytes32 response) - { - initiator; - IERC20(asset).approve({ spender: msg.sender, amount: amount + fee }); - IERC3156FlashLender(msg.sender).flashLoan({ receiver: this, asset: asset, amount: amount, data: data }); - response = FLASH_LOAN_CALLBACK_SUCCESS; - } -} diff --git a/test/unit/concrete/comptroller/flash-fee/flashFee.t.sol b/test/unit/concrete/comptroller/flash-fee/flashFee.t.sol deleted file mode 100644 index 9fe6fb139..000000000 --- a/test/unit/concrete/comptroller/flash-fee/flashFee.t.sol +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; - -import { UD60x18, ZERO } from "@prb/math/src/UD60x18.sol"; - -import { Comptroller_Unit_Concrete_Test } from "../Comptroller.t.sol"; - -contract FlashFee_Unit_Concrete_Test is Comptroller_Unit_Concrete_Test { - function setUp() public virtual override { - Comptroller_Unit_Concrete_Test.setUp(); - // Make the Admin the default caller in this test suite. - vm.startPrank({ msgSender: users.admin }); - } - - function test_FlashFee_Zero() external { - UD60x18 actualFlashFee = comptroller.flashFee(); - UD60x18 expectedFlashFee = ZERO; - assertEq(actualFlashFee, expectedFlashFee, "flashFee"); - } - - function test_FlashFee() external { - comptroller.setFlashFee(defaults.FLASH_FEE()); - UD60x18 actualFlashFee = comptroller.flashFee(); - UD60x18 expectedFlashFee = defaults.FLASH_FEE(); - assertEq(actualFlashFee, expectedFlashFee, "flashFee"); - } -} diff --git a/test/unit/concrete/comptroller/flash-fee/flashFee.tree b/test/unit/concrete/comptroller/flash-fee/flashFee.tree deleted file mode 100644 index 04e7932b7..000000000 --- a/test/unit/concrete/comptroller/flash-fee/flashFee.tree +++ /dev/null @@ -1,5 +0,0 @@ -flashFee.t.sol -├── given the flash fee has not been set -│ └── it should return zero -└── given the flash fee has been set - └── it should return the correct flash fee diff --git a/test/unit/concrete/comptroller/set-flash-fee/setFlashFee.t.sol b/test/unit/concrete/comptroller/set-flash-fee/setFlashFee.t.sol deleted file mode 100644 index 2efb39738..000000000 --- a/test/unit/concrete/comptroller/set-flash-fee/setFlashFee.t.sol +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity >=0.8.19 <0.9.0; - -import { UD60x18, ZERO } from "@prb/math/src/UD60x18.sol"; - -import { Errors } from "src/libraries/Errors.sol"; - -import { Comptroller_Unit_Concrete_Test } from "../Comptroller.t.sol"; - -contract SetFlashFee_Unit_Concrete_Test is Comptroller_Unit_Concrete_Test { - function setUp() public virtual override { - Comptroller_Unit_Concrete_Test.setUp(); - // Make the Admin the default caller in this test suite. - vm.startPrank({ msgSender: users.admin }); - } - - function test_RevertWhen_CallerNotAdmin() external { - // Make Eve the caller in this test. - changePrank({ msgSender: users.eve }); - - // Run the test. - vm.expectRevert(abi.encodeWithSelector(Errors.CallerNotAdmin.selector, users.admin, users.eve)); - comptroller.setFlashFee({ newFlashFee: MAX_FEE }); - } - - /// @dev The admin is the default caller in the comptroller tests. - modifier whenCallerAdmin() { - _; - } - - function test_SetFlashFee_SameFee() external whenCallerAdmin { - // Expect the relevant event to be emitted. - vm.expectEmit({ emitter: address(comptroller) }); - emit SetFlashFee({ admin: users.admin, oldFlashFee: ZERO, newFlashFee: ZERO }); - comptroller.setFlashFee({ newFlashFee: ZERO }); - - // She the same flash fee. - comptroller.setFlashFee({ newFlashFee: ZERO }); - - // Assert that the flash fee has not changed. - UD60x18 actualFlashFee = comptroller.flashFee(); - UD60x18 expectedFlashFee = ZERO; - assertEq(actualFlashFee, expectedFlashFee, "flashFee"); - } - - modifier whenNewFee() { - _; - } - - function test_SetFlashFee() external whenCallerAdmin whenNewFee { - UD60x18 newFlashFee = defaults.FLASH_FEE(); - - // Expect the relevant event to be emitted. - vm.expectEmit({ emitter: address(comptroller) }); - emit SetFlashFee({ admin: users.admin, oldFlashFee: ZERO, newFlashFee: newFlashFee }); - - // She the new flash fee. - comptroller.setFlashFee(newFlashFee); - - // Assert that the flash fee has been updated. - UD60x18 actualFlashFee = comptroller.flashFee(); - UD60x18 expectedFlashFee = newFlashFee; - assertEq(actualFlashFee, expectedFlashFee, "flashFee"); - } -} diff --git a/test/unit/concrete/comptroller/set-flash-fee/setFlashFee.tree b/test/unit/concrete/comptroller/set-flash-fee/setFlashFee.tree deleted file mode 100644 index 9f97bbefd..000000000 --- a/test/unit/concrete/comptroller/set-flash-fee/setFlashFee.tree +++ /dev/null @@ -1,10 +0,0 @@ -setFlashFee.t.sol -├── when the caller is not the admin -│ └── it should revert -└── when the caller is the admin - ├── when the new flash fee is the same as the current flash fee - │ ├── it should re-set the flash fee - │ └── it should emit a {SetFlashFee} event - └── when the new flash fee is not the same as the current flash fee - ├── it should set the new flash fee - └── it should emit a {SetFlashFee} event diff --git a/test/utils/Constants.sol b/test/utils/Constants.sol index 996dad865..4827bc5b3 100644 --- a/test/utils/Constants.sol +++ b/test/utils/Constants.sol @@ -4,7 +4,6 @@ pragma solidity >=0.8.19; import { UD60x18 } from "@prb/math/src/UD60x18.sol"; abstract contract Constants { - bytes32 internal constant FLASH_LOAN_CALLBACK_SUCCESS = keccak256("ERC3156FlashBorrower.onFlashLoan"); uint40 internal constant MAY_1_2023 = 1_682_899_200; UD60x18 internal constant MAX_FEE = UD60x18.wrap(0.1e18); // 10% uint40 internal constant MAX_UNIX_TIMESTAMP = 2_147_483_647; // 2^31 - 1 diff --git a/test/utils/Defaults.sol b/test/utils/Defaults.sol index 3c5d16699..85e20bec7 100644 --- a/test/utils/Defaults.sol +++ b/test/utils/Defaults.sol @@ -23,7 +23,6 @@ contract Defaults is Constants { uint40 public constant CLIFF_DURATION = 2500 seconds; uint128 public constant DEPOSIT_AMOUNT = 10_000e18; uint40 public immutable END_TIME; - UD60x18 public constant FLASH_FEE = UD60x18.wrap(0.0005e18); // 0.05% uint256 public constant MAX_SEGMENT_COUNT = 300; uint40 public immutable MAX_SEGMENT_DURATION; UD60x18 public constant PROTOCOL_FEE = UD60x18.wrap(0.001e18); // 0.1% diff --git a/test/utils/Events.sol b/test/utils/Events.sol index 13192c7a9..da24266d4 100644 --- a/test/utils/Events.sol +++ b/test/utils/Events.sol @@ -4,7 +4,6 @@ pragma solidity >=0.8.19; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { UD60x18 } from "@prb/math/src/UD60x18.sol"; -import { IERC3156FlashBorrower } from "../../src/interfaces/erc3156/IERC3156FlashBorrower.sol"; import { ISablierV2Comptroller } from "../../src/interfaces/ISablierV2Comptroller.sol"; import { ISablierV2NFTDescriptor } from "../../src/interfaces/ISablierV2NFTDescriptor.sol"; import { Lockup, LockupDynamic, LockupLinear } from "../../src/types/DataTypes.sol"; @@ -45,25 +44,8 @@ abstract contract Events { SABLIER-V2-COMPTROLLER //////////////////////////////////////////////////////////////////////////*/ - event SetFlashFee(address indexed admin, UD60x18 oldFlashFee, UD60x18 newFlashFee); - event SetProtocolFee(address indexed admin, IERC20 indexed asset, UD60x18 oldProtocolFee, UD60x18 newProtocolFee); - event ToggleFlashAsset(address indexed admin, IERC20 indexed asset, bool newFlag); - - /*////////////////////////////////////////////////////////////////////////// - SABLIER-V2-FLASH-LOAN - //////////////////////////////////////////////////////////////////////////*/ - - event FlashLoan( - address indexed initiator, - IERC3156FlashBorrower indexed receiver, - IERC20 indexed asset, - uint256 amount, - uint256 feeAmount, - bytes data - ); - /*////////////////////////////////////////////////////////////////////////// SABLIER-V2-LOCKUP //////////////////////////////////////////////////////////////////////////*/ diff --git a/test/utils/Precompiles.sol b/test/utils/Precompiles.sol index a107d8013..213dddbe1 100644 --- a/test/utils/Precompiles.sol +++ b/test/utils/Precompiles.sol @@ -25,7 +25,7 @@ contract Precompiles { //////////////////////////////////////////////////////////////////////////*/ bytes public constant BYTECODE_COMPTROLLER = - hex"60803461009857601f6104b338819003918201601f19168301916001600160401b0383118484101761009d5780849260209460405283398101031261009857516001600160a01b0381169081900361009857600080546001600160a01b0319168217815560405191907fbdd36143ee09de60bdefca70680e0f71189b2ed7acee364b53917ad433fdaf808180a36103ff90816100b48239f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe608060408181526004918236101561001657600080fd5b600092833560e01c9182634d81e51d1461039d5750816375829def146102e5578163907a267b14610253578163b5b3ca2c146101ab578163cb01e30e146100f957508063dcf844a7146100c3578063e07df5b4146100a55763f851a4401461007d57600080fd5b346100a157816003193601126100a1576001600160a01b0360209254169051908152f35b5080fd5b50346100a157816003193601126100a1576020906001549051908152f35b50346100a15760203660031901126100a157806020926001600160a01b036100e96103d7565b1681526003845220549051908152f35b9050346101a75760203660031901126101a7576101146103d7565b6001600160a01b03918285541633810361017a575050169081835260026020528083209081549160ff8316159260ff84169060ff1916179055519081527f8cd3a7bc46b26a3b0c07a05a47af78abcaa647626f631d92ea64f8867b23bbec60203392a380f35b84516331b339a960e21b81526001600160a01b039091169181019182523360208301529081906040010390fd5b8280fd5b9050346101a757816003193601126101a7576101c56103d7565b90602435916001600160a01b039182865416338103610226575050907f371789a3d97098f3070492613273a065a7e8a19e009fd1ae92a4b4d4c71ed62d9116928385526003602052808520928084549455815193845260208401523392a380f35b85516331b339a960e21b81526001600160a01b039091169181019182523360208301529081906040010390fd5b919050346101a75760203660031901126101a7578135916001600160a01b038454163381036102b85750507fc059ba3e07a1c4d1fa8845bdb2af2dd85e844684e0a59e6073499e4338788465906001549280600155815193845260208401523392a280f35b82516331b339a960e21b81526001600160a01b039091169181019182523360208301529081906040010390fd5b919050346101a75760203660031901126101a7578135916001600160a01b03918284168094036103995784549283169033820361036d575050507fffffffffffffffffffffffff00000000000000000000000000000000000000001681178255337fbdd36143ee09de60bdefca70680e0f71189b2ed7acee364b53917ad433fdaf808380a380f35b516331b339a960e21b81526001600160a01b039091169181019182523360208301529081906040010390fd5b8480fd5b849084346101a75760203660031901126101a75760ff906020936001600160a01b036103c76103d7565b1681526002855220541615158152f35b600435906001600160a01b03821682036103ed57565b600080fdfea164736f6c6343000817000a"; + hex"60803461009857601f6102d538819003918201601f19168301916001600160401b0383118484101761009d5780849260209460405283398101031261009857516001600160a01b0381169081900361009857600080546001600160a01b0319168217815560405191907fbdd36143ee09de60bdefca70680e0f71189b2ed7acee364b53917ad433fdaf808180a361022190816100b48239f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe60806040818152600436101561001457600080fd5b600091823560e01c90816375829def1461014c57508063b5b3ca2c146100ac578063dcf844a7146100765763f851a4401461004e57600080fd5b346100725781600319360112610072576001600160a01b0360209254169051908152f35b5080fd5b503461007257602036600319011261007257806020926001600160a01b0361009c6101f9565b1681526001845220549051908152f35b50346100725780600319360112610072576100c56101f9565b602435906001600160a01b0390818554163381036101245750907f371789a3d97098f3070492613273a065a7e8a19e009fd1ae92a4b4d4c71ed62d9116928385526001602052808520928084549455815193845260208401523392a380f35b84516331b339a960e21b81526001600160a01b03919091166004820152336024820152604490fd5b83903461007257602036600319011261007257600435906001600160a01b03908183168093036101f55783549182163381036101d25750507fffffffffffffffffffffffff00000000000000000000000000000000000000001681178255337fbdd36143ee09de60bdefca70680e0f71189b2ed7acee364b53917ad433fdaf808380a380f35b6331b339a960e21b82526001600160a01b03166004820152336024820152604490fd5b8380fd5b600435906001600160a01b038216820361020f57565b600080fdfea164736f6c6343000817000a"; bytes public constant BYTECODE_LOCKUP_DYNAMIC = hex"60c0346200046e57601f62005be438819003918201601f19168301916001600160401b038311848410176200032b578084926080946040528339810103126200046e5780516001600160a01b038082169290918390036200046e5760208101518281168091036200046e5760408201519183831683036200046e5760600151936200008962000473565b90601d82527f5361626c696572205632204c6f636b75702044796e616d6963204e46540000006020830152620000be62000473565b601181527029a0a116ab1916a627a1a5aaa816a22ca760791b602082015230608052600080546001600160a01b03199081168417825560018054909116909517909455927fbdd36143ee09de60bdefca70680e0f71189b2ed7acee364b53917ad433fdaf808180a38051906001600160401b0382116200032b5760035490600182811c9216801562000463575b60208310146200044d5781601f849311620003d8575b50602090601f83116001146200034d5760009262000341575b50508160011b916000199060031b1c1916176003555b80516001600160401b0381116200032b576004918254600181811c9116801562000320575b60208210146200030b579081601f849311620002b3575b50602090601f831160011462000248576000926200023c575b50508160011b916000199060031b1c19161790555b1660018060a01b0319600a541617600a5560a05260016009556040516157509081620004948239608051816132f7015260a051818181610f7a01526134180152f35b015190503880620001e5565b6000858152602081209350601f198516905b8181106200029a575090846001959493921062000280575b505050811b019055620001fa565b015160001960f88460031b161c1916905538808062000272565b929360206001819287860151815501950193016200025a565b909150836000526020600020601f840160051c8101916020851062000300575b90601f859493920160051c01905b818110620002f05750620001cc565b60008155849350600101620002e1565b9091508190620002d3565b602284634e487b7160e01b6000525260246000fd5b90607f1690620001b5565b634e487b7160e01b600052604160045260246000fd5b0151905038806200017a565b600360009081527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9350601f198516905b818110620003bf5750908460019594939210620003a5575b505050811b0160035562000190565b015160001960f88460031b161c1916905538808062000396565b929360206001819287860151815501950193016200037e565b60036000529091507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f840160051c8101916020851062000442575b90601f859493920160051c01905b81811062000432575062000161565b6000815584935060010162000423565b909150819062000415565b634e487b7160e01b600052602260045260246000fd5b91607f16916200014b565b600080fd5b60408051919082016001600160401b038111838210176200032b5760405256fe608080604052600436101561001357600080fd5b60003560e01c90816301ffc9a7146126f55750806306fdde0314612630578063081812fc14612612578063095ea7b31461247e5780631400ecec146123d957806316844456146121155780631c1cdd4c146120af5780631e99d5691461209157806323b872dd1461206857806339a73c031461202557806340e58ee514611dd1578063425d30dd14611db357806342842e0e14611d6357806342966c6814611bd35780634857501f14611b5d5780634869e12d14611b215780635fe3b56714611afa5780636352211e14611acb5780636d0cee7514611a7357806370a08231146119c957806375829def146119375780637cad6cd1146118655780637de6b1db146116555780638659c2701461135c578063894e9a0d146110ef5780638bad38dd146110735780638f69b99314610ff05780639067b67714610f9d5780639188ec8414610f6257806395d89b4114610e52578063a22cb46514610d81578063a2ffb89714610c9f578063a6202bf214610b96578063a80fc07114610b41578063ad35efd414610ade578063b256456914610ac0578063b637b86514610a60578063b88d4fde146109d7578063b8a3be66146109a0578063b971302a1461094e578063bc063e1a1461092b578063bc2be1be146108d8578063c156a11d14610820578063c33cd35e146106c1578063c87b56dd1461058e578063cc364f48146104f4578063d4dbd20b1461049f578063d511609f14610450578063d975dfed14610403578063e985e9c5146103ac578063ea5ead191461037e578063eac8f5b814610312578063f590c176146102ea578063f851a440146102c35763fdd46d601461027c57600080fd5b346102be5760603660031901126102be57610295612822565b6044356001600160801b03811681036102be576102bc916102b46132ed565b6004356131da565b005b600080fd5b346102be5760003660031901126102be5760206001600160a01b0360005416604051908152f35b346102be5760203660031901126102be576020610308600435612e21565b6040519015158152f35b346102be5760203660031901126102be5760043580600052600b60205260ff60016040600020015460a81c161561036757600052600b60205260206001600160a01b0360016040600020015416604051908152f35b6024906040519062b8e7e760e51b82526004820152fd5b346102be5760403660031901126102be576102bc60043561039d612822565b6103a6826140c2565b91612e52565b346102be5760403660031901126102be576103c561280c565b6103cd612822565b906001600160a01b03809116600052600860205260406000209116600052602052602060ff604060002054166040519015158152f35b346102be5760203660031901126102be5760043580600052600b60205260ff60016040600020015460a81c16156103675761043f6020916140c2565b6001600160801b0360405191168152f35b346102be5760203660031901126102be5760043580600052600b60205260ff60016040600020015460a81c161561036757600052600b602052602060026040600020015460801c604051908152f35b346102be5760203660031901126102be5760043580600052600b60205260ff60016040600020015460a81c161561036757600052600b60205260206001600160801b0360036040600020015416604051908152f35b346102be5760203660031901126102be57600435600060206040516105188161295c565b828152015280600052600b60205260ff60016040600020015460a81c161561036757600052600b6020526040806000205464ffffffffff82519161055b8361295c565b818160a01c16835260c81c16602082015261058c825180926020908164ffffffffff91828151168552015116910152565bf35b346102be576020806003193601126102be57600435906105cc6105c78360005260056020526001600160a01b0360406000205416151590565b612bdb565b60006001600160a01b03600a5416926044604051809581937fe9dc637500000000000000000000000000000000000000000000000000000000835230600484015260248301525afa9182156106b55760009261063c575b506106386040519282849384528301906127e7565b0390f35b9091503d806000833e61064f81836129a9565b81019082818303126102be5780519067ffffffffffffffff82116102be570181601f820112156102be578051610684816129cb565b9261069260405194856129a9565b8184528482840101116102be576106ae918480850191016127c4565b9082610623565b6040513d6000823e3d90fd5b346102be57600319602036820181136102be5760043567ffffffffffffffff928382116102be576101409082360301126102be576106fd6132ed565b6040519261070a8461293f565b61071682600401612838565b845261072460248301612a69565b602085015261073560448301612916565b604085015261074660648301612916565b91606092606086015261075b60848201612838565b608086015261076c60a482016129e7565b60a086015261077d60c48201612838565b60c086015261078f3660e48301612b04565b60e08601526101248101359182116102be5701366023820112156102be576004810135926107bc84612a51565b936107ca60405195866129a9565b80855260246060602087019202840101923684116102be57602401905b838210610808576020610800888861010082015261336a565b604051908152f35b8285916108153685612a7b565b8152019101906107e7565b346102be5760403660031901126102be5760043561083c612822565b906108456132ed565b80600052600b60205260ff60016040600020015460a81c1615610367578060005260056020526001600160a01b0360406000205416918233036108b5576102bc9261088f836140c2565b6001600160801b0381166108a4575b50613ddb565b6108af908285612e52565b8461089e565b60405163216caf0d60e01b815260048101839052336024820152604490fd5b0390fd5b346102be5760203660031901126102be5760043580600052600b60205260ff60016040600020015460a81c161561036757600052600b602052602064ffffffffff60406000205460a01c16604051908152f35b346102be5760003660031901126102be57602060405167016345785d8a00008152f35b346102be5760203660031901126102be5760043580600052600b60205260ff60016040600020015460a81c161561036757600052600b60205260206001600160a01b0360406000205416604051908152f35b346102be5760203660031901126102be57600435600052600b602052602060ff60016040600020015460a81c166040519015158152f35b346102be5760803660031901126102be576109f061280c565b6109f8612822565b6064359167ffffffffffffffff83116102be57366023840112156102be57826004013591610a25836129cb565b92610a3360405194856129a9565b80845236602482870101116102be5760208160009260246102bc9801838801378501015260443591612d8b565b346102be5760203660031901126102be5760043580600052600b60205260ff60016040600020015460a81c161561036757600052600b602052610638610aac6004604060002001612cc4565b6040519182916020835260208301906128b2565b346102be5760203660031901126102be576020610308600435612d54565b346102be5760203660031901126102be5760043580600052600b60205260ff60016040600020015460a81c161561036757610b1890613c75565b6040516005821015610b2b576020918152f35b634e487b7160e01b600052602160045260246000fd5b346102be5760203660031901126102be5760043580600052600b60205260ff60016040600020015460a81c161561036757600052600b60205260206001600160801b0360026040600020015416604051908152f35b346102be5760203660031901126102be57610baf61280c565b6001600160a01b038060005416338103610c7657508116908160005260026020526001600160801b0360406000205416908115610c455781610c179184600052600260205260406000206fffffffffffffffffffffffffffffffff198154169055339061405a565b6040519081527fca7a4a65a94ed2f37538814e00e1cd4c41a78261561e3f3794592f11409cf5af60203392a3005b602483604051907f8410168c0000000000000000000000000000000000000000000000000000000082526004820152fd5b6040516331b339a960e21b81526001600160a01b03919091166004820152336024820152604490fd5b346102be5760603660031901126102be5767ffffffffffffffff6004358181116102be57610cd1903690600401612881565b9190610cdb612822565b916044359081116102be57610cf4903690600401612881565b92610cfd6132ed565b838503610d4a5760005b858110610d1057005b80610d44610d216001938988612c4b565b3584610d36610d31858b8a612c4b565b612af0565b91610d3f6132ed565b6131da565b01610d07565b60448585604051917faec9344000000000000000000000000000000000000000000000000000000000835260048301526024820152fd5b346102be5760403660031901126102be57610d9a61280c565b602435908115158092036102be576001600160a01b031690813314610e0e57336000526008602052604060002082600052602052604060002060ff1981541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b606460405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152fd5b346102be5760003660031901126102be5760405160006004549060018260011c9160018416918215610f58575b6020948585108414610f42578587948686529182600014610f22575050600114610ec5575b50610eb1925003836129a9565b6106386040519282849384528301906127e7565b84915060046000527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b906000915b858310610f0a575050610eb1935082010185610ea4565b80548389018501528794508693909201918101610ef3565b60ff191685820152610eb195151560051b8501019250879150610ea49050565b634e487b7160e01b600052602260045260246000fd5b92607f1692610e7f565b346102be5760003660031901126102be5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b346102be5760203660031901126102be5760043580600052600b60205260ff60016040600020015460a81c161561036757600052600b602052602064ffffffffff60406000205460c81c16604051908152f35b346102be5760203660031901126102be5760043580600052600b60205260ff60016040600020015460a81c16156103675761102a90613c75565b600581101580610b2b5760028214908115611066575b8115611054575b6020826040519015158152f35b9050610b2b5760046020911482611047565b5050600381146000611040565b346102be5760203660031901126102be576004356001600160a01b03908181168091036102be578160005416338103610c76575060015491816001600160a01b03198416176001556040519216825260208201527fdcb09aef4bf01068924ccce937981cbe59d25ba08380cf941aaaea4e4bd3960d60403392a2005b346102be5760203660031901126102be5760606101406040516111118161298c565b60008152600060208201526000604082015260008382015260006080820152600060a0820152600060c0820152600060e08201526000610100820152611155612c71565b6101208201520152600435600052600b60205260ff60016040600020015460a81c161561134457600435600052600b602052604060002061123860046040519261119e8461298c565b80546001600160a01b038116855264ffffffffff8160a01c16602086015264ffffffffff8160c81c16604086015260ff8160f01c161515606086015260f81c1515608085015260ff60018201546001600160a01b03811660a0870152818160a01c16151560c0870152818160a81c16151560e087015260b01c16151561010085015261122c60028201612c90565b61012085015201612cc4565b610140820152611249600435613c75565b906005821015610b2b5760026101409214611338575b610638604051928392602084526001600160a01b03815116602085015264ffffffffff602082015116604085015264ffffffffff60408201511660608501526060810151151560808501526080810151151560a08501526001600160a01b0360a08201511660c085015260c0810151151560e085015260e08101511515610100850152610100810151151561012085015261132461012082015183860190604090816001600160801b0391828151168552826020820151166020860152015116910152565b01516101a0808401526101c08301906128b2565b6000606082015261125f565b602460405162b8e7e760e51b81526004356004820152fd5b346102be576020806003193601126102be5760043567ffffffffffffffff81116102be5761138e903690600401612881565b906113976132ed565b6000915b8083106113a457005b6113af838284612c4b565b35926113b96132ed565b6113c284612ba4565b156113df5760248460405190634a5541ef60e01b82526004820152fd5b6113eb84929394612e21565b61163d5761140f82600052600b6020526001600160a01b0360406000205416331490565b156108b55761141d82613282565b82600052600b8087526114366002604060002001612c90565b906001600160801b0392838351168482161015611625578560005281895260ff60406000205460f01c161561160d57906114a482858b61149a7f5edb27d6c1a327513b90a792050debf074b7194444885e3144d4decc5caaaa509683895116612a38565b9601511690612a38565b9580600052818a526040600020938a855498600160f81b7dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8b1617875560038882169788156115f3575b0197831697886fffffffffffffffffffffffffffffffff198254161790556001600160a01b03809a16958691600584528b604060002054169687945260019b8c6040600020015416946115408b858861405a565b604080518881526001600160801b0392831660208201529290911690820152606090a47ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce78a604051838152a1813b6115a0575b505050505001919061139b565b813b156102be576000608492819560405197889687956372eba20360e01b875260048701526024860152604485015260648401525af16115e4575b80808080611593565b6115ed90612978565b856115db565b60018101600160a01b60ff60a01b198254161790556114ec565b602486604051906339c6dc7360e21b82526004820152fd5b602486604051906322cad1af60e11b82526004820152fd5b6024826040519063fe19f19f60e01b82526004820152fd5b346102be576020806003193601126102be57600435906116736132ed565b81600052600b815260ff60016040600020015460a81c161561184e5761169882613c75565b6005811015610b2b57600481036116c15760248360405190634a5541ef60e01b82526004820152fd5b600381036116e1576024836040519063fe19f19f60e01b82526004820152fd5b6002146118365761170882600052600b6020526001600160a01b0360406000205416331490565b156108b55781600052600b815260ff60406000205460f01c161561181e5781600052600b8152604060002060ff60f01b19815416905560405191807f0eb069207093cd3e51cd1370d2d369770057fbe29947e577e5fb428c6c6fc78f600080a2600582526001600160a01b036040600020541692833b6117af575b7ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce78383604051908152a1005b833b156102be57600081602481837ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce7987f341a0bd90000000000000000000000000000000000000000000000000000000083528760048401525af1156117835761181890612978565b83611783565b602482604051906339c6dc7360e21b82526004820152fd5b602482604051906322cad1af60e11b82526004820152fd5b6024826040519062b8e7e760e51b82526004820152fd5b346102be5760203660031901126102be576004356001600160a01b03908181168091036102be578160005416338103610c765750600a5491816001600160a01b0319841617600a556040519216825260208201527fa2548bd4b805e907c1558a47b5858324fe8bb4a2e1ddfca647eecbf65610eebc60403392a260095460001981019081116119215760407f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c91815190600182526020820152a1005b634e487b7160e01b600052601160045260246000fd5b346102be5760203660031901126102be5761195061280c565b6000546001600160a01b03808216923384036119a2576001600160a01b03199350169182911617600055337fbdd36143ee09de60bdefca70680e0f71189b2ed7acee364b53917ad433fdaf80600080a3005b6040516331b339a960e21b81526001600160a01b0385166004820152336024820152604490fd5b346102be5760203660031901126102be576001600160a01b036119ea61280c565b168015611a095760005260066020526020604060002054604051908152f35b608460405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152fd5b346102be5760203660031901126102be57600435611aaa6105c78260005260056020526001600160a01b0360406000205416151590565b600052600560205260206001600160a01b0360406000205416604051908152f35b346102be5760203660031901126102be576020611ae9600435612c26565b6001600160a01b0360405191168152f35b346102be5760003660031901126102be5760206001600160a01b0360015416604051908152f35b346102be5760203660031901126102be5760043580600052600b60205260ff60016040600020015460a81c16156103675761043f602091613fdf565b346102be5760203660031901126102be5760043580600052600b60205260ff60016040600020015460a81c1615610367576000611b9982613c75565b6005811015610b2b57600203611bb7575b6020906040519015158152f35b50600052600b602052602060ff60406000205460f01c16611baa565b346102be5760203660031901126102be57600435611bef6132ed565b611bf881612ba4565b15611d3257611c0681613f76565b15611d1257611c1481612c26565b611c1d82612d54565b159081611d09575b81611cf6575b50611cde57602081611c5d7ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce793612c26565b9080600052600783526001600160a01b036040600020926001600160a01b031993848154169055169182600052600684526040600020600019815401905581600052600584526040600020908154169055806000604051937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8280a48152a1005b60249060405190630da9b01360e01b82526004820152fd5b6001600160a01b03915016151582611c2b565b60009150611c25565b60405163216caf0d60e01b81526004810191909152336024820152604490fd5b602490604051907f817cd6390000000000000000000000000000000000000000000000000000000082526004820152fd5b346102be57611d713661284c565b60405191602083019383851067ffffffffffffffff861117611d9d576102bc9460405260008452612d8b565b634e487b7160e01b600052604160045260246000fd5b346102be5760203660031901126102be576020610308600435612ba4565b346102be576020806003193601126102be5760043590611def6132ed565b611df882612ba4565b15611e155760248260405190634a5541ef60e01b82526004820152fd5b611e1e82612e21565b61163d57611e4282600052600b6020526001600160a01b0360406000205416331490565b156108b557611e5082613282565b9180600052600b8252611e696002604060002001612c90565b906001600160801b03938483511685821610156118365781600052600b845260ff60406000205460f01c161561181e57808585611eac611eb69483885116612a38565b9501511690612a38565b9080600052600b84527ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce7604060002094855494600160f81b7dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8716178755600388861697881561200b575b0197811697886fffffffffffffffffffffffffffffffff198254161790556001600160a01b038096169560058352867f5edb27d6c1a327513b90a792050debf074b7194444885e3144d4decc5caaaa508260406000205416978893600b87526001604060002001541694611f948d858861405a565b604080518a81526001600160801b0392831660208201529290911690820152606090a4604051838152a1813b611fc657005b813b156102be576000608492819560405197889687956372eba20360e01b875260048701526024860152604485015260648401525af161200257005b6102bc90612978565b60018101600160a01b60ff60a01b19825416179055611f1f565b346102be5760203660031901126102be576001600160a01b0361204661280c565b16600052600260205260206001600160801b0360406000205416604051908152f35b346102be576102bc6120793661284c565b9161208c6120878433613cfc565b612b33565b613ddb565b346102be5760003660031901126102be576020600954604051908152f35b346102be5760203660031901126102be5760043580600052600b60205260ff60016040600020015460a81c1615610367576120e990613c75565b6005811015610b2b57806020911590811561210a575b506040519015158152f35b6001915014826120ff565b346102be57602060031981813601126102be576004359067ffffffffffffffff908183116102be57610120833603918201126102be576121536132ed565b61010483013590602219018112156102be578201916004830135928284116102be57602481016060916060860280360383136102be5760249061219588612a51565b976121a3604051998a6129a9565b8852888801920101913683116102be57905b878383106123c2578787878251906121cc82612a51565b916121da60405193846129a9565b808352601f196121e982612a51565b018660005b8281106123ac5750505064ffffffffff90814216946001600160801b03968761221682613349565b515116828a61222484613349565b510151168580604061223586613349565b510151168a0116906040519261224a84612923565b83528b830152604082015261225e87613349565b5261226886613349565b506001938660015b8a8c87831061232b57908b846001600160a01b038c60a4810135828116908190036102be57610800956122eb9561231b946122ad60248601612acf565b6122b960448701612acf565b6122c560648801612adc565b916122d288600401612adc565b94846122e060848b01612af0565b966040519d8e61293f565b168c528d8c0152151560408b0152151560608a01521660808801521660a086015260c085015260c4369101612b04565b60e083015261010082015261336a565b88938580604061235f8b8661234f8a8e9a612346828d613356565b5151169a613356565b5101511694600019890190613356565b51015116816040612370888c613356565b510151160116916040519361238485612923565b84528301526040820152612398828b613356565b526123a3818a613356565b50018790612270565b6123b4612c71565b8282880101520187906121ee565b84916123ce3685612a7b565b8152019101906121b5565b346102be5760203660031901126102be5760043580600052600b60205260ff60016040600020015460a81c16156103675760209060009080600052600b8352604060002060ff815460f01c168061246c575b612443575b50506001600160801b0360405191168152f35b61246592506001600160801b03600261245f9201541691613282565b90612a38565b8280612430565b5060ff600182015460a01c161561242b565b346102be5760403660031901126102be5761249761280c565b602435906001600160a01b0380806124ae85612c26565b169216918083146125a857803314908115612583575b5015612519578260005260076020526040600020826001600160a01b03198254161790556124f183612c26565b167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600080a4005b608460405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152fd5b9050600052600860205260406000203360005260205260ff60406000205416846124c4565b608460405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152fd5b346102be5760203660031901126102be576020611ae96004356129fb565b346102be5760003660031901126102be5760405160006003549060018260011c91600184169182156126eb575b6020948585108414610f42578587948686529182600014610f2257505060011461268e5750610eb1925003836129a9565b84915060036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b906000915b8583106126d3575050610eb1935082010185610ea4565b805483890185015287945086939092019181016126bc565b92607f169261265d565b346102be5760203660031901126102be57600435907fffffffff0000000000000000000000000000000000000000000000000000000082168092036102be57817f80ac58cd000000000000000000000000000000000000000000000000000000006020931490811561279a575b8115612770575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483612769565b7f5b5e139f0000000000000000000000000000000000000000000000000000000081149150612762565b60005b8381106127d75750506000910152565b81810151838201526020016127c7565b90602091612800815180928185528580860191016127c4565b601f01601f1916010190565b600435906001600160a01b03821682036102be57565b602435906001600160a01b03821682036102be57565b35906001600160a01b03821682036102be57565b60609060031901126102be576001600160a01b039060043582811681036102be579160243590811681036102be579060443590565b9181601f840112156102be5782359167ffffffffffffffff83116102be576020808501948460051b0101116102be57565b90815180825260208080930193019160005b8281106128d2575050505090565b835180516001600160801b031686528083015167ffffffffffffffff168684015260409081015164ffffffffff1690860152606090940193928101926001016128c4565b359081151582036102be57565b6060810190811067ffffffffffffffff821117611d9d57604052565b610120810190811067ffffffffffffffff821117611d9d57604052565b6040810190811067ffffffffffffffff821117611d9d57604052565b67ffffffffffffffff8111611d9d57604052565b610160810190811067ffffffffffffffff821117611d9d57604052565b90601f8019910116810190811067ffffffffffffffff821117611d9d57604052565b67ffffffffffffffff8111611d9d57601f01601f191660200190565b35906001600160801b03821682036102be57565b612a1e6105c78260005260056020526001600160a01b0360406000205416151590565b60005260076020526001600160a01b036040600020541690565b6001600160801b03918216908216039190821161192157565b67ffffffffffffffff8111611d9d5760051b60200190565b359064ffffffffff821682036102be57565b91908260609103126102be57604051612a9381612923565b8092612a9e816129e7565b825260208101359067ffffffffffffffff821682036102be576040612aca918193602086015201612a69565b910152565b3580151581036102be5790565b356001600160a01b03811681036102be5790565b356001600160801b03811681036102be5790565b91908260409103126102be57604051612b1c8161295c565b6020808294612b2a81612838565b84520135910152565b15612b3a57565b608460405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152fd5b80600052600b60205260ff60016040600020015460a81c161561036757600052600b60205260ff60016040600020015460a01c1690565b15612be257565b606460405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152fd5b60005260056020526001600160a01b0360406000205416612c48811515612bdb565b90565b9190811015612c5b5760051b0190565b634e487b7160e01b600052603260045260246000fd5b60405190612c7e82612923565b60006040838281528260208201520152565b90604051612c9d81612923565b6040819360018154916001600160801b0392838116865260801c6020860152015416910152565b908154612cd081612a51565b92604093612ce160405191826129a9565b82815280946020809201926000526020600020906000935b858510612d0857505050505050565b60018481928451612d1881612923565b64ffffffffff87546001600160801b038116835267ffffffffffffffff8160801c168584015260c01c1686820152815201930194019391612cf9565b80600052600b60205260ff60016040600020015460a81c161561036757600052600b60205260ff60016040600020015460b01c1690565b90612daf939291612d9f6120878433613cfc565b612daa838383613ddb565b6146f5565b15612db657565b60405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608490fd5b80600052600b60205260ff60016040600020015460a81c161561036757600052600b60205260406000205460f81c90565b929192612e5d6132ed565b612e6681612ba4565b6131c257612e8a81600052600b6020526001600160a01b0360406000205416331490565b918215806131b2575b6108b557600092828452602093600585526001600160a01b039660409388858420541693806131a6575b6131685788811698891561313f576001600160801b0380841693841561310f57612f00612ee98a613fdf565b8a8852600b8c5260028a8920015460801c90612a38565b82811686116130c75750918491612f5f612f2d612f9895600b8e8e8c525260028c8b20015460801c6140ea565b8b8952600b8d5260028b8a200190836fffffffffffffffffffffffffffffffff1983549260801b169116178155612c90565b90612f7a818d8401511692828c818351169201511690612a38565b161115613098575b888652600b8a526001888720015416928361405a565b88867f40b88e5c41c5a97ffb7b6ef88a0a2d505aa0c634cf8a0275cb236ea7dd87ed4d898851868152a4823314158061308e575b612fff575b5050507ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce793945051908152a1565b823b1561308a5760847ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce7979883865195869485937f13375c3b0000000000000000000000000000000000000000000000000000000085528a6004860152336024860152604485015260648401525af161307b575b859481612fd1565b61308490612978565b38613073565b5080fd5b50823b1515612fcc565b888652600b8a5287862060018101600160a01b60ff60a01b1982541617905560ff60f01b198154169055612f82565b88517fa1fb2bbc000000000000000000000000000000000000000000000000000000008152600481018b90526001600160801b03928316602482015291166044820152606490fd5b6024898951907fd2aabcd90000000000000000000000000000000000000000000000000000000082526004820152fd5b600486517fc61a0e9e000000000000000000000000000000000000000000000000000000008152fd5b85896064928751927f5b97ed720000000000000000000000000000000000000000000000000000000084526004840152336024840152166044820152fd5b50838982161415612ebd565b506131bc82613f76565b15612e93565b60249060405190634a5541ef60e01b82526004820152fd5b9291926131e681612ba4565b6131c25761320a81600052600b6020526001600160a01b0360406000205416331490565b91821580613272575b6108b557600092828452602093600585526001600160a01b03966040938885842054169380613266575b6131685788811698891561313f576001600160801b0380841693841561310f57612f00896140c2565b5083898216141561323d565b5061327c82613f76565b15613213565b64ffffffffff80421682600052600b602052604060002091825482828260a01c1610156132e35760c81c1611156132d15760040154600110156132c857612c48906141d9565b612c4890614105565b6001600160801b039150600201541690565b5050505050600090565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016300361331f57565b60046040517fa1c0d6e5000000000000000000000000000000000000000000000000000000008152fd5b805115612c5b5760200190565b8051821015612c5b5760209160051b010190565b906001600160a01b036001541660206001600160a01b0360c0850151166024604051809481937fdcf844a700000000000000000000000000000000000000000000000000000000835260048301525afa80156106b557600090613c41575b6133eb91506001600160801b0360a08501511690602060e08601510151916143c4565b6001600160801b0381511661010084015164ffffffffff6020860151168215613c175781518015613bed577f00000000000000000000000000000000000000000000000000000000000000008111613bbc575064ffffffffff604061344f84613349565b51015116811015613b655750600090819082815184905b808210613ad2575050505064ffffffffff421664ffffffffff8216811015613a925750506001600160801b0316808203613a5b5750506009549283600052600b6020526040600020916001600160801b0381511660028401906fffffffffffffffffffffffffffffffff198254161790556001600160a01b0360c083015116600184015490750100000000000000000000000000000000000000000060408501511515928654927fffffffffffffffffff0000ff000000000000000000000000000000000000000076ff000000000000000000000000000000000000000000006060890151151560b01b16921617171760018601556001600160a01b0384511691610100850151926040613581855195600019870190613356565b510151927fff000000000000000000000000000000000000000000000000000000000000007eff0000000000000000000000000000000000000000000000000000000000007dffffffffff0000000000000000000000000000000000000000000000000078ffffffffff000000000000000000000000000000000000000060208b015160a01b169660c81b169460f01b16911617171717845560005b81811061398b575050600185016009556001600160a01b0360c08301511660005260026020526001600160801b0380604060002054168160208401511601166001600160a01b0360c0840151166000526040600020906fffffffffffffffffffffffffffffffff198254161790556001600160a01b036080830151168015613947576136c86136c28760005260056020526001600160a01b0360406000205416151590565b15614503565b6136d186612d54565b158061393e575b80613936575b61391e5760207ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce7916137296136c28960005260056020526001600160a01b0360406000205416151590565b806000526006825260406000206001815401905587600052600582526040600020816001600160a01b0319825416179055876040519160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4878152a16137b96001600160a01b0360c0840151166001600160801b0380845116816020860151160116903090339061454e565b6001600160801b03604082015116806138ef575b507fef3d668acee46576ad5d407c42ab4d0cde13f3cd70b28f09a0fb9e3bf5bf09cb6138ac6001600160a01b03845116926001600160a01b03608086015116946001600160a01b0360c082015116966138e46138c460408401511515928c606086015115156001600160a01b0360e061010089015194549864ffffffffff6040519a6138588c61295c565b818160a01c168c5260c81c1660208b01520151511695604051998a99610160948b523360208c015260408b0190604090816001600160801b0391828151168552826020820151166020860152015116910152565b60a089015260c08801528060e08801528601906128b2565b926101008501906020908164ffffffffff91828151168552015116910152565b6101408301520390a4565b613918906001600160a01b0360c0850151166001600160a01b0360e0860151511690339061454e565b386137cd565b60248660405190630da9b01360e01b82526004820152fd5b5060006136de565b508015156136d8565b606460405162461bcd60e51b815260206004820152602060248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152fd5b61399a81610100860151613356565b519060048601549168010000000000000000831015611d9d5760018301806004890155831015612c5b5760019260048801600052602060002001906001600160801b03815116908254917fffffff00000000000000000000000000000000000000000000000000000000007cffffffffff000000000000000000000000000000000000000000000000604077ffffffffffffffff00000000000000000000000000000000602086015160801b1694015160c01b16931617171790550161361d565b60449250604051917fd90b7e3900000000000000000000000000000000000000000000000000000000835260048301526024820152fd5b6040517f210aec0e00000000000000000000000000000000000000000000000000000000815264ffffffffff918216600482015291166024820152604490fd5b9193509193613af6906001600160801b03613aed8588613356565b515116906140ea565b9364ffffffffff806040613b0a8685613356565b51015116941680851115613b28575060018493019192919092613466565b8385606492604051927f7b0bada8000000000000000000000000000000000000000000000000000000008452600484015260248301526044820152fd5b64ffffffffff6040613b7684613349565b5101516040517fb4c9e52c00000000000000000000000000000000000000000000000000000000815264ffffffffff938416600482015291169091166024820152604490fd5b602490604051907f4757689b0000000000000000000000000000000000000000000000000000000082526004820152fd5b60046040517f3952c64e000000000000000000000000000000000000000000000000000000008152fd5b60046040517f6095d3bc000000000000000000000000000000000000000000000000000000008152fd5b506020813d602011613c6d575b81613c5b602093836129a9565b810103126102be576133eb90516133c8565b3d9150613c4e565b80600052600b602052604060002060ff600182015460a01c16600014613c9c575050600490565b805460f81c613cf5575460a01c64ffffffffff164210613cef57613cbf81613282565b90600052600b6020526001600160801b038060026040600020015416911610600014613cea57600190565b600290565b50600090565b5050600390565b906001600160a01b038080613d1084612c26565b16931691838314938415613d43575b508315613d2d575b50505090565b613d39919293506129fb565b1614388080613d27565b909350600052600860205260406000208260005260205260ff604060002054169238613d1f565b15613d7157565b608460405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152fd5b90613e049291613dea83612c26565b916001600160a01b03948593848094169687911614613d6a565b1690811580613f0d57613e1684612d54565b159081613f04575b5080613efb575b613ee35791808492613e657ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce796602096613e5e85612c26565b1614613d6a565b60009382855260078652604085206001600160a01b031990818154169055818652600687526040862060001981540190558286526040862060018154019055838652600587528260408720918254161790557fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6040519580a48152a1565b60248360405190630da9b01360e01b82526004820152fd5b50831515613e25565b90501538613e1e565b608460405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152fd5b60009080825260056020526001600160a01b038060408420541692833314938415613fbb575b50508215613fa957505090565b909150613fb633926129fb565b161490565b60ff9294509060409181526008602052818120338252602052205416913880613f9c565b80600052600b602052613ff86002604060002001612c90565b81600052600b602052604060002060ff600182015460a01c1660001461402b57506001600160801b039150602001511690565b5460f81c61403d5750612c4890613282565b612c4891506001600160801b036040818351169201511690612a38565b916001600160a01b03604051927fa9059cbb000000000000000000000000000000000000000000000000000000006020850152166024830152604482015260448152608081019181831067ffffffffffffffff841117611d9d576140c0926040526145b9565b565b612c48906140cf81613fdf565b90600052600b60205260026040600020015460801c90612a38565b9190916001600160801b038080941691160191821161192157565b64ffffffffff61413a600091838352600b60205280806040852054818160a01c1693849160c81c160316918142160316614888565b91808252600b602052600460408320018054156141c55790829167ffffffffffffffff93526141976020832054828452600b6020526141926001600160801b03968760026040882001541696879360801c1690614978565b6149e6565b9283136141ad5750506141a990614ad0565b1690565b60029350604092508152600b60205220015460801c90565b602483634e487b7160e01b81526032600452fd5b64ffffffffff90814216906000908152600b6020526040908181208251936142008561298c565b8154956001600160a01b039182881687526020870197828160a01c168952828160c81c168789015260ff8160f01c161515606089015260f81c1515608088015260ff600193600186015490811660a08a0152818160a01c16151560c08a0152818160a81c16151560e08a015260b01c16151561010088015261014061429b600461428c60028801612c90565b966101208b0197885201612cc4565b97019187835280876142ad889a613349565b5101511693828288965b161061438c5750916143416141929284888161434698976001600160801b039e8f6142e38b8a51613356565b5151169d8a8f9b602061430067ffffffffffffffff928d51613356565b51015116998483614312848451613356565b51015116965081156143805761433092935051906000190190613356565b5101511680925b0316920316614888565b614978565b92831361435f5750506143598391614ad0565b16011690565b51602001519293928316928416831015915061437b9050575090565b905090565b50505051168092614337565b8094986001600160801b0390816143a48c8851613356565b51511601169801938282808a6143bb898951613356565b510151166142b7565b9092916143cf612c71565b936001600160801b03928381169182156144db5767016345785d8a00008082116144a45780851161446d57506144198561440a8193866155fc565b169460208901958652846155fc565b1691846144306040890194808652828751166140ea565b1610156144575761444984918261445295511690612a38565b91511690612a38565b168252565b634e487b7160e01b600052600160045260246000fd5b84604491604051917f4fea5c1a00000000000000000000000000000000000000000000000000000000835260048301526024820152fd5b60449250604051917f47152d6700000000000000000000000000000000000000000000000000000000835260048301526024820152fd5b505050505090506040516144ee81612923565b60008152600060208201526000604082015290565b1561450a57565b606460405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152fd5b9290604051927f23b872dd0000000000000000000000000000000000000000000000000000000060208501526001600160a01b03809216602485015216604483015260648201526064815260a081019181831067ffffffffffffffff841117611d9d576140c0926040525b6001600160a01b0316906146196040516145d28161295c565b6020938482527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564858301526000808587829751910182855af16146136146c5565b916156ab565b80519182159184831561469e575b5050509050156146345750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b91938180945001031261308a578201519081151582036146c2575080388084614627565b80fd5b3d156146f0573d906146d6826129cb565b916146e460405193846129a9565b82523d6000602084013e565b606090565b9290803b1561487f5761475f916020916001600160a01b0394604051809581948293897f150b7a02000000000000000000000000000000000000000000000000000000009b8c865233600487015216602485015260448401526080606484015260848301906127e7565b03916000968791165af19082908261481e575b50506147f8576147806146c5565b805190816147f35760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608490fd5b602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000161490565b909192506020813d602011614877575b8161483b602093836129a9565b8101031261308a5751907fffffffff00000000000000000000000000000000000000000000000000000000821682036146c25750903880614772565b3d915061482e565b50505050600190565b600160ff1b80821490811561496e575b5061494457600081121561493b576148c1816000035b6000841215614934578360000390614b0c565b917f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116148fd57600019911813156148f75790565b60000390565b60449250604051917fd49c26b300000000000000000000000000000000000000000000000000000000835260048301526024820152fd5b8390614b0c565b6148c1816148ae565b60046040517f9fe2b450000000000000000000000000000000000000000000000000000000008152fd5b9050821438614898565b80614993575061498e57670de0b6b3a764000090565b600090565b90670de0b6b3a76400008083146149e05750806149b8575050670de0b6b3a764000090565b670de0b6b3a764000081146149dc576149d790614192612c4893614c06565b614d48565b5090565b91505090565b600160ff1b808214908115614ac6575b50614a9c576000811215614a9357614a1f816000035b6000841215614a8c5783600003906155fc565b917f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8311614a5557600019911813156148f75790565b60449250604051917f120b5b4300000000000000000000000000000000000000000000000000000000835260048301526024820152fd5b83906155fc565b614a1f81614a0c565b60046040517fa6070c25000000000000000000000000000000000000000000000000000000008152fd5b90508214386149f6565b60008112614adb5790565b602490604051907f2463f3d50000000000000000000000000000000000000000000000000000000082526004820152fd5b670de0b6b3a7640000916000198383099280830292838086109503948086039514614bc85782851015614b8c57908291096001821901821680920460028082600302188083028203028083028203028083028203028083028203028083028203028092029003029360018380600003040190848311900302920304170290565b82606492604051927f63a05778000000000000000000000000000000000000000000000000000000008452600484015260248301526044820152fd5b505080925015614bd6570490565b634e487b7160e01b600052601260045260246000fd5b8015614bd6576ec097ce7bc90715b34b9f10000000000590565b80600080831315614d1757670de0b6b3a764000092838112614cf457506001925b808305906001600160801b03821160071b91821c9167ffffffffffffffff831160061b92831c63ffffffff811160051b90811c61ffff811160041b90811c60ff811160031b90811c91600f831160021b92831c93600197600160038711811b96871c11961717171717171781810294811d90828214614ce857506706f05b59d3b20000905b848213614cbc5750505050500290565b808391020590671bc16d674ec80000821215614cdb575b831d90614cac565b8091950194831d90614cd3565b93505093925050020290565b6000199392508015614bd6576ec097ce7bc90715b34b9f10000000000591614c27565b602483604051907f059b101b0000000000000000000000000000000000000000000000000000000082526004820152fd5b6000811215614d775768033dd1780914b97114198112613cef57614d6e90600003614d48565b612c4890614bec565b680a688906bd8affffff81136155cb57670de0b6b3a764000080604092831b05907780000000000000000000000000000000000000000000000067ff0000000000000083166154ae575b66ff00000000000083166153a6575b65ff000000000083166152a6575b64ff0000000083166151ae575b63ff00000083166150be575b62ff00008316614fd6575b61ff008316614ef6575b60ff8316614e1f575b02911c60bf031c90565b60808316614ee4575b838316614ed2575b60208316614ec0575b60108316614eae575b60088316614e9c575b60048316614e8a575b60028316614e78575b6001831615614e15576801000000000000000102831c614e15565b6801000000000000000102831c614e5d565b6801000000000000000302831c614e54565b6801000000000000000602831c614e4b565b6801000000000000000b02831c614e42565b6801000000000000001602831c614e39565b6801000000000000002c02831c614e30565b6801000000000000005902831c614e28565b6180008316614fc4575b6140008316614fb2575b6120008316614fa0575b6110008316614f8e575b6108008316614f7c575b6104008316614f6a575b6102008316614f58575b610100831615614e0c57680100000000000000b102831c614e0c565b6801000000000000016302831c614f3c565b680100000000000002c602831c614f32565b6801000000000000058c02831c614f28565b68010000000000000b1702831c614f1e565b6801000000000000162e02831c614f14565b68010000000000002c5d02831c614f0a565b680100000000000058b902831c614f00565b6280000083166150ac575b62400000831661509a575b622000008316615088575b621000008316615076575b620800008316615064575b620400008316615052575b620200008316615040575b62010000831615614e02576801000000000000b17202831c614e02565b680100000000000162e402831c615023565b6801000000000002c5c802831c615018565b68010000000000058b9102831c61500d565b680100000000000b172102831c615002565b68010000000000162e4302831c614ff7565b680100000000002c5c8602831c614fec565b6801000000000058b90c02831c614fe1565b6380000000831661519c575b6340000000831661518a575b63200000008316615178575b63100000008316615166575b63080000008316615154575b63040000008316615142575b63020000008316615130575b6301000000831615614df75768010000000000b1721802831c614df7565b6801000000000162e43002831c615112565b68010000000002c5c86002831c615106565b680100000000058b90c002831c6150fa565b6801000000000b17217f02831c6150ee565b680100000000162e42ff02831c6150e2565b6801000000002c5c85fe02831c6150d6565b68010000000058b90bfc02831c6150ca565b6480000000008316615294575b6440000000008316615282575b6420000000008316615270575b641000000000831661525e575b640800000000831661524c575b640400000000831661523a575b6402000000008316615228575b640100000000831615614deb57680100000000b17217f802831c614deb565b68010000000162e42ff102831c615209565b680100000002c5c85fe302831c6151fc565b6801000000058b90bfce02831c6151ef565b68010000000b17217fbb02831c6151e2565b6801000000162e42fff002831c6151d5565b68010000002c5c8601cc02831c6151c8565b680100000058b90c0b4902831c6151bb565b658000000000008316615394575b654000000000008316615382575b652000000000008316615370575b65100000000000831661535e575b65080000000000831661534c575b65040000000000831661533a575b650200000000008316615328575b65010000000000831615614dde576801000000b17218355102831c614dde565b680100000162e430e5a202831c615308565b6801000002c5c863b73f02831c6152fa565b68010000058b90cf1e6e02831c6152ec565b680100000b1721bcfc9a02831c6152de565b68010000162e43f4f83102831c6152d0565b680100002c5c89d5ec6d02831c6152c2565b6801000058b91b5bc9ae02831c6152b4565b6680000000000000831661549c575b6640000000000000831661548a575b66200000000000008316615478575b66100000000000008316615466575b66080000000000008316615454575b66040000000000008316615442575b66020000000000008316615430575b6601000000000000831615614dd05768010000b17255775c0402831c614dd0565b6801000162e525ee054702831c61540f565b68010002c5cc37da949202831c615400565b680100058ba01fb9f96d02831c6153f1565b6801000b175effdc76ba02831c6153e2565b680100162f3904051fa102831c6153d3565b6801002c605e2e8cec5002831c6153c4565b68010058c86da1c09ea202831c6153b5565b67800000000000000083166155ac575b674000000000000000831661559a575b6720000000000000008316615588575b6710000000000000008316615576575b6708000000000000008316615564575b6704000000000000008316615552575b6702000000000000008316615540575b670100000000000000831615614dc157680100b1afa5abcbed6102831c614dc1565b68010163da9fb33356d802831c61551e565b680102c9a3e778060ee702831c61550e565b6801059b0d31585743ae02831c6154fe565b68010b5586cf9890f62a02831c6154ee565b6801172b83c7d517adce02831c6154de565b6801306fe0a31b7152df02831c6154ce565b5077b504f333f9de6484800000000000000000000000000000006154be565b602490604051907f0360d0280000000000000000000000000000000000000000000000000000000082526004820152fd5b9091906000198382098382029182808310920391808303921461569a57670de0b6b3a7640000908183101561566357947faccb18165bd6fe31ae1cf318dc5b51eee0e1ba569b88cd74c1773b91fac1066994950990828211900360ee1b910360121c170290565b60449086604051917f5173648d00000000000000000000000000000000000000000000000000000000835260048301526024820152fd5b5050670de0b6b3a764000090049150565b9192901561570c57508151156156bf575090565b3b156156c85790565b606460405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b82519091501561571f5750805190602001fd5b6108d49060405191829162461bcd60e51b83526020600484015260248301906127e756fea164736f6c6343000817000a"; bytes public constant BYTECODE_LOCKUP_LINEAR =