Skip to content

Commit

Permalink
feat: create2 improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
0xgregthedev committed Jan 18, 2024
1 parent f0fc582 commit a1abe7b
Show file tree
Hide file tree
Showing 3 changed files with 162 additions and 134 deletions.
267 changes: 134 additions & 133 deletions .gas-snapshot
Original file line number Diff line number Diff line change
@@ -1,156 +1,157 @@
IntegrationTestCaveats:testInvalidCaveatLength() (gas: 130019)
IntegrationTestCaveats:testInvalidCaveatLength() (gas: 129997)
IntegrationTestCaveats:testInvalidCaveats() (gas: 162046)
IntegrationTestCaveats:testOriginateUnapprovedFulfiller() (gas: 332147)
IntegrationTestCaveats:testOriginateWBorrowerApproval() (gas: 283288)
IntegrationTestCaveats:testOriginateWCaveatsAsBorrower() (gas: 306526)
IntegrationTestCaveats:testOriginateWCaveatsExpired() (gas: 159299)
IntegrationTestCaveats:testOriginateWCaveatsIncrementedNonce() (gas: 168077)
IntegrationTestCaveats:testOriginateWCaveatsInvalidSalt() (gas: 284586)
IntegrationTestCaveats:testOriginateWCaveatsInvalidSaltManual() (gas: 141962)
IntegrationTestCaveats:testOriginateWLenderApproval() (gas: 283408)
IntegrationTestCaveats:testRefinanceAsLender() (gas: 1053605)
IntegrationTestCaveats:testRefinanceCaveatFailure() (gas: 407716)
IntegrationTestCaveats:testRefinanceLoanStartAtBlockTimestampInvalidLoan() (gas: 347568)
IntegrationTestCaveats:testRefinanceUnapprovedFulfiller() (gas: 456374)
IntegrationTestCaveats:testRefinanceWCaveatsInvalidSalt() (gas: 377067)
IntegrationTestCaveats:testRefinanceWLenderApproval() (gas: 402764)
ModuleTesting:testFixedTermDutchAuctionSettlement() (gas: 438033)
ModuleTesting:testFixedTermDutchAuctionSettlementAuctionNotStarted() (gas: 441409)
ModuleTesting:testFixedTermDutchAuctionSettlementGetSettlementAuctionExpired() (gas: 440947)
ModuleTesting:testFixedTermDutchAuctionSettlementNotValid() (gas: 437045)
ModuleTesting:testFixedTermDutchAuctionSettlementValid() (gas: 437844)
ModuleTesting:testModuleValidation() (gas: 1274232)
IntegrationTestCaveats:testOriginateUnapprovedFulfiller() (gas: 332125)
IntegrationTestCaveats:testOriginateWBorrowerApproval() (gas: 283266)
IntegrationTestCaveats:testOriginateWCaveatsAsBorrower() (gas: 306504)
IntegrationTestCaveats:testOriginateWCaveatsExpired() (gas: 159212)
IntegrationTestCaveats:testOriginateWCaveatsIncrementedNonce() (gas: 168079)
IntegrationTestCaveats:testOriginateWCaveatsInvalidSalt() (gas: 284564)
IntegrationTestCaveats:testOriginateWCaveatsInvalidSaltManual() (gas: 141940)
IntegrationTestCaveats:testOriginateWLenderApproval() (gas: 283386)
IntegrationTestCaveats:testRefinanceAsLender() (gas: 1053561)
IntegrationTestCaveats:testRefinanceCaveatFailure() (gas: 407628)
IntegrationTestCaveats:testRefinanceLoanStartAtBlockTimestampInvalidLoan() (gas: 347435)
IntegrationTestCaveats:testRefinanceUnapprovedFulfiller() (gas: 456219)
IntegrationTestCaveats:testRefinanceWCaveatsInvalidSalt() (gas: 376979)
IntegrationTestCaveats:testRefinanceWLenderApproval() (gas: 402698)
ModuleTesting:testFixedTermDutchAuctionSettlement() (gas: 437989)
ModuleTesting:testFixedTermDutchAuctionSettlementAuctionNotStarted() (gas: 441365)
ModuleTesting:testFixedTermDutchAuctionSettlementGetSettlementAuctionExpired() (gas: 440814)
ModuleTesting:testFixedTermDutchAuctionSettlementNotValid() (gas: 437023)
ModuleTesting:testFixedTermDutchAuctionSettlementValid() (gas: 437800)
ModuleTesting:testModuleValidation() (gas: 1274210)
PausableNonReentrantImpl:test() (gas: 2464)
PausableNonReentrantImpl:testReentrancy() (gas: 2757)
TestBorrowerEnforcer:testBERevertAdditionalTransfersFromBorrower() (gas: 76462)
TestBorrowerEnforcer:testBERevertInvalidLoanTerms() (gas: 81160)
TestBorrowerEnforcer:testBEValidLoanTerms() (gas: 72257)
TestBorrowerEnforcer:testBEValidLoanTermsAnyIssuer() (gas: 72321)
TestCustodian:testCannotLazyMintTwice() (gas: 82131)
TestCustodian:testCannotMintInvalidLoanInvalidCustodian() (gas: 72437)
TestCustodian:testCannotMintInvalidLoanValidCustodian() (gas: 77947)
TestCustodian:testCustodianCannotBeAuthorized() (gas: 142196)
TestCustodian:testCustodySelector() (gas: 2706027)
TestCustodian:testDefaultCustodySelectorRevert() (gas: 72420)
TestCustodian:testGenerateOrderInvalidPostRepayment() (gas: 173141)
TestCustodian:testGenerateOrderInvalidPostSettlement() (gas: 163282)
TestCustodian:testGenerateOrderRepay() (gas: 177299)
TestCustodian:testGenerateOrderRepayAsRepayApprovedBorrower() (gas: 193763)
TestCustodian:testGenerateOrderRepayERC1155AndERC20() (gas: 875091)
TestCustodian:testGenerateOrderRepayERC1155AndERC20HandlerAuthorized() (gas: 804777)
TestCustodian:testGenerateOrderRepayInvalidHookAddress() (gas: 97653)
TestCustodian:testGenerateOrderRepayInvalidHookReturnType() (gas: 92014)
TestCustodian:testGenerateOrderRepayNotBorrower() (gas: 106914)
TestCustodian:testGenerateOrderSettlement() (gas: 155015)
TestCustodian:testGenerateOrderSettlementHandlerAuthorized() (gas: 160412)
TestCustodian:testGenerateOrderSettlementNoActiveLoan() (gas: 163460)
TestCustodian:testGenerateOrderSettlementUnauthorized() (gas: 101879)
TestCustodian:testGenerateOrdersWithLoanStartAtBlockTimestampInvalidLoan() (gas: 461629)
TestCustodian:testGetBorrower() (gas: 78621)
TestCustodian:testInvalidAction() (gas: 173362)
TestCustodian:testInvalidActionRepayInActiveLoan() (gas: 130206)
TestCustodian:testInvalidActionSettleActiveLoan() (gas: 130166)
TestCustodian:testInvalidEncodedData() (gas: 26170)
TestCustodian:testMintWithApprovalSetAsBorrower() (gas: 366745)
TestCustodian:testMintWithApprovalSetAsBorrowerInvalidLoan() (gas: 64632)
TestCustodian:testMintWithApprovalSetNotAuthorized() (gas: 66873)
TestCustodian:testName() (gas: 7099)
TestCustodian:testNonPayableFunctions() (gas: 215173)
TestCustodian:testOnlySeaport() (gas: 17918)
TestCustodian:testPreviewOrderNoActiveLoan() (gas: 105759)
TestCustodian:testPreviewOrderRepay() (gas: 230309)
TestCustodian:testPreviewOrderSettlement() (gas: 192037)
TestCustodian:testPreviewOrderSettlementInvalidFufliller() (gas: 108320)
TestCustodian:testPreviewOrderSettlementInvalidRepayer() (gas: 117031)
TestCustodian:testRatifyOrder() (gas: 184120)
TestCustodian:testSeaportMetadata() (gas: 8644)
TestCustodian:testCannotLazyMintTwice() (gas: 82167)
TestCustodian:testCannotMintInvalidLoanInvalidCustodian() (gas: 72517)
TestCustodian:testCannotMintInvalidLoanValidCustodian() (gas: 77895)
TestCustodian:testCustodianCannotBeAuthorized() (gas: 142186)
TestCustodian:testCustodySelector() (gas: 2706107)
TestCustodian:testDefaultCustodySelectorRevert() (gas: 72370)
TestCustodian:testGenerateOrderInvalidPostRepayment() (gas: 173114)
TestCustodian:testGenerateOrderInvalidPostSettlement() (gas: 163277)
TestCustodian:testGenerateOrderRepay() (gas: 177272)
TestCustodian:testGenerateOrderRepayAsRepayApprovedBorrower() (gas: 193758)
TestCustodian:testGenerateOrderRepayERC1155AndERC20() (gas: 874971)
TestCustodian:testGenerateOrderRepayERC1155AndERC20HandlerAuthorized() (gas: 804657)
TestCustodian:testGenerateOrderRepayInvalidHookAddress() (gas: 97670)
TestCustodian:testGenerateOrderRepayInvalidHookReturnType() (gas: 92031)
TestCustodian:testGenerateOrderRepayNotBorrower() (gas: 106931)
TestCustodian:testGenerateOrderSettlement() (gas: 154988)
TestCustodian:testGenerateOrderSettlementHandlerAuthorized() (gas: 160385)
TestCustodian:testGenerateOrderSettlementNoActiveLoan() (gas: 163455)
TestCustodian:testGenerateOrderSettlementUnauthorized() (gas: 101896)
TestCustodian:testGenerateOrdersWithLoanStartAtBlockTimestampInvalidLoan() (gas: 461602)
TestCustodian:testGetBorrower() (gas: 78643)
TestCustodian:testInvalidAction() (gas: 173552)
TestCustodian:testInvalidActionRepayInActiveLoan() (gas: 130196)
TestCustodian:testInvalidActionSettleActiveLoan() (gas: 130134)
TestCustodian:testInvalidEncodedData() (gas: 26160)
TestCustodian:testMintWithApprovalSetAsBorrower() (gas: 366701)
TestCustodian:testMintWithApprovalSetAsBorrowerInvalidLoan() (gas: 64523)
TestCustodian:testMintWithApprovalSetNotAuthorized() (gas: 66842)
TestCustodian:testName() (gas: 7121)
TestCustodian:testNonPayableFunctions() (gas: 215289)
TestCustodian:testOnlySeaport() (gas: 17829)
TestCustodian:testPreviewOrderNoActiveLoan() (gas: 105754)
TestCustodian:testPreviewOrderRepay() (gas: 230277)
TestCustodian:testPreviewOrderSettlement() (gas: 192005)
TestCustodian:testPreviewOrderSettlementInvalidFufliller() (gas: 108315)
TestCustodian:testPreviewOrderSettlementInvalidRepayer() (gas: 117026)
TestCustodian:testRatifyOrder() (gas: 184093)
TestCustodian:testSeaportMetadata() (gas: 8666)
TestCustodian:testSupportsInterface() (gas: 9428)
TestCustodian:testSymbol() (gas: 7216)
TestCustodian:testTokenURI() (gas: 84908)
TestCustodian:testTokenURIInvalidLoan() (gas: 13157)
TestLenderEnforcer:testLERevertAdditionalTransfersFromLender() (gas: 76455)
TestLenderEnforcer:testLERevertInvalidLoanTerms() (gas: 81096)
TestLenderEnforcer:testLEValidLoanTerms() (gas: 72169)
TestLenderEnforcer:testLEValidLoanTermsAnyBorrower() (gas: 72323)
TestLenderEnforcer:testLEValidLoanTermsWithAdditionalTransfers() (gas: 73525)
TestLoanCombinations:testLoan20For721SimpleInterestDutchFixedRepay() (gas: 591976)
TestLoanCombinations:testLoan20for20SimpleInterestDutchFixedRepay() (gas: 599167)
TestLoanCombinations:testLoan721for20SimpleInterestDutchFixedRepay() (gas: 590438)
TestLoanCombinations:testLoanAstariaSettlementRepay() (gas: 580300)
TestNewLoan:testBuyNowPayLater() (gas: 2873894)
TestCustodian:testSymbol() (gas: 7127)
TestCustodian:testTokenURI() (gas: 85046)
TestCustodian:testTokenURIInvalidLoan() (gas: 13179)
TestLenderEnforcer:testLERevertAdditionalTransfersFromLender() (gas: 76366)
TestLenderEnforcer:testLERevertInvalidLoanTerms() (gas: 81118)
TestLenderEnforcer:testLEValidLoanTerms() (gas: 72191)
TestLenderEnforcer:testLEValidLoanTermsAnyBorrower() (gas: 72234)
TestLenderEnforcer:testLEValidLoanTermsWithAdditionalTransfers() (gas: 73547)
TestLoanCombinations:testLoan20For721SimpleInterestDutchFixedRepay() (gas: 591866)
TestLoanCombinations:testLoan20for20SimpleInterestDutchFixedRepay() (gas: 599079)
TestLoanCombinations:testLoan721for20SimpleInterestDutchFixedRepay() (gas: 590328)
TestLoanCombinations:testLoanAstariaSettlementRepay() (gas: 580212)
TestNewLoan:testBuyNowPayLater() (gas: 2873820)
TestNewLoan:testInvalidSenderBNPL() (gas: 1613098)
TestNewLoan:testInvalidUserDataHashBNPL() (gas: 1615699)
TestNewLoan:testNewLoanAs1271ProxyAccountSender() (gas: 874115)
TestNewLoan:testNewLoanAs1271ProxyAccountThirdPartyFiller() (gas: 885129)
TestNewLoan:testNewLoanERC721CollateralDefaultTerms2() (gas: 429545)
TestNewLoan:testNewLoanRefinance() (gas: 590031)
TestNewLoan:testNewLoanViaOriginatorBorrowerApprovalAndLenderApproval() (gas: 326073)
TestNewLoan:testNewLoanViaOriginatorLenderApproval() (gas: 384859)
TestNewLoan:testSettleLoan() (gas: 642171)
TestPausableNonReentrant:testNotOwner() (gas: 21254)
TestPausableNonReentrant:testPauseAndUnpause() (gas: 22621)
TestNewLoan:testNewLoanAs1271ProxyAccountSender() (gas: 874071)
TestNewLoan:testNewLoanAs1271ProxyAccountThirdPartyFiller() (gas: 885085)
TestNewLoan:testNewLoanERC721CollateralDefaultTerms2() (gas: 429501)
TestNewLoan:testNewLoanRefinance() (gas: 589921)
TestNewLoan:testNewLoanViaOriginatorBorrowerApprovalAndLenderApproval() (gas: 328271)
TestNewLoan:testNewLoanViaOriginatorLenderApproval() (gas: 387057)
TestNewLoan:testSettleLoan() (gas: 642105)
TestPausableNonReentrant:testNotOwner() (gas: 21276)
TestPausableNonReentrant:testPauseAndUnpause() (gas: 22643)
TestPausableNonReentrant:testReentrancy() (gas: 15404)
TestPausableNonReentrant:testUnpauseWhenNotPaused() (gas: 12582)
TestRepayLoan:testRepayLoanApprovedRepayer() (gas: 667169)
TestRepayLoan:testRepayLoanBase() (gas: 599955)
TestRepayLoan:testRepayLoanGenerateOrderNotSeaport() (gas: 438687)
TestRepayLoan:testRepayLoanInSettlement() (gas: 585892)
TestRepayLoan:testRepayLoanInvalidRepayer() (gas: 603988)
TestRepayLoan:testRepayLoanThatDoesNotExist() (gas: 858823)
TestPausableNonReentrant:testUnpauseWhenNotPaused() (gas: 12604)
TestRepayLoan:testRepayLoanApprovedRepayer() (gas: 667081)
TestRepayLoan:testRepayLoanBase() (gas: 599867)
TestRepayLoan:testRepayLoanGenerateOrderNotSeaport() (gas: 438643)
TestRepayLoan:testRepayLoanInSettlement() (gas: 585826)
TestRepayLoan:testRepayLoanInvalidRepayer() (gas: 603922)
TestRepayLoan:testRepayLoanThatDoesNotExist() (gas: 858669)
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:testAdditionalTransfers() (gas: 300721)
TestStarport:testAdditionalTransfersOriginate() (gas: 275417)
TestStarport:testAdditionalTransfersRefinance() (gas: 218147)
TestStarport:testApplyRefinanceConsiderationToLoanMalformed() (gas: 129974)
TestStarport:testCannotIssueSameLoanTwice() (gas: 364057)
TestStarport:testCannotOriginateWhilePaused() (gas: 73567)
TestStarport:testCannotSettleInvalidLoan() (gas: 74903)
TestStarport:testCannotSettleUnlessValidCustodian() (gas: 70963)
TestStarport:testAcquireTokensFail() (gas: 60408)
TestStarport:testAcquireTokensSuccess() (gas: 162977)
TestStarport:testActive() (gas: 69202)
TestStarport:testAdditionalTransfers() (gas: 300699)
TestStarport:testAdditionalTransfersOriginate() (gas: 275395)
TestStarport:testAdditionalTransfersRefinance() (gas: 218125)
TestStarport:testApplyRefinanceConsiderationToLoanMalformed() (gas: 129820)
TestStarport:testCannotIssueSameLoanTwice() (gas: 364035)
TestStarport:testCannotOriginateWhilePaused() (gas: 73545)
TestStarport:testCannotSettleInvalidLoan() (gas: 74881)
TestStarport:testCannotSettleUnlessValidCustodian() (gas: 70941)
TestStarport:testCaveatEnforcerRevert() (gas: 100284)
TestStarport:testDefaultFeeRake1() (gas: 387812)
TestStarport:testDefaultFeeRake2() (gas: 450155)
TestStarport:testDefaultFeeRakeExoticDebt() (gas: 397641)
TestStarport:testEIP712Signing() (gas: 83089)
TestStarport:testExoticDebtWithCustomPricingAndRepayment() (gas: 1237839)
TestStarport:testExoticDebtWithCustomPricingAndSettlement() (gas: 1692860)
TestStarport:testExoticDebtWithNoCaveatsNotAsBorrower() (gas: 376819)
TestStarport:testIncrementCaveatNonce() (gas: 35292)
TestStarport:testInitializedFlagSetProperly() (gas: 67438)
TestStarport:testInvalidAdditionalTransfersOriginate() (gas: 230392)
TestStarport:testInvalidAdditionalTransfersRefinance() (gas: 170796)
TestStarport:testInvalidAmountCollateral() (gas: 165912)
TestStarport:testChangeCustodian() (gas: 2657019)
TestStarport:testDefaultFeeRake1() (gas: 387768)
TestStarport:testDefaultFeeRake2() (gas: 450133)
TestStarport:testDefaultFeeRakeExoticDebt() (gas: 397619)
TestStarport:testEIP712Signing() (gas: 83108)
TestStarport:testExoticDebtWithCustomPricingAndRepayment() (gas: 1237773)
TestStarport:testExoticDebtWithCustomPricingAndSettlement() (gas: 1692816)
TestStarport:testExoticDebtWithNoCaveatsNotAsBorrower() (gas: 376797)
TestStarport:testIncrementCaveatNonce() (gas: 35405)
TestStarport:testInitializedFlagSetProperly() (gas: 67416)
TestStarport:testInvalidAdditionalTransfersOriginate() (gas: 230370)
TestStarport:testInvalidAdditionalTransfersRefinance() (gas: 170774)
TestStarport:testInvalidAmountCollateral() (gas: 165934)
TestStarport:testInvalidAmountCollateral721() (gas: 165934)
TestStarport:testInvalidItemType() (gas: 151860)
TestStarport:testInvalidTransferLengthCollateral() (gas: 154173)
TestStarport:testInvalidTransferLengthDebt() (gas: 175950)
TestStarport:testInvalidItemType() (gas: 151882)
TestStarport:testInvalidTransferLengthCollateral() (gas: 154151)
TestStarport:testInvalidTransferLengthDebt() (gas: 175840)
TestStarport:testInvalidateCaveatSalt() (gas: 33450)
TestStarport:testNonDefaultCustodianCustodyCallFails() (gas: 264255)
TestStarport:testNonDefaultCustodianCustodyCallSuccess() (gas: 290380)
TestStarport:testNonPayableFunctions() (gas: 112229)
TestStarport:testOverrideFeeRake() (gas: 384046)
TestStarport:testPause() (gas: 18259)
TestStarport:testRefinancePostRepaymentFails() (gas: 127973)
TestStarport:testStargateGetOwner() (gas: 8808)
TestStarport:testTokenNoCodeCollateral() (gas: 150695)
TestStarport:testNonDefaultCustodianCustodyCallFails() (gas: 264233)
TestStarport:testNonDefaultCustodianCustodyCallSuccess() (gas: 290358)
TestStarport:testNonPayableFunctions() (gas: 112207)
TestStarport:testOverrideFeeRake() (gas: 384091)
TestStarport:testPause() (gas: 18215)
TestStarport:testRefinancePostRepaymentFails() (gas: 127864)
TestStarport:testStargateGetOwner() (gas: 8786)
TestStarport:testTokenNoCodeCollateral() (gas: 150673)
TestStarport:testTokenNoCodeDebt() (gas: 180946)
TestStarport:testUnpause() (gas: 17363)
TestStarport:testUnpause() (gas: 17319)
TestStrategistOriginator:testEncodeWithAccountCounter() (gas: 12330)
TestStrategistOriginator:testGetStrategistData() (gas: 1809233)
TestStrategistOriginator:testIncrementCounterAsStrategist() (gas: 38767)
TestStrategistOriginator:testIncrementCounterAsStrategist() (gas: 38790)
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: 427919)
TestStrategistOriginator:testInvalidSigner() (gas: 215234)
TestStrategistOriginator:testInvalidCollateral() (gas: 213171)
TestStrategistOriginator:testInvalidDeadline() (gas: 218992)
TestStrategistOriginator:testInvalidDebt() (gas: 214879)
TestStrategistOriginator:testInvalidDebtAmountAskingMoreThanOffered() (gas: 215253)
TestStrategistOriginator:testInvalidDebtAmountOfferingZero() (gas: 215563)
TestStrategistOriginator:testInvalidDebtAmountRequestingZero() (gas: 215518)
TestStrategistOriginator:testInvalidDebtLength() (gas: 214173)
TestStrategistOriginator:testInvalidOffer() (gas: 429996)
TestStrategistOriginator:testInvalidSigner() (gas: 217311)
TestStrategistOriginator:testSetStrategist() (gas: 17884)
TestStrategistOriginator:testWithdraw() (gas: 168001)
Loading

0 comments on commit a1abe7b

Please sign in to comment.