Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: Cache in _transferToAskRecipientAndCreatorIfAny #350

Merged
merged 1 commit into from
Jan 25, 2023
Merged

perf: Cache in _transferToAskRecipientAndCreatorIfAny #350

merged 1 commit into from
Jan 25, 2023

Conversation

0xhiroshi
Copy link
Collaborator

testTakerBidMultipleOrdersSignedERC721() (gas: -2 (-0.000%))
testTakerAskMultipleOrdersSignedERC721() (gas: -2 (-0.000%))
testTakerAskCollectionOrderWithMerkleTreeERC721() (gas: -2 (-0.000%))
testCannotExecuteAnotherOrderAtNonceIfExecutionIsInProgress(uint256) (gas: -2 (-0.000%))
testDutchAuction(uint256,uint256,uint256,uint256) (gas: -2 (-0.000%))
testTokenIdsRangeERC721(uint256,uint256) (gas: -2 (-0.000%))
testMultiFill() (gas: -4 (-0.000%))
testTakerBidERC721BundleNoRoyalties() (gas: -2 (-0.000%))
testTakerAskERC721BundleNoRoyalties() (gas: -2 (-0.000%))
testTakerBidERC1155BundleNoRoyalties() (gas: -2 (-0.000%))
testTakerBidERC721WithAffiliateButWithoutRoyalty() (gas: -2 (-0.000%))
testTakerAskERC721WithAffiliateButWithoutRoyalty() (gas: -2 (-0.000%))
testTakerAskERC1155BundleNoRoyalties() (gas: -2 (-0.000%))
testCannotExecuteMultipleTakerBidsIfDifferentCurrencies() (gas: -2 (-0.000%))
testTakerBidERC721WithAddressZeroSpecifiedAsRecipient(uint256) (gas: -2 (-0.000%))
testTakerAskCollectionOrderERC721(uint256) (gas: -2 (-0.000%))
testTakerAskERC721WithAddressZeroSpecifiedAsRecipient(uint256) (gas: -2 (-0.000%))
testCannotTransferIfNoManagerSelectorForAssetType() (gas: -2 (-0.000%))
testTakerAskCannotTransferSandboxWithERC721AssetTypeButERC1155AssetTypeWorks() (gas: -2 (-0.001%))
testFloorFromChainlinkPremiumBasisPointsDesiredSalePriceLessThanMinPrice() (gas: -2 (-0.001%))
testFloorFromChainlinkPremiumFixedAmountDesiredSalePriceEqualToMinPrice() (gas: -2 (-0.001%))
testFloorFromChainlinkPremiumFixedAmountDesiredSalePriceGreaterThanMinPrice() (gas: -2 (-0.001%))
testFloorFromChainlinkPremiumFixedAmountDesiredSalePriceLessThanMinPrice() (gas: -2 (-0.001%))
testFloorFromChainlinkPremiumBasisPointsDesiredSalePriceGreaterThanMinPrice() (gas: -2 (-0.001%))
testFloorFromChainlinkPremiumBasisPointsDesiredSalePriceEqualToMinPrice() (gas: -2 (-0.001%))
testFloorFromChainlinkDiscountBasisPointsDesiredDiscountedPriceGreaterThanOrEqualToMaxPrice() (gas: -2 (-0.001%))
testFloorFromChainlinkDiscountBasisPointsDesiredDiscountedPriceLessThanMaxPrice() (gas: -2 (-0.001%))
testFloorFromChainlinkDiscountFixedAmountDesiredDiscountedPriceGreaterThanOrEqualToMaxPrice() (gas: -2 (-0.001%))
testFloorFromChainlinkDiscountFixedAmountDesiredDiscountedPriceLessThanMaxPrice() (gas: -2 (-0.001%))
testUSDDynamicAskBidderOverpaid() (gas: -2 (-0.001%))
testThreeTakerBidsERC721() (gas: -6 (-0.001%))
testUSDDynamicAskUSDValueLessThanMinAcceptedEthValue() (gas: -2 (-0.001%))
testUSDDynamicAskUSDValueLessThanOneETH() (gas: -2 (-0.001%))
testUSDDynamicAskUSDValueGreaterThanOrEqualToMinAcceptedEthValue() (gas: -2 (-0.001%))
testMultipleTakerBidsERC721WithAffiliateButWithoutRoyalty() (gas: -16 (-0.001%))
testTakerBidCannotTransferSandboxWithERC721AssetTypeButERC1155AssetTypeWorks() (gas: -4 (-0.001%))
testThreeTakerBidsERC721OneFails() (gas: -12 (-0.001%))
testBatchTakerAsk() (gas: -15 (-0.001%))
testThreeTakerBidsGasGriefing() (gas: -6 (-0.001%))
testCreatorRoyaltiesGetPaidForERC2981WithBundles() (gas: -19 (-0.002%))
testTakerBid() (gas: -19 (-0.002%))
testCreatorRoyaltiesGetPaidForERC2981WithBundles() (gas: -19 (-0.002%))
testTakerAsk() (gas: -19 (-0.002%))
testTakerBid() (gas: -19 (-0.002%))
testTakerAsk() (gas: -19 (-0.002%))
testTakerBidERC721BundleWithRoyaltiesFromRegistry() (gas: -19 (-0.002%))
testCreatorRebatesArePaidForRoyaltyFeeManagerWithBundles() (gas: -19 (-0.002%))
testTakerAskERC721BundleWithRoyaltiesFromRegistry() (gas: -19 (-0.002%))
testCreatorRoyaltiesGetPaidForRoyaltyFeeManagerWithBundles() (gas: -19 (-0.002%))
testTokenIdsRangeERC1155(uint256,uint256) (gas: 29 (0.003%))
testTakerAskERC721WithRoyaltiesFromRegistryWithDelegation() (gas: -19 (-0.003%))
testTakerBidERC721WithRoyaltiesFromRegistry(uint256) (gas: -19 (-0.003%))
testTakerBidERC721WithRoyaltiesFromRegistryWithDelegation() (gas: -19 (-0.003%))
testCannotExecuteAnOrderTwice() (gas: -19 (-0.003%))
testCreatorRebatesArePaidForRoyaltyFeeManager() (gas: -19 (-0.003%))
testCreatorRoyaltiesGetPaidForRoyaltyFeeManager() (gas: -19 (-0.003%))
testCreatorRebatesArePaidForERC2981() (gas: -19 (-0.003%))
testCreatorRoyaltiesGetPaidForERC2981() (gas: -19 (-0.003%))
testStartPriceTooLow(uint256,uint256,uint256,uint256) (gas: 40 (0.003%))
testExecuteMultipleTakerBidsOnERC1155ReceivedReentrancyOnlyInTheLastCall() (gas: -57 (-0.004%))
testExecuteMultipleTakerBids() (gas: -57 (-0.005%))
testExecuteMultipleTakerBids() (gas: -57 (-0.005%))
testTakerBidGasGriefing() (gas: -19 (-0.006%))
testTakerAskERC721WithRoyaltiesFromRegistry(uint256) (gas: -59 (-0.009%))
testCannotValidateOrderIfTooEarlyToExecute(uint256) (gas: 40 (0.032%))
testCannotValidateOrderIfTooLateToExecute(uint256) (gas: -40 (-0.032%))
testCannotValidateOrderIfMakerAskItemIdsLengthMismatch(uint256) (gas: 16931 (0.410%))
testCannotValidateOrderIfMakerBidItemIdsLengthMismatch(uint256) (gas: 16931 (0.411%))
Overall gas change: 33213 (0.734%)

On the surface it looks like gas increased, but it is coming from a length mismatch test with fuzzing turned on. Length mismatch isn't really a real scenario and if we take out the fuzzing then the gas change will be negative.

@0xhiroshi 0xhiroshi merged commit b836bc8 into LooksRare:master Jan 25, 2023
@0xhiroshi 0xhiroshi deleted the perf/cache-in-transfer-to-ask-recipient-and-creator-if-any branch January 25, 2023 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants