Skip to content

Commit

Permalink
♻️ Make burned pool a queue (Vectorized#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vectorized authored Feb 18, 2024
1 parent c9a135a commit f8209d4
Show file tree
Hide file tree
Showing 2 changed files with 170 additions and 157 deletions.
202 changes: 101 additions & 101 deletions .gas-snapshot
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
BaseInvariantTest:invariantDN404BalanceSum() (runs: 30, calls: 450, reverts: 0)
BaseInvariantTest:invariantMirror721BalanceSum() (runs: 30, calls: 450, reverts: 0)
BaseInvariantTest:invariantReflectionIsValid() (runs: 30, calls: 450, reverts: 0)
BenchTest:testMintAndTransferDN404_01() (gas: 236539)
BenchTest:testMintAndTransferDN404_02() (gas: 246184)
BenchTest:testMintAndTransferDN404_03() (gas: 277690)
BenchTest:testMintAndTransferDN404_04() (gas: 267438)
BenchTest:testMintAndTransferDN404_05() (gas: 298964)
BenchTest:testMintAndTransferDN404_06() (gas: 308569)
BenchTest:testMintAndTransferDN404_07() (gas: 340086)
BenchTest:testMintAndTransferDN404_08() (gas: 329844)
BenchTest:testMintAndTransferDN404_09() (gas: 405126)
BenchTest:testMintAndTransferDN404_10() (gas: 414731)
BenchTest:testMintAndTransferDN404_11() (gas: 446279)
BenchTest:testMintAndTransferDN404_12() (gas: 436049)
BenchTest:testMintAndTransferDN404_13() (gas: 467531)
BenchTest:testMintAndTransferDN404_14() (gas: 477157)
BenchTest:testMintAndTransferDN404_15() (gas: 508664)
BenchTest:testMintAndTransferDN404_16() (gas: 498433)
BenchTest:testMintAndTransferDN404_01() (gas: 236943)
BenchTest:testMintAndTransferDN404_02() (gas: 246751)
BenchTest:testMintAndTransferDN404_03() (gas: 278419)
BenchTest:testMintAndTransferDN404_04() (gas: 268330)
BenchTest:testMintAndTransferDN404_05() (gas: 300020)
BenchTest:testMintAndTransferDN404_06() (gas: 309787)
BenchTest:testMintAndTransferDN404_07() (gas: 341467)
BenchTest:testMintAndTransferDN404_08() (gas: 331387)
BenchTest:testMintAndTransferDN404_09() (gas: 406833)
BenchTest:testMintAndTransferDN404_10() (gas: 416602)
BenchTest:testMintAndTransferDN404_11() (gas: 448313)
BenchTest:testMintAndTransferDN404_12() (gas: 438246)
BenchTest:testMintAndTransferDN404_13() (gas: 469891)
BenchTest:testMintAndTransferDN404_14() (gas: 479680)
BenchTest:testMintAndTransferDN404_15() (gas: 511349)
BenchTest:testMintAndTransferDN404_16() (gas: 501281)
BenchTest:testMintAndTransferPandora_01() (gas: 190491)
BenchTest:testMintAndTransferPandora_02() (gas: 306372)
BenchTest:testMintAndTransferPandora_03() (gas: 422256)
Expand All @@ -33,22 +33,22 @@ BenchTest:testMintAndTransferPandora_13() (gas: 1581274)
BenchTest:testMintAndTransferPandora_14() (gas: 1697190)
BenchTest:testMintAndTransferPandora_15() (gas: 1813056)
BenchTest:testMintAndTransferPandora_16() (gas: 1929009)
BenchTest:testMintDN404_01() (gas: 145462)
BenchTest:testMintDN404_02() (gas: 148748)
BenchTest:testMintDN404_03() (gas: 151994)
BenchTest:testMintDN404_04() (gas: 155327)
BenchTest:testMintDN404_05() (gas: 180514)
BenchTest:testMintDN404_06() (gas: 183739)
BenchTest:testMintDN404_07() (gas: 187095)
BenchTest:testMintDN404_08() (gas: 190339)
BenchTest:testMintDN404_09() (gas: 237450)
BenchTest:testMintDN404_10() (gas: 240719)
BenchTest:testMintDN404_11() (gas: 244006)
BenchTest:testMintDN404_12() (gas: 247296)
BenchTest:testMintDN404_13() (gas: 272485)
BenchTest:testMintDN404_14() (gas: 275752)
BenchTest:testMintDN404_15() (gas: 279083)
BenchTest:testMintDN404_16() (gas: 282351)
BenchTest:testMintDN404_01() (gas: 145636)
BenchTest:testMintDN404_02() (gas: 148999)
BenchTest:testMintDN404_03() (gas: 152322)
BenchTest:testMintDN404_04() (gas: 155732)
BenchTest:testMintDN404_05() (gas: 180996)
BenchTest:testMintDN404_06() (gas: 184297)
BenchTest:testMintDN404_07() (gas: 187730)
BenchTest:testMintDN404_08() (gas: 191051)
BenchTest:testMintDN404_09() (gas: 238239)
BenchTest:testMintDN404_10() (gas: 241586)
BenchTest:testMintDN404_11() (gas: 244950)
BenchTest:testMintDN404_12() (gas: 248317)
BenchTest:testMintDN404_13() (gas: 273583)
BenchTest:testMintDN404_14() (gas: 276927)
BenchTest:testMintDN404_15() (gas: 280334)
BenchTest:testMintDN404_16() (gas: 283679)
BenchTest:testMintPandora_01() (gas: 133912)
BenchTest:testMintPandora_02() (gas: 203416)
BenchTest:testMintPandora_03() (gas: 272897)
Expand All @@ -65,74 +65,74 @@ BenchTest:testMintPandora_13() (gas: 967960)
BenchTest:testMintPandora_14() (gas: 1037484)
BenchTest:testMintPandora_15() (gas: 1106967)
BenchTest:testMintPandora_16() (gas: 1176473)
BenchTest:test__codesize() (gas: 31656)
BenchTest:test__codesize() (gas: 31942)
DN404CustomUnitTest:testInitializeWithZeroUnitReverts() (gas: 85799)
DN404CustomUnitTest:testMint() (gas: 162935)
DN404CustomUnitTest:testMintWithoutNFTs(uint256,uint256,uint256) (runs: 256, μ: 155059, ~: 162417)
DN404CustomUnitTest:testNFTMint() (gas: 58182609)
DN404CustomUnitTest:testNFTMintAndBurn(uint256,uint256,uint256) (runs: 256, μ: 210060, ~: 161246)
DN404CustomUnitTest:testNFTMintViaTransfer(uint256,uint256,uint256) (runs: 256, μ: 229350, ~: 261587)
DN404CustomUnitTest:testMint() (gas: 162987)
DN404CustomUnitTest:testMintWithoutNFTs(uint256,uint256,uint256) (runs: 256, μ: 155176, ~: 162922)
DN404CustomUnitTest:testNFTMint() (gas: 58412715)
DN404CustomUnitTest:testNFTMintAndBurn(uint256,uint256,uint256) (runs: 256, μ: 207504, ~: 161754)
DN404CustomUnitTest:testNFTMintViaTransfer(uint256,uint256,uint256) (runs: 256, μ: 229226, ~: 261983)
DN404CustomUnitTest:testTotalSupplyOverflowsTrick(uint256,uint256,uint256) (runs: 256, μ: 1055, ~: 1147)
DN404CustomUnitTest:test__codesize() (gas: 25390)
DN404MirrorTest:testBaseERC20() (gas: 114610)
DN404CustomUnitTest:test__codesize() (gas: 25625)
DN404MirrorTest:testBaseERC20() (gas: 114654)
DN404MirrorTest:testFnSelectorNotRecognized() (gas: 6964)
DN404MirrorTest:testLinkMirrorContract() (gas: 45840)
DN404MirrorTest:testLogTransfer() (gas: 120636)
DN404MirrorTest:testNameAndSymbol(string,string) (runs: 256, μ: 207755, ~: 208098)
DN404MirrorTest:testLogTransfer() (gas: 120680)
DN404MirrorTest:testNameAndSymbol(string,string) (runs: 256, μ: 207799, ~: 208142)
DN404MirrorTest:testNotLinked() (gas: 12744)
DN404MirrorTest:testPullOwner() (gas: 112493)
DN404MirrorTest:testPullOwnerWithOwnable() (gas: 2793617)
DN404MirrorTest:testSafeTransferFrom(uint32) (runs: 256, μ: 487750, ~: 487744)
DN404MirrorTest:testSetAndGetApprovalForAll() (gas: 345307)
DN404MirrorTest:testSetAndGetApproved() (gas: 341982)
DN404MirrorTest:testPullOwner() (gas: 112537)
DN404MirrorTest:testPullOwnerWithOwnable() (gas: 2850998)
DN404MirrorTest:testSafeTransferFrom(uint32) (runs: 256, μ: 488348, ~: 488340)
DN404MirrorTest:testSetAndGetApprovalForAll() (gas: 345560)
DN404MirrorTest:testSetAndGetApproved() (gas: 342235)
DN404MirrorTest:testSupportsInterface() (gas: 7544)
DN404MirrorTest:testTokenURI(string,uint256) (runs: 256, μ: 158135, ~: 135834)
DN404MirrorTest:testTransferFrom(uint32) (runs: 256, μ: 391678, ~: 391670)
DN404MirrorTest:testTransferFromMixed(uint256) (runs: 256, μ: 696232, ~: 617183)
DN404MirrorTest:test__codesize() (gas: 51713)
DN404MirrorTest:testTokenURI(string,uint256) (runs: 256, μ: 158179, ~: 135878)
DN404MirrorTest:testTransferFrom(uint32) (runs: 256, μ: 392234, ~: 392231)
DN404MirrorTest:testTransferFromMixed(uint256) (runs: 256, μ: 678686, ~: 618788)
DN404MirrorTest:test__codesize() (gas: 52289)
DN404OnlyERC20Test:testApprove() (gas: 35803)
DN404OnlyERC20Test:testApprove(address,uint256) (runs: 256, μ: 30110, ~: 31354)
DN404OnlyERC20Test:testBurn() (gas: 49471)
DN404OnlyERC20Test:testBurn(address,uint256,uint256) (runs: 256, μ: 50544, ~: 50672)
DN404OnlyERC20Test:testBurnInsufficientBalanceReverts(address,uint256,uint256) (runs: 256, μ: 43669, ~: 43760)
DN404OnlyERC20Test:testInfiniteApproveTransferFrom() (gas: 102307)
DN404OnlyERC20Test:testBurn() (gas: 49688)
DN404OnlyERC20Test:testBurn(address,uint256,uint256) (runs: 256, μ: 50933, ~: 50889)
DN404OnlyERC20Test:testBurnInsufficientBalanceReverts(address,uint256,uint256) (runs: 256, μ: 44017, ~: 43991)
DN404OnlyERC20Test:testInfiniteApproveTransferFrom() (gas: 102649)
DN404OnlyERC20Test:testMaxSupplyTrick(uint256) (runs: 256, μ: 541, ~: 541)
DN404OnlyERC20Test:testMetadata() (gas: 10111)
DN404OnlyERC20Test:testMint() (gas: 45185)
DN404OnlyERC20Test:testMintOverMaxLimitReverts() (gas: 40582)
DN404OnlyERC20Test:testMintz(address,uint256) (runs: 256, μ: 45500, ~: 45607)
DN404OnlyERC20Test:testTransfer() (gas: 75003)
DN404OnlyERC20Test:testTransfer(address,uint256) (runs: 256, μ: 75426, ~: 75460)
DN404OnlyERC20Test:testTransferFrom() (gas: 84765)
DN404OnlyERC20Test:testTransferFrom(address,address,address,uint256,uint256) (runs: 256, μ: 105428, ~: 107734)
DN404OnlyERC20Test:testTransferFromInsufficientAllowanceReverts() (gas: 67890)
DN404OnlyERC20Test:testTransferFromInsufficientAllowanceReverts(address,uint256,uint256) (runs: 256, μ: 68505, ~: 69000)
DN404OnlyERC20Test:testTransferFromInsufficientBalanceReverts() (gas: 74807)
DN404OnlyERC20Test:testTransferFromInsufficientBalanceReverts(address,uint256,uint256) (runs: 256, μ: 75848, ~: 75928)
DN404OnlyERC20Test:testTransferInsufficientBalanceReverts() (gas: 66284)
DN404OnlyERC20Test:testTransferInsufficientBalanceReverts(address,uint256,uint256) (runs: 256, μ: 67405, ~: 67380)
DN404OnlyERC20Test:test__codesize() (gas: 30146)
DN404Test:testBatchNFTLog() (gas: 295591)
DN404Test:testBurnOnTransfer(uint32,address) (runs: 256, μ: 278110, ~: 278108)
DN404OnlyERC20Test:testMint() (gas: 45413)
DN404OnlyERC20Test:testMintOverMaxLimitReverts() (gas: 41243)
DN404OnlyERC20Test:testMintz(address,uint256) (runs: 256, μ: 45706, ~: 45835)
DN404OnlyERC20Test:testTransfer() (gas: 75345)
DN404OnlyERC20Test:testTransfer(address,uint256) (runs: 256, μ: 75702, ~: 75802)
DN404OnlyERC20Test:testTransferFrom() (gas: 85107)
DN404OnlyERC20Test:testTransferFrom(address,address,address,uint256,uint256) (runs: 256, μ: 106049, ~: 108076)
DN404OnlyERC20Test:testTransferFromInsufficientAllowanceReverts() (gas: 68118)
DN404OnlyERC20Test:testTransferFromInsufficientAllowanceReverts(address,uint256,uint256) (runs: 256, μ: 68633, ~: 69219)
DN404OnlyERC20Test:testTransferFromInsufficientBalanceReverts() (gas: 75139)
DN404OnlyERC20Test:testTransferFromInsufficientBalanceReverts(address,uint256,uint256) (runs: 256, μ: 76216, ~: 76269)
DN404OnlyERC20Test:testTransferInsufficientBalanceReverts() (gas: 66616)
DN404OnlyERC20Test:testTransferInsufficientBalanceReverts(address,uint256,uint256) (runs: 256, μ: 67833, ~: 67712)
DN404OnlyERC20Test:test__codesize() (gas: 30374)
DN404Test:testBatchNFTLog() (gas: 296333)
DN404Test:testBurnOnTransfer(uint32,address) (runs: 256, μ: 278275, ~: 278264)
DN404Test:testFnSelectorNotRecognized() (gas: 6973)
DN404Test:testInitialize(uint32,address) (runs: 256, μ: 113131, ~: 116685)
DN404Test:testMintAndBurn() (gas: 351918)
DN404Test:testMintAndBurn2() (gas: 299808)
DN404Test:testMintOnTransfer(uint32,address) (runs: 256, μ: 308419, ~: 308429)
DN404Test:testMixed(uint256) (runs: 256, μ: 770825, ~: 636505)
DN404Test:testNameAndSymbol(string,string) (runs: 256, μ: 207450, ~: 207791)
DN404Test:testNumAliasesOverflowReverts() (gas: 57320)
DN404Test:testOwnedIds() (gas: 372016)
DN404Test:testOwnedIds(uint256) (runs: 256, μ: 291918, ~: 299837)
DN404Test:testPermit2() (gas: 459009)
DN404Test:testRegisterAndResolveAlias(address,address) (runs: 256, μ: 126335, ~: 126510)
DN404Test:testSetAndGetAux(address,uint88) (runs: 256, μ: 21914, ~: 22256)
DN404Test:testSetAndGetOperatorApprovals(address,address,bool) (runs: 256, μ: 129603, ~: 120664)
DN404Test:testSetAndGetSkipNFT() (gas: 719817)
DN404Test:testTokenURI(string,uint256) (runs: 256, μ: 158023, ~: 135722)
DN404Test:testTransfersAndBurns() (gas: 487718)
DN404Test:testWrapAround(uint32,uint256) (runs: 256, μ: 373406, ~: 368304)
DN404Test:test__codesize() (gas: 51165)
DN404Test:testInitialize(uint32,address) (runs: 256, μ: 112745, ~: 116729)
DN404Test:testMintAndBurn() (gas: 352905)
DN404Test:testMintAndBurn2() (gas: 300463)
DN404Test:testMintOnTransfer(uint32,address) (runs: 256, μ: 308647, ~: 308647)
DN404Test:testMixed(uint256) (runs: 256, μ: 799189, ~: 675950)
DN404Test:testNameAndSymbol(string,string) (runs: 256, μ: 207494, ~: 207835)
DN404Test:testNumAliasesOverflowReverts() (gas: 57348)
DN404Test:testOwnedIds() (gas: 372542)
DN404Test:testOwnedIds(uint256) (runs: 256, μ: 294155, ~: 301533)
DN404Test:testPermit2() (gas: 459784)
DN404Test:testRegisterAndResolveAlias(address,address) (runs: 256, μ: 126560, ~: 126580)
DN404Test:testSetAndGetAux(address,uint88) (runs: 256, μ: 21984, ~: 22256)
DN404Test:testSetAndGetOperatorApprovals(address,address,bool) (runs: 256, μ: 129647, ~: 120708)
DN404Test:testSetAndGetSkipNFT() (gas: 720227)
DN404Test:testTokenURI(string,uint256) (runs: 256, μ: 158067, ~: 135766)
DN404Test:testTransfersAndBurns() (gas: 488837)
DN404Test:testWrapAround(uint32,uint256) (runs: 256, μ: 373349, ~: 369070)
DN404Test:test__codesize() (gas: 51451)
MappingsTest:testAddressPairMapSetAndGet(address[2],address[2],uint256,uint256) (runs: 256, μ: 45686, ~: 47008)
MappingsTest:testBitmapSetAndGet(uint256) (runs: 256, μ: 492795, ~: 520202)
MappingsTest:testBitmapSetAndGet(uint256,uint256,bool,bool) (runs: 256, μ: 25694, ~: 26292)
Expand All @@ -142,21 +142,21 @@ MappingsTest:testSetOwnerAliasAndOwnedIndex(uint256,uint32,uint32) (runs: 256,
MappingsTest:testUint32MapSetAndGet(uint256) (runs: 256, μ: 1389646, ~: 1595679)
MappingsTest:testUint32MapSetAndGet(uint256,uint256,uint32,uint32) (runs: 256, μ: 42985, ~: 46221)
MappingsTest:test__codesize() (gas: 7088)
MintTests:test_WhenAmountIsGreaterThan_MAX_SUPPLYOrMintMakesNFTTotalSupplyExceed_MAX_SUPPLY(uint256) (runs: 256, μ: 61968, ~: 62099)
MintTests:test_WhenRecipientAddressHasSkipNFTEnabled(uint256) (runs: 256, μ: 86273, ~: 86271)
MintTests:test_WhenRecipientIsAddress0(uint256) (runs: 256, μ: 31085, ~: 31147)
MintTests:test_WhenRecipientsBalanceDifferenceIsNotUpTo1e18(uint256) (runs: 256, μ: 83206, ~: 83296)
MintTests:test_WhenRecipientsBalanceDifferenceIsUpTo1e18OrAbove(uint256) (runs: 256, μ: 89730, ~: 89813)
MintTests:test__codesize() (gas: 24230)
NFTMintDN404Test:testAllowlistMint() (gas: 256794)
NFTMintDN404Test:testMint() (gas: 230834)
NFTMintDN404Test:testTotalSupplyReached() (gas: 627161878)
NFTMintDN404Test:test__codesize() (gas: 26127)
SimpleDN404Test:testMint() (gas: 45163)
MintTests:test_WhenAmountIsGreaterThan_MAX_SUPPLYOrMintMakesNFTTotalSupplyExceed_MAX_SUPPLY(uint256) (runs: 256, μ: 62347, ~: 62587)
MintTests:test_WhenRecipientAddressHasSkipNFTEnabled(uint256) (runs: 256, μ: 86529, ~: 86543)
MintTests:test_WhenRecipientIsAddress0(uint256) (runs: 256, μ: 31081, ~: 31139)
MintTests:test_WhenRecipientsBalanceDifferenceIsNotUpTo1e18(uint256) (runs: 256, μ: 83483, ~: 83577)
MintTests:test_WhenRecipientsBalanceDifferenceIsUpTo1e18OrAbove(uint256) (runs: 256, μ: 90029, ~: 90094)
MintTests:test__codesize() (gas: 24516)
NFTMintDN404Test:testAllowlistMint() (gas: 257319)
NFTMintDN404Test:testMint() (gas: 231635)
NFTMintDN404Test:testTotalSupplyReached() (gas: 628866878)
NFTMintDN404Test:test__codesize() (gas: 26388)
SimpleDN404Test:testMint() (gas: 45419)
SimpleDN404Test:testName() (gas: 9674)
SimpleDN404Test:testSetBaseURI() (gas: 38574)
SimpleDN404Test:testSymbol() (gas: 9716)
SimpleDN404Test:testWithdraw() (gas: 18277)
SimpleDN404Test:test__codesize() (gas: 19686)
SimpleDN404Test:test__codesize() (gas: 19952)
SoladyTest:test__codesize() (gas: 1102)
TestPlus:test__codesize() (gas: 406)
Loading

0 comments on commit f8209d4

Please sign in to comment.