Skip to content

Commit

Permalink
snapshot and add test
Browse files Browse the repository at this point in the history
  • Loading branch information
0xgregthedev committed Jan 19, 2024
1 parent 6585fdc commit 1e6c3c3
Show file tree
Hide file tree
Showing 7 changed files with 144 additions and 32 deletions.
141 changes: 115 additions & 26 deletions .gas-snapshot
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<<<<<<< HEAD
IntegrationTestCaveats:testInvalidCaveatLength() (gas: 130030)
IntegrationTestCaveats:testInvalidCaveats() (gas: 162079)
IntegrationTestCaveats:testOriginateUnapprovedFulfiller() (gas: 332191)
Expand All @@ -14,19 +15,38 @@ IntegrationTestCaveats:testRefinanceLoanStartAtBlockTimestampInvalidLoan() (gas:
IntegrationTestCaveats:testRefinanceUnapprovedFulfiller() (gas: 456351)
IntegrationTestCaveats:testRefinanceWCaveatsInvalidSalt() (gas: 377100)
IntegrationTestCaveats:testRefinanceWLenderApproval() (gas: 402797)
=======
IntegrationTestCaveats:testInvalidCaveatLength() (gas: 130063)
IntegrationTestCaveats:testInvalidCaveats() (gas: 162343)
IntegrationTestCaveats:testOriginateUnapprovedFulfiller() (gas: 332499)
IntegrationTestCaveats:testOriginateWBorrowerApproval() (gas: 283366)
IntegrationTestCaveats:testOriginateWCaveatsAsBorrower() (gas: 308910)
IntegrationTestCaveats:testOriginateWCaveatsExpired() (gas: 159572)
IntegrationTestCaveats:testOriginateWCaveatsIncrementedNonce() (gas: 168284)
IntegrationTestCaveats:testOriginateWCaveatsInvalidSalt() (gas: 317731)
IntegrationTestCaveats:testOriginateWCaveatsInvalidSaltManual() (gas: 142245)
IntegrationTestCaveats:testOriginateWLenderApproval() (gas: 283680)
IntegrationTestCaveats:testRefinanceAsLender() (gas: 1053706)
IntegrationTestCaveats:testRefinanceCaveatFailure() (gas: 407873)
IntegrationTestCaveats:testRefinanceLoanStartAtBlockTimestampInvalidLoan() (gas: 347714)
IntegrationTestCaveats:testRefinanceUnapprovedFulfiller() (gas: 456553)
IntegrationTestCaveats:testRefinanceWCaveatsInvalidSalt() (gas: 377235)
IntegrationTestCaveats:testRefinanceWLenderApproval() (gas: 402865)
>>>>>>> d5c1cb1 (snapshot and add test)
ModuleTesting:testFixedTermDutchAuctionSettlement() (gas: 438055)
ModuleTesting:testFixedTermDutchAuctionSettlementAuctionNotStarted() (gas: 441431)
ModuleTesting:testFixedTermDutchAuctionSettlementGetSettlementAuctionExpired() (gas: 440880)
ModuleTesting:testFixedTermDutchAuctionSettlementNotValid() (gas: 437089)
ModuleTesting:testFixedTermDutchAuctionSettlementValid() (gas: 437866)
ModuleTesting:testFixedTermDutchAuctionSettlementValid() (gas: 437976)
ModuleTesting:testModuleValidation() (gas: 1274276)
PausableNonReentrantImpl:test() (gas: 2464)
PausableNonReentrantImpl:testReentrancy() (gas: 2757)
TestBorrowerEnforcer:testBERevertAdditionalTransfersFromBorrower() (gas: 76462)
TestBorrowerEnforcer:testBERevertInvalidLoanTerms() (gas: 81160)
TestBorrowerEnforcer:testBEValidLoanTerms() (gas: 72257)
TestBorrowerEnforcer:testBEValidLoanTermsAnyIssuer() (gas: 72321)
TestBorrowerEnforcer:testBEValidLoanTermsAnyIssuer() (gas: 72343)
TestCustodian:testCannotLazyMintTwice() (gas: 82189)
<<<<<<< HEAD
TestCustodian:testCannotMintInvalidLoanInvalidCustodian() (gas: 72517)
TestCustodian:testCannotMintInvalidLoanValidCustodian() (gas: 77917)
TestCustodian:testCustodianCannotBeAuthorized() (gas: 142208)
Expand All @@ -47,15 +67,38 @@ TestCustodian:testGenerateOrderSettlementNoActiveLoan() (gas: 163409)
TestCustodian:testGenerateOrderSettlementUnauthorized() (gas: 101896)
TestCustodian:testGenerateOrdersWithLoanStartAtBlockTimestampInvalidLoan() (gas: 461657)
TestCustodian:testGetBorrower() (gas: 78643)
=======
TestCustodian:testCannotMintInvalidLoanInvalidCustodian() (gas: 72495)
TestCustodian:testCannotMintInvalidLoanValidCustodian() (gas: 78027)
TestCustodian:testCustodianCannotBeAuthorized() (gas: 142186)
TestCustodian:testCustodySelector() (gas: 2697871)
TestCustodian:testDefaultCustodySelectorRevert() (gas: 72478)
TestCustodian:testGenerateOrderInvalidPostRepayment() (gas: 173136)
TestCustodian:testGenerateOrderInvalidPostSettlement() (gas: 163299)
TestCustodian:testGenerateOrderRepay() (gas: 177294)
TestCustodian:testGenerateOrderRepayAsRepayApprovedBorrower() (gas: 193780)
TestCustodian:testGenerateOrderRepayERC1155AndERC20() (gas: 875125)
TestCustodian:testGenerateOrderRepayERC1155AndERC20HandlerAuthorized() (gas: 804789)
TestCustodian:testGenerateOrderRepayInvalidHookAddress() (gas: 97670)
TestCustodian:testGenerateOrderRepayInvalidHookReturnType() (gas: 92031)
TestCustodian:testGenerateOrderRepayNotBorrower() (gas: 106909)
TestCustodian:testGenerateOrderSettlement() (gas: 155010)
TestCustodian:testGenerateOrderSettlementHandlerAuthorized() (gas: 160407)
TestCustodian:testGenerateOrderSettlementNoActiveLoan() (gas: 163477)
TestCustodian:testGenerateOrderSettlementUnauthorized() (gas: 101874)
TestCustodian:testGenerateOrdersWithLoanStartAtBlockTimestampInvalidLoan() (gas: 461635)
TestCustodian:testGetBorrower() (gas: 78621)
>>>>>>> d5c1cb1 (snapshot and add test)
TestCustodian:testInvalidAction() (gas: 173596)
TestCustodian:testInvalidActionRepayInActiveLoan() (gas: 130218)
TestCustodian:testInvalidActionSettleActiveLoan() (gas: 130156)
TestCustodian:testInvalidEncodedData() (gas: 26160)
TestCustodian:testMintWithApprovalSetAsBorrower() (gas: 366778)
TestCustodian:testMintWithApprovalSetAsBorrower() (gas: 366756)
TestCustodian:testMintWithApprovalSetAsBorrowerInvalidLoan() (gas: 64523)
TestCustodian:testMintWithApprovalSetNotAuthorized() (gas: 66842)
TestCustodian:testName() (gas: 7121)
TestCustodian:testName() (gas: 7099)
TestCustodian:testNonPayableFunctions() (gas: 215289)
<<<<<<< HEAD
TestCustodian:testOnlySeaport() (gas: 17829)
TestCustodian:testPreviewOrderNoActiveLoan() (gas: 105776)
TestCustodian:testPreviewOrderRepay() (gas: 230253)
Expand All @@ -67,11 +110,25 @@ TestCustodian:testSeaportMetadata() (gas: 8666)
TestCustodian:testSupportsInterface() (gas: 9428)
TestCustodian:testSymbol() (gas: 7127)
TestCustodian:testTokenURI() (gas: 85046)
=======
TestCustodian:testOnlySeaport() (gas: 17918)
TestCustodian:testPreviewOrderNoActiveLoan() (gas: 105754)
TestCustodian:testPreviewOrderRepay() (gas: 230299)
TestCustodian:testPreviewOrderSettlement() (gas: 192027)
TestCustodian:testPreviewOrderSettlementInvalidFufliller() (gas: 108315)
TestCustodian:testPreviewOrderSettlementInvalidRepayer() (gas: 117026)
TestCustodian:testRatifyOrder() (gas: 184115)
TestCustodian:testSeaportMetadata() (gas: 8644)
TestCustodian:testSupportsInterface() (gas: 9428)
TestCustodian:testSymbol() (gas: 7216)
TestCustodian:testTokenURI() (gas: 84246)
>>>>>>> d5c1cb1 (snapshot and add test)
TestCustodian:testTokenURIInvalidLoan() (gas: 13179)
TestLenderEnforcer:testLERevertAdditionalTransfersFromLender() (gas: 76366)
TestLenderEnforcer:testLERevertInvalidLoanTerms() (gas: 81118)
TestLenderEnforcer:testLEValidLoanTerms() (gas: 72191)
TestLenderEnforcer:testLERevertAdditionalTransfersFromLender() (gas: 76455)
TestLenderEnforcer:testLERevertInvalidLoanTerms() (gas: 81096)
TestLenderEnforcer:testLEValidLoanTerms() (gas: 72169)
TestLenderEnforcer:testLEValidLoanTermsAnyBorrower() (gas: 72234)
<<<<<<< HEAD
TestLenderEnforcer:testLEValidLoanTermsWithAdditionalTransfers() (gas: 73547)
TestLoanCombinations:testLoan20For721SimpleInterestDutchFixedRepay() (gas: 593006)
TestLoanCombinations:testLoan20for20SimpleInterestDutchFixedRepay() (gas: 600219)
Expand All @@ -85,37 +142,64 @@ TestNewLoan:testNewLoanRefinance() (gas: 590053)
TestNewLoan:testNewLoanViaOriginatorBorrowerApprovalAndLenderApproval() (gas: 325963)
TestNewLoan:testNewLoanViaOriginatorLenderApproval() (gas: 384892)
TestNewLoan:testSettleLoan() (gas: 642147)
=======
TestLenderEnforcer:testLEValidLoanTermsWithAdditionalTransfers() (gas: 73525)
TestLoanCombinations:testLoan20For721SimpleInterestDutchFixedRepay() (gas: 591836)
TestLoanCombinations:testLoan20for20SimpleInterestDutchFixedRepay() (gas: 599049)
TestLoanCombinations:testLoan721for20SimpleInterestDutchFixedRepay() (gas: 590320)
TestLoanCombinations:testLoanAstariaSettlementRepay() (gas: 580182)
TestNewLoan:testBuyNowPayLater() (gas: 2873894)
TestNewLoan:testInvalidSenderBNPL() (gas: 1613098)
TestNewLoan:testInvalidUserDataHashBNPL() (gas: 1615699)
TestNewLoan:testNewLoanAs1271ProxyAccountSender() (gas: 874195)
TestNewLoan:testNewLoanAs1271ProxyAccountThirdPartyFiller() (gas: 885184)
TestNewLoan:testNewLoanERC721CollateralDefaultTerms2() (gas: 429567)
TestNewLoan:testNewLoanRefinance() (gas: 589965)
TestNewLoan:testNewLoanViaOriginatorBorrowerApprovalAndLenderApproval() (gas: 326073)
TestNewLoan:testNewLoanViaOriginatorLenderApproval() (gas: 384870)
TestNewLoan:testSettleLoan() (gas: 642193)
>>>>>>> d5c1cb1 (snapshot and add test)
TestPausableNonReentrant:testNotOwner() (gas: 21276)
TestPausableNonReentrant:testPauseAndUnpause() (gas: 22643)
TestPausableNonReentrant:testReentrancy() (gas: 15404)
TestPausableNonReentrant:testUnpauseWhenNotPaused() (gas: 12604)
TestRepayLoan:testRepayLoanApprovedRepayer() (gas: 667145)
TestRepayLoan:testRepayLoanBase() (gas: 599909)
TestRepayLoan:testRepayLoanGenerateOrderNotSeaport() (gas: 438709)
<<<<<<< HEAD
TestRepayLoan:testRepayLoanInSettlement() (gas: 585701)
=======
TestRepayLoan:testRepayLoanInSettlement() (gas: 586024)
>>>>>>> d5c1cb1 (snapshot and add test)
TestRepayLoan:testRepayLoanInvalidRepayer() (gas: 604010)
TestRepayLoan:testRepayLoanThatDoesNotExist() (gas: 858641)
TestSimpleInterestPricing:test_calculateInterest() (gas: 881296)
TestSimpleInterestPricing:test_getPaymentConsideration() (gas: 928510)
TestSimpleInterestPricing:test_getRefinanceConsideration() (gas: 919314)
TestStarport:testAcquireTokensFail() (gas: 60430)
TestStarport:testAcquireTokensSuccess() (gas: 162999)
TestStarport:testActive() (gas: 69224)
TestStarport:testAcquireTokensFail() (gas: 60408)
TestStarport:testAcquireTokensSuccess() (gas: 162977)
TestStarport:testActive() (gas: 69313)
TestStarport:testAdditionalTransfers() (gas: 300732)
TestStarport:testAdditionalTransfersOriginate() (gas: 275428)
TestStarport:testAdditionalTransfersRefinance() (gas: 218147)
TestStarport:testAdditionalTransfersRefinance() (gas: 218236)
TestStarport:testApplyRefinanceConsiderationToLoanMalformed() (gas: 129974)
TestStarport:testCannotIssueSameLoanTwice() (gas: 364079)
TestStarport:testCannotOriginateWhilePaused() (gas: 73567)
TestStarport:testCannotSettleInvalidLoan() (gas: 74903)
TestStarport:testCannotSettleUnlessValidCustodian() (gas: 70963)
TestStarport:testCannotSettleUnlessValidCustodian() (gas: 70941)
TestStarport:testCaveatEnforcerRevert() (gas: 102578)
TestStarport:testDefaultFeeRake1() (gas: 387823)
TestStarport:testDefaultFeeRake2() (gas: 450166)
TestStarport:testDefaultFeeRakeExoticDebt() (gas: 397652)
<<<<<<< HEAD
TestStarport:testEIP712Signing() (gas: 83020)
TestStarport:testExoticDebtWithCustomPricingAndRepayment() (gas: 1237782)
TestStarport:testExoticDebtWithCustomPricingAndSettlement() (gas: 1692803)
=======
TestStarport:testEIP712Signing() (gas: 82998)
TestStarport:testExoticDebtWithCustomPricingAndRepayment() (gas: 1237828)
TestStarport:testExoticDebtWithCustomPricingAndSettlement() (gas: 1692871)
>>>>>>> d5c1cb1 (snapshot and add test)
TestStarport:testExoticDebtWithNoCaveatsNotAsBorrower() (gas: 376830)
TestStarport:testIncrementCaveatNonce() (gas: 35006)
TestStarport:testInitializedFlagSetProperly() (gas: 67438)
Expand All @@ -124,31 +208,36 @@ TestStarport:testInvalidAdditionalTransfersRefinance() (gas: 170796)
TestStarport:testInvalidAmountCollateral() (gas: 165945)
TestStarport:testInvalidAmountCollateral721() (gas: 165945)
TestStarport:testInvalidItemType() (gas: 151893)
TestStarport:testInvalidTransferLengthCollateral() (gas: 154184)
TestStarport:testInvalidTransferLengthCollateral() (gas: 154162)
TestStarport:testInvalidTransferLengthDebt() (gas: 175961)
TestStarport:testInvalidateCaveatSalt() (gas: 33450)
TestStarport:testNonDefaultCustodianCustodyCallFails() (gas: 264266)
TestStarport:testNonDefaultCustodianCustodyCallFails() (gas: 264244)
TestStarport:testNonDefaultCustodianCustodyCallSuccess() (gas: 290391)
TestStarport:testNonPayableFunctions() (gas: 114523)
<<<<<<< HEAD
TestStarport:testOverrideFeeRake() (gas: 384057)
TestStarport:testPause() (gas: 18259)
=======
TestStarport:testOverrideFeeRake() (gas: 384063)
TestStarport:testPause() (gas: 18237)
>>>>>>> d5c1cb1 (snapshot and add test)
TestStarport:testRefinancePostRepaymentFails() (gas: 127886)
TestStarport:testStargateGetOwner() (gas: 8808)
TestStarport:testTokenNoCodeCollateral() (gas: 150706)
TestStarport:testTokenNoCodeCollateral() (gas: 150684)
TestStarport:testTokenNoCodeDebt() (gas: 180957)
TestStarport:testUnpause() (gas: 17363)
TestStarport:testUnpause() (gas: 17341)
TestStrategistOriginator:testEncodeWithAccountCounter() (gas: 12330)
TestStrategistOriginator:testGetStrategistData() (gas: 1790990)
TestStrategistOriginator:testIncrementCounterAsStrategist() (gas: 38488)
TestStrategistOriginator:testIncrementCounterNotAuthorized() (gas: 13423)
TestStrategistOriginator:testInvalidCollateral() (gas: 211094)
TestStrategistOriginator:testInvalidDeadline() (gas: 216915)
TestStrategistOriginator:testInvalidDebt() (gas: 212802)
TestStrategistOriginator:testInvalidDebtAmountAskingMoreThanOffered() (gas: 213176)
TestStrategistOriginator:testInvalidDebtAmountOfferingZero() (gas: 213486)
TestStrategistOriginator:testInvalidDebtAmountRequestingZero() (gas: 213441)
TestStrategistOriginator:testInvalidDebtLength() (gas: 212096)
TestStrategistOriginator:testInvalidOffer() (gas: 427930)
TestStrategistOriginator:testInvalidSigner() (gas: 215234)
TestStrategistOriginator:testInvalidCollateral() (gas: 211024)
TestStrategistOriginator:testInvalidDeadline() (gas: 216845)
TestStrategistOriginator:testInvalidDebt() (gas: 212732)
TestStrategistOriginator:testInvalidDebtAmountAskingMoreThanOffered() (gas: 213106)
TestStrategistOriginator:testInvalidDebtAmountOfferingZero() (gas: 213416)
TestStrategistOriginator:testInvalidDebtAmountRequestingZero() (gas: 213371)
TestStrategistOriginator:testInvalidDebtLength() (gas: 212026)
TestStrategistOriginator:testInvalidOffer() (gas: 427827)
TestStrategistOriginator:testInvalidSigner() (gas: 215164)
TestStrategistOriginator:testSetStrategist() (gas: 17884)
TestStrategistOriginator:testWithdraw() (gas: 168001)
TestStrategistOriginator:testWithdraw() (gas: 167966)
2 changes: 1 addition & 1 deletion lib/seaport
Submodule seaport updated 61 files
+22 −0 .github/workflows/docs.yml
+2 −2 .github/workflows/stale.yml
+2 −23 .github/workflows/test.yml
+284 −6 README.md
+127 −0 contracts/helpers/navigator/SeaportNavigator.sol
+20 −0 contracts/helpers/navigator/lib/CriteriaHelper.sol
+66 −12 contracts/helpers/navigator/lib/CriteriaHelperLib.sol
+18 −0 contracts/helpers/navigator/lib/ExecutionsHelper.sol
+18 −0 contracts/helpers/navigator/lib/FulfillmentsHelper.sol
+10 −0 contracts/helpers/navigator/lib/HelperInterface.sol
+194 −0 contracts/helpers/navigator/lib/HelperItemLib.sol
+43 −11 contracts/helpers/navigator/lib/MerkleLib.sol
+300 −0 contracts/helpers/navigator/lib/NavigatorAdvancedOrderLib.sol
+64 −0 contracts/helpers/navigator/lib/NavigatorContextLib.sol
+44 −0 contracts/helpers/navigator/lib/NavigatorCriteriaResolverLib.sol
+41 −0 contracts/helpers/navigator/lib/NavigatorDetailsLib.sol
+116 −0 contracts/helpers/navigator/lib/NavigatorExecutionsLib.sol
+51 −0 contracts/helpers/navigator/lib/NavigatorFulfillmentsLib.sol
+44 −0 contracts/helpers/navigator/lib/NavigatorRequestValidatorLib.sol
+36 −0 contracts/helpers/navigator/lib/NavigatorSeaportValidatorLib.sol
+434 −0 contracts/helpers/navigator/lib/NavigatorSuggestedActionLib.sol
+0 −0 contracts/helpers/navigator/lib/OrderAvailabilityLib.sol
+18 −0 contracts/helpers/navigator/lib/OrderDetailsHelper.sol
+25 −22 contracts/helpers/navigator/lib/OrderStructureLib.sol
+20 −0 contracts/helpers/navigator/lib/RequestValidator.sol
+43 −0 contracts/helpers/navigator/lib/SeaportNavigatorInterface.sol
+68 −55 contracts/helpers/navigator/lib/SeaportNavigatorTypes.sol
+18 −0 contracts/helpers/navigator/lib/SuggestedActionHelper.sol
+20 −0 contracts/helpers/navigator/lib/ValidatorHelper.sol
+0 −296 contracts/helpers/order-helper/SeaportOrderHelper.sol
+0 −718 contracts/helpers/order-helper/lib/OrderHelperLib.sol
+0 −184 contracts/helpers/order-helper/lib/SeaportOrderHelperInterface.sol
+15 −80 contracts/helpers/order-validator/SeaportValidator.sol
+722 −0 contracts/helpers/order-validator/lib/ReadOnlyOrderValidator.sol
+1 −17 contracts/helpers/order-validator/lib/SeaportValidatorInterface.sol
+10 −0 docs/AuditLink.md
+12 −3 docs/Deployment.md
+9 −0 docs/FunctionSignatures.md
+104 −71 docs/OrderValidator.md
+9 −0 docs/Overview.md
+10 −0 docs/SeaportDiagramLink.md
+9 −0 docs/SeaportDocumentation.md
+9 −0 docs/ZoneDocumentation.md
+1 −1 lib/seaport-sol
+1 −1 package.json
+92 −0 script/CallNavigator.s.sol
+217 −0 script/NavigatorDeployer.s.sol
+12 −5 test/foundry/FulfillOrderTest.t.sol
+0 −28 test/foundry/new/BaseOrderTest.sol
+9 −4 test/foundry/new/FuzzGenerators.t.sol
+669 −0 test/foundry/new/SeaportNavigator.t.sol
+61 −0 test/foundry/new/SeaportNavigatorTest.sol
+0 −669 test/foundry/new/SeaportOrderHelper.t.sol
+7 −37 test/foundry/new/SeaportValidator.t.sol
+33 −0 test/foundry/new/SeaportValidatorTest.sol
+90 −41 test/foundry/new/helpers/FuzzEngine.sol
+7 −7 test/foundry/new/helpers/FuzzEngineLib.sol
+7 −8 test/foundry/new/helpers/FuzzGenerators.sol
+12 −12 test/foundry/new/helpers/FuzzTestContextLib.sol
+2 −11 test/foundry/offerers/ContractOffersNativeTokenOfferItems.t.sol
+25 −32 yarn.lock
12 changes: 11 additions & 1 deletion test/StarportTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,20 @@ contract StarportTest is BaseOrderTest, Stargate {
Account memory signer,
bytes32 salt,
address enforcer
) public view returns (CaveatEnforcer.SignedCaveats memory signedCaveats) {
return getBorrowerSignedCaveat(details, signer, salt, enforcer, true);
}

function getBorrowerSignedCaveat(
BorrowerEnforcer.Details memory details,
Account memory signer,
bytes32 salt,
address enforcer,
bool singleUse
) public view returns (CaveatEnforcer.SignedCaveats memory signedCaveats) {
signedCaveats.caveats = new CaveatEnforcer.Caveat[](1);
signedCaveats.salt = salt;
signedCaveats.singleUse = true;
signedCaveats.singleUse = singleUse;
signedCaveats.deadline = block.timestamp + 1 days;
signedCaveats.caveats[0] = CaveatEnforcer.Caveat({enforcer: enforcer, data: abi.encode(details)});
bytes32 hash = SP.hashCaveatWithSaltAndNonce(
Expand Down
15 changes: 14 additions & 1 deletion test/integration-testing/TestCaveats.sol
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ contract IntegrationTestCaveats is StarportTest, DeepEq, MockCall {
details: BorrowerEnforcer.Details({loan: loan}),
signer: borrower,
salt: bytes32(uint256(1)),
enforcer: address(borrowerEnforcer)
enforcer: address(borrowerEnforcer),
singleUse: true
});

_setApprovalsForSpentItems(borrower.addr, loan.collateral);

_setApprovalsForSpentItems(lender.addr, loan.debt);
Expand All @@ -56,6 +58,17 @@ contract IntegrationTestCaveats is StarportTest, DeepEq, MockCall {

vm.expectRevert(StarportLib.InvalidSalt.selector);
SP.originate(new AdditionalTransfer[](0), borrowerCaveat, _emptyCaveat(), loan);

borrowerCaveat = getBorrowerSignedCaveat({
details: BorrowerEnforcer.Details({loan: loan}),
signer: borrower,
salt: bytes32(uint256(1)),
enforcer: address(borrowerEnforcer),
singleUse: false
});

vm.expectRevert(StarportLib.InvalidSalt.selector);
SP.originate(new AdditionalTransfer[](0), borrowerCaveat, _emptyCaveat(), loan);
}

function testOriginateWCaveatsExpired() public {
Expand Down

0 comments on commit 1e6c3c3

Please sign in to comment.