Skip to content

Commit

Permalink
update defaultFeeRake mechanism to be configurable by token decimals,…
Browse files Browse the repository at this point in the history
… default to 18 decimals if there is no decimal available
  • Loading branch information
androolloyd committed Dec 22, 2023
1 parent a24d549 commit 741bea0
Show file tree
Hide file tree
Showing 4 changed files with 161 additions and 132 deletions.
228 changes: 114 additions & 114 deletions .gas-snapshot
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
IntegrationTestCaveats:testInvalidCaveatLength() (gas: 130618)
IntegrationTestCaveats:testInvalidCaveats() (gas: 162648)
IntegrationTestCaveats:testOriginateUnapprovedFulfiller() (gas: 333288)
IntegrationTestCaveats:testOriginateWBorrowerApproval() (gas: 283868)
IntegrationTestCaveats:testOriginateWCaveatsAsBorrower() (gas: 307416)
IntegrationTestCaveats:testOriginateWCaveatsExpired() (gas: 159899)
IntegrationTestCaveats:testOriginateWCaveatsIncrementedNonce() (gas: 168644)
IntegrationTestCaveats:testOriginateWCaveatsInvalidSalt() (gas: 285500)
IntegrationTestCaveats:testOriginateWCaveatsInvalidSaltManual() (gas: 142518)
IntegrationTestCaveats:testOriginateWLenderApproval() (gas: 283988)
IntegrationTestCaveats:testRefinanceAsLender() (gas: 1054470)
IntegrationTestCaveats:testRefinanceCaveatFailure() (gas: 409118)
IntegrationTestCaveats:testRefinanceLoanStartAtBlockTimestampInvalidLoan() (gas: 348724)
IntegrationTestCaveats:testRefinanceUnapprovedFulfiller() (gas: 457710)
IntegrationTestCaveats:testRefinanceWCaveatsInvalidSalt() (gas: 378400)
IntegrationTestCaveats:testRefinanceWLenderApproval() (gas: 403607)
ModuleTesting:testFixedTermDutchAuctionSettlement() (gas: 439174)
ModuleTesting:testFixedTermDutchAuctionSettlementGetSettlementAuctionExpired() (gas: 442063)
ModuleTesting:testFixedTermDutchAuctionSettlementNotValid() (gas: 438186)
ModuleTesting:testFixedTermDutchAuctionSettlementValid() (gas: 438985)
ModuleTesting:testModuleValidation() (gas: 1275373)
IntegrationTestCaveats:testInvalidCaveatLength() (gas: 136392)
IntegrationTestCaveats:testInvalidCaveats() (gas: 168369)
IntegrationTestCaveats:testOriginateUnapprovedFulfiller() (gas: 341270)
IntegrationTestCaveats:testOriginateWBorrowerApproval() (gas: 291935)
IntegrationTestCaveats:testOriginateWCaveatsAsBorrower() (gas: 315793)
IntegrationTestCaveats:testOriginateWCaveatsExpired() (gas: 165568)
IntegrationTestCaveats:testOriginateWCaveatsIncrementedNonce() (gas: 174350)
IntegrationTestCaveats:testOriginateWCaveatsInvalidSalt() (gas: 299632)
IntegrationTestCaveats:testOriginateWCaveatsInvalidSaltManual() (gas: 148201)
IntegrationTestCaveats:testOriginateWLenderApproval() (gas: 292055)
IntegrationTestCaveats:testRefinanceAsLender() (gas: 1071391)
IntegrationTestCaveats:testRefinanceCaveatFailure() (gas: 423956)
IntegrationTestCaveats:testRefinanceLoanStartAtBlockTimestampInvalidLoan() (gas: 363371)
IntegrationTestCaveats:testRefinanceUnapprovedFulfiller() (gas: 474530)
IntegrationTestCaveats:testRefinanceWCaveatsInvalidSalt() (gas: 393396)
IntegrationTestCaveats:testRefinanceWLenderApproval() (gas: 420544)
ModuleTesting:testFixedTermDutchAuctionSettlement() (gas: 447587)
ModuleTesting:testFixedTermDutchAuctionSettlementGetSettlementAuctionExpired() (gas: 450477)
ModuleTesting:testFixedTermDutchAuctionSettlementNotValid() (gas: 446599)
ModuleTesting:testFixedTermDutchAuctionSettlementValid() (gas: 447398)
ModuleTesting:testModuleValidation() (gas: 1283844)
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: 78672)
TestCustodian:testCannotLazyMintTwice() (gas: 78716)
TestCustodian:testCannotMintInvalidLoanInvalidCustodian() (gas: 69119)
TestCustodian:testCannotMintInvalidLoanValidCustodian() (gas: 74453)
TestCustodian:testCannotMintInvalidLoanValidCustodian() (gas: 74497)
TestCustodian:testCustodySelector() (gas: 2881479)
TestCustodian:testDefaultCustodySelectorRevert() (gas: 72312)
TestCustodian:testGenerateOrderInvalidPostRepayment() (gas: 173187)
TestCustodian:testGenerateOrderInvalidPostSettlement() (gas: 163286)
TestCustodian:testGenerateOrderRepay() (gas: 177342)
TestCustodian:testGenerateOrderRepayAsRepayApprovedBorrower() (gas: 193828)
TestCustodian:testGenerateOrderRepayERC1155AndERC20() (gas: 876979)
TestCustodian:testGenerateOrderRepayERC1155AndERC20HandlerAuthorized() (gas: 806565)
TestCustodian:testGenerateOrderInvalidPostRepayment() (gas: 173121)
TestCustodian:testGenerateOrderInvalidPostSettlement() (gas: 163220)
TestCustodian:testGenerateOrderRepay() (gas: 177276)
TestCustodian:testGenerateOrderRepayAsRepayApprovedBorrower() (gas: 193762)
TestCustodian:testGenerateOrderRepayERC1155AndERC20() (gas: 894122)
TestCustodian:testGenerateOrderRepayERC1155AndERC20HandlerAuthorized() (gas: 823702)
TestCustodian:testGenerateOrderRepayInvalidHookAddress() (gas: 97653)
TestCustodian:testGenerateOrderRepayInvalidHookReturnType() (gas: 92014)
TestCustodian:testGenerateOrderRepayNotBorrower() (gas: 106933)
TestCustodian:testGenerateOrderSettlement() (gas: 155019)
TestCustodian:testGenerateOrderSettlementHandlerAuthorized() (gas: 160416)
TestCustodian:testGenerateOrderSettlementNoActiveLoan() (gas: 163486)
TestCustodian:testGenerateOrderSettlement() (gas: 154953)
TestCustodian:testGenerateOrderSettlementHandlerAuthorized() (gas: 160350)
TestCustodian:testGenerateOrderSettlementNoActiveLoan() (gas: 163420)
TestCustodian:testGenerateOrderSettlementUnauthorized() (gas: 101861)
TestCustodian:testGenerateOrdersWithLoanStartAtBlockTimestampInvalidLoan() (gas: 462541)
TestCustodian:testGenerateOrdersWithLoanStartAtBlockTimestampInvalidLoan() (gas: 471018)
TestCustodian:testGetBorrower() (gas: 78643)
TestCustodian:testInvalidAction() (gas: 173252)
TestCustodian:testInvalidActionRepayInActiveLoan() (gas: 130140)
TestCustodian:testInvalidActionSettleActiveLoan() (gas: 130100)
TestCustodian:testInvalidAction() (gas: 173340)
TestCustodian:testInvalidActionRepayInActiveLoan() (gas: 130184)
TestCustodian:testInvalidActionSettleActiveLoan() (gas: 130144)
TestCustodian:testInvalidEncodedData() (gas: 26170)
TestCustodian:testMintWithApprovalSetAsBorrower() (gas: 364175)
TestCustodian:testMintWithApprovalSetAsBorrower() (gas: 372602)
TestCustodian:testMintWithApprovalSetAsBorrowerInvalidLoan() (gas: 60792)
TestCustodian:testMintWithApprovalSetNotAuthorized() (gas: 76657)
TestCustodian:testMintWithApprovalSetNotAuthorized() (gas: 76701)
TestCustodian:testName() (gas: 7121)
TestCustodian:testNonPayableFunctions() (gas: 215173)
TestCustodian:testOnlySeaport() (gas: 17918)
TestCustodian:testPreviewOrderNoActiveLoan() (gas: 105715)
TestCustodian:testPreviewOrderRepay() (gas: 230313)
TestCustodian:testPreviewOrderSettlement() (gas: 191957)
TestCustodian:testPreviewOrderSettlementInvalidFufliller() (gas: 108236)
TestCustodian:testPreviewOrderSettlementInvalidRepayer() (gas: 116987)
TestCustodian:testRatifyOrder() (gas: 184163)
TestCustodian:testPreviewOrderNoActiveLoan() (gas: 105759)
TestCustodian:testPreviewOrderRepay() (gas: 230291)
TestCustodian:testPreviewOrderSettlement() (gas: 191935)
TestCustodian:testPreviewOrderSettlementInvalidFufliller() (gas: 108280)
TestCustodian:testPreviewOrderSettlementInvalidRepayer() (gas: 117031)
TestCustodian:testRatifyOrder() (gas: 184097)
TestCustodian:testSeaportMetadata() (gas: 8666)
TestCustodian:testSupportsInterface() (gas: 9428)
TestCustodian:testSymbol() (gas: 7127)
Expand All @@ -71,82 +71,82 @@ TestLenderEnforcer:testLERevertInvalidLoanTerms() (gas: 81096)
TestLenderEnforcer:testLEValidLoanTerms() (gas: 72169)
TestLenderEnforcer:testLEValidLoanTermsAnyBorrower() (gas: 72323)
TestLenderEnforcer:testLEValidLoanTermsWithAdditionalTransfers() (gas: 73525)
TestLoanCombinations:testLoan20For721SimpleInterestDutchFixedRepay() (gas: 593093)
TestLoanCombinations:testLoan20for20SimpleInterestDutchFixedRepay() (gas: 600284)
TestLoanCombinations:testLoan721for20SimpleInterestDutchFixedRepay() (gas: 591600)
TestLoanCombinations:testLoanAstariaSettlementRepay() (gas: 581417)
TestNewLoan:testBuyNowPayLater() (gas: 2875036)
TestNewLoan:testInvalidSenderBNPL() (gas: 1613098)
TestNewLoan:testInvalidUserDataHashBNPL() (gas: 1615699)
TestNewLoan:testNewLoanAs1271ProxyAccountSender() (gas: 875005)
TestNewLoan:testNewLoanAs1271ProxyAccountThirdPartyFiller() (gas: 886270)
TestNewLoan:testNewLoanERC721CollateralDefaultTerms2() (gas: 430686)
TestNewLoan:testNewLoanRefinance() (gas: 591435)
TestNewLoan:testNewLoanViaOriginatorBorrowerApprovalAndLenderApproval() (gas: 325597)
TestNewLoan:testNewLoanViaOriginatorLenderApproval() (gas: 384928)
TestNewLoan:testSettleLoan() (gas: 642509)
TestLoanCombinations:testLoan20For721SimpleInterestDutchFixedRepay() (gas: 601541)
TestLoanCombinations:testLoan20for20SimpleInterestDutchFixedRepay() (gas: 608735)
TestLoanCombinations:testLoan721for20SimpleInterestDutchFixedRepay() (gas: 599998)
TestLoanCombinations:testLoanAstariaSettlementRepay() (gas: 589868)
TestNewLoan:testBuyNowPayLater() (gas: 3028328)
TestNewLoan:testInvalidSenderBNPL() (gas: 1759020)
TestNewLoan:testInvalidUserDataHashBNPL() (gas: 1761621)
TestNewLoan:testNewLoanAs1271ProxyAccountSender() (gas: 877948)
TestNewLoan:testNewLoanAs1271ProxyAccountThirdPartyFiller() (gas: 894378)
TestNewLoan:testNewLoanERC721CollateralDefaultTerms2() (gas: 439228)
TestNewLoan:testNewLoanRefinance() (gas: 609112)
TestNewLoan:testNewLoanViaOriginatorBorrowerApprovalAndLenderApproval() (gas: 334419)
TestNewLoan:testNewLoanViaOriginatorLenderApproval() (gas: 393605)
TestNewLoan:testSettleLoan() (gas: 651031)
TestPausableNonReentrant:testNotOwner() (gas: 21254)
TestPausableNonReentrant:testPauseAndUnpause() (gas: 22621)
TestPausableNonReentrant:testReentrancy() (gas: 15404)
TestPausableNonReentrant:testUnpauseWhenNotPaused() (gas: 12582)
TestRepayLoan:testRepayLoanApprovedRepayer() (gas: 664808)
TestRepayLoan:testRepayLoanBase() (gas: 601076)
TestRepayLoan:testRepayLoanGenerateOrderNotSeaport() (gas: 439828)
TestRepayLoan:testRepayLoanInSettlement() (gas: 586521)
TestRepayLoan:testRepayLoanInvalidRepayer() (gas: 605058)
TestRepayLoan:testRepayLoanThatDoesNotExist() (gas: 859963)
TestRepayLoan:testRepayLoanApprovedRepayer() (gas: 673314)
TestRepayLoan:testRepayLoanBase() (gas: 609538)
TestRepayLoan:testRepayLoanGenerateOrderNotSeaport() (gas: 448315)
TestRepayLoan:testRepayLoanInSettlement() (gas: 595181)
TestRepayLoan:testRepayLoanInvalidRepayer() (gas: 613671)
TestRepayLoan:testRepayLoanThatDoesNotExist() (gas: 868531)
TestSimpleInterestPricing:test_calculateInterest() (gas: 899536)
TestSimpleInterestPricing:test_getPaymentConsideration() (gas: 946746)
TestSimpleInterestPricing:test_getRefinanceConsideration() (gas: 937602)
TestStarport:testAcquireTokensFail() (gas: 60408)
TestStarport:testAcquireTokensSuccess() (gas: 162955)
TestStarport:testActive() (gas: 69269)
TestStarport:testAdditionalTransfers() (gas: 301324)
TestStarport:testAdditionalTransfersOriginate() (gas: 276042)
TestStarport:testAdditionalTransfersRefinance() (gas: 218188)
TestStarport:testApplyRefinanceConsiderationToLoanMalformed() (gas: 129424)
TestStarport:testCannotIssueSameLoanTwice() (gas: 365283)
TestStarport:testCannotOriginateWhilePaused() (gas: 73634)
TestStarport:testCannotSettleInvalidLoan() (gas: 74947)
TestStarport:testCannotSettleUnlessValidCustodian() (gas: 71029)
TestStarport:testCaveatEnforcerRevert() (gas: 100904)
TestStarport:testDefaultFeeRake() (gas: 362297)
TestStarport:testDefaultFeeRakeExoticDebt() (gas: 372382)
TestStarport:testEIP712Signing() (gas: 83333)
TestStarport:testExoticDebtWithCustomPricingAndRepayment() (gas: 1238418)
TestStarport:testExoticDebtWithCustomPricingAndSettlement() (gas: 1693377)
TestStarport:testExoticDebtWithNoCaveatsNotAsBorrower() (gas: 377444)
TestStarport:testIncrementCaveatNonce() (gas: 35142)
TestStarport:testInitializedFlagSetProperly() (gas: 67394)
TestStarport:testInvalidAdditionalTransfersOriginate() (gas: 230995)
TestStarport:testInvalidAdditionalTransfersRefinance() (gas: 170859)
TestStarport:testInvalidAmountCollateral() (gas: 166536)
TestStarport:testInvalidAmountCollateral721() (gas: 166536)
TestStarport:testInvalidItemType() (gas: 152484)
TestStarport:testInvalidTransferLengthCollateral() (gas: 154774)
TestStarport:testInvalidTransferLengthDebt() (gas: 176463)
TestStarport:testInvalidateCaveatSalt() (gas: 33428)
TestStarport:testNonDefaultCustodianCustodyCallFails() (gas: 264857)
TestStarport:testNonDefaultCustodianCustodyCallSuccess() (gas: 291004)
TestStarport:testNonPayableFunctions() (gas: 112517)
TestStarport:testOverrideFeeRake() (gas: 358680)
TestStarport:testPause() (gas: 18171)
TestStarport:testRefinancePostRepaymentFails() (gas: 127927)
TestStarport:testStargateGetOwner() (gas: 8895)
TestStarport:testTokenNoCodeCollateral() (gas: 151319)
TestStarport:testTokenNoCodeDebt() (gas: 181570)
TestStarport:testUnpause() (gas: 17209)
TestStrategistOriginator:testEncodeWithAccountCounter() (gas: 12307)
TestStrategistOriginator:testGetStrategistData() (gas: 1511582)
TestStarport:testAcquireTokensFail() (gas: 60430)
TestStarport:testAcquireTokensSuccess() (gas: 162977)
TestStarport:testActive() (gas: 69291)
TestStarport:testAdditionalTransfers() (gas: 309370)
TestStarport:testAdditionalTransfersOriginate() (gas: 284066)
TestStarport:testAdditionalTransfersRefinance() (gas: 226704)
TestStarport:testApplyRefinanceConsiderationToLoanMalformed() (gas: 129820)
TestStarport:testCannotIssueSameLoanTwice() (gas: 379383)
TestStarport:testCannotOriginateWhilePaused() (gas: 79481)
TestStarport:testCannotSettleInvalidLoan() (gas: 74881)
TestStarport:testCannotSettleUnlessValidCustodian() (gas: 70941)
TestStarport:testCaveatEnforcerRevert() (gas: 106536)
TestStarport:testDefaultFeeRake1() (gas: 397222)
TestStarport:testDefaultFeeRakeExoticDebt() (gas: 407043)
TestStarport:testEIP712Signing() (gas: 83377)
TestStarport:testExoticDebtWithCustomPricingAndRepayment() (gas: 1247118)
TestStarport:testExoticDebtWithCustomPricingAndSettlement() (gas: 1702068)
TestStarport:testExoticDebtWithNoCaveatsNotAsBorrower() (gas: 386146)
TestStarport:testIncrementCaveatNonce() (gas: 35316)
TestStarport:testInitializedFlagSetProperly() (gas: 67416)
TestStarport:testInvalidAdditionalTransfersOriginate() (gas: 236662)
TestStarport:testInvalidAdditionalTransfersRefinance() (gas: 177007)
TestStarport:testInvalidAmountCollateral() (gas: 172176)
TestStarport:testInvalidAmountCollateral721() (gas: 172176)
TestStarport:testInvalidItemType() (gas: 158123)
TestStarport:testInvalidTransferLengthCollateral() (gas: 160442)
TestStarport:testInvalidTransferLengthDebt() (gas: 182240)
TestStarport:testInvalidateCaveatSalt() (gas: 33417)
TestStarport:testNonDefaultCustodianCustodyCallFails() (gas: 270496)
TestStarport:testNonDefaultCustodianCustodyCallSuccess() (gas: 299027)
TestStarport:testNonPayableFunctions() (gas: 112909)
TestStarport:testOverrideFeeRake() (gas: 393462)
TestStarport:testPause() (gas: 18215)
TestStarport:testRefinancePostRepaymentFails() (gas: 133975)
TestStarport:testStargateGetOwner() (gas: 8808)
TestStarport:testTokenNoCodeCollateral() (gas: 156958)
TestStarport:testTokenNoCodeDebt() (gas: 187209)
TestStarport:testUnpause() (gas: 17297)
TestStrategistOriginator:testEncodeWithAccountCounter() (gas: 12305)
TestStrategistOriginator:testGetStrategistData() (gas: 1675537)
TestStrategistOriginator:testIncrementCounterAsStrategist() (gas: 18676)
TestStrategistOriginator:testIncrementCounterNotAuthorized() (gas: 13401)
TestStrategistOriginator:testInvalidCollateral() (gas: 210769)
TestStrategistOriginator:testInvalidDeadline() (gas: 216448)
TestStrategistOriginator:testInvalidDebt() (gas: 212429)
TestStrategistOriginator:testInvalidDebtAmountAskingMoreThanOffered() (gas: 212768)
TestStrategistOriginator:testInvalidDebtAmountOfferingZero() (gas: 213089)
TestStrategistOriginator:testInvalidDebtAmountRequestingZero() (gas: 213021)
TestStrategistOriginator:testInvalidDebtLength() (gas: 211696)
TestStrategistOriginator:testInvalidOffer() (gas: 427270)
TestStrategistOriginator:testInvalidSigner() (gas: 214875)
TestStrategistOriginator:testSetStrategist() (gas: 17774)
TestStrategistOriginator:testInvalidCollateral() (gas: 211212)
TestStrategistOriginator:testInvalidDeadline() (gas: 216963)
TestStrategistOriginator:testInvalidDebt() (gas: 212908)
TestStrategistOriginator:testInvalidDebtAmountAskingMoreThanOffered() (gas: 213259)
TestStrategistOriginator:testInvalidDebtAmountOfferingZero() (gas: 213592)
TestStrategistOriginator:testInvalidDebtAmountRequestingZero() (gas: 213524)
TestStrategistOriginator:testInvalidDebtLength() (gas: 212134)
TestStrategistOriginator:testInvalidOffer() (gas: 436509)
TestStrategistOriginator:testInvalidSigner() (gas: 215301)
TestStrategistOriginator:testSetStrategist() (gas: 17768)
Loading

0 comments on commit 741bea0

Please sign in to comment.