Skip to content

Commit

Permalink
feat(billboard): revise auction functions
Browse files Browse the repository at this point in the history
  • Loading branch information
robertu7 committed Jun 30, 2024
1 parent d01b9e9 commit 4bed635
Show file tree
Hide file tree
Showing 7 changed files with 1,321 additions and 1,283 deletions.
66 changes: 9 additions & 57 deletions .gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,6 @@ ACLManagerTest:testGrantRole() (gas: 23547)
ACLManagerTest:testRenounceRole() (gas: 27841)
ACLManagerTest:testRoles() (gas: 15393)
ACLManagerTest:testTransferRole() (gas: 21528)
BillboardTest:testAddToWhitelist() (gas: 35114)
BillboardTest:testApproveAndTransfer() (gas: 162468)
BillboardTest:testCalculateTax() (gas: 21760)
BillboardTest:testCannnotWithdrawTaxIfSmallAmount(uint8) (runs: 256, μ: 521197, ~: 524563)
BillboardTest:testCannnotWithdrawTaxIfZero() (gas: 490384)
BillboardTest:testCannotAddToWhitelistByAttacker() (gas: 9037)
BillboardTest:testCannotApproveByAttacker() (gas: 130281)
BillboardTest:testCannotClearAuctionIfAuctionNotEnded() (gas: 700985)
BillboardTest:testCannotClearAuctionOnNewBoard() (gas: 136261)
BillboardTest:testCannotMintBoardByAttacker() (gas: 13321)
BillboardTest:testCannotPlaceBidByAttacker() (gas: 246293)
BillboardTest:testCannotPlaceBidTwice(uint96) (runs: 256, μ: 748745, ~: 754899)
BillboardTest:testCannotRemoveToWhitelistByAttacker() (gas: 9104)
BillboardTest:testCannotSafeTransferByAttacker() (gas: 127438)
BillboardTest:testCannotSetBoardProprtiesByAttacker() (gas: 157292)
BillboardTest:testCannotSetIsOpenedByAttacker() (gas: 8994)
BillboardTest:testCannotSetTaxRateByAttacker() (gas: 9006)
BillboardTest:testCannotTransferByOperator() (gas: 132771)
BillboardTest:testCannotTransferToZeroAddress() (gas: 128258)
BillboardTest:testCannotUpgradeRegistryByAttacker() (gas: 9128)
BillboardTest:testCannotWithBidTwice(uint96) (runs: 256, μ: 1079907, ~: 1079907)
BillboardTest:testCannotWithdrawBidIfAuctionNotCleared(uint96) (runs: 256, μ: 911089, ~: 911089)
BillboardTest:testCannotWithdrawBidIfAuctionNotEnded(uint96) (runs: 256, μ: 725782, ~: 725782)
BillboardTest:testCannotWithdrawBidIfNotFound() (gas: 428052)
BillboardTest:testCannotWithdrawBidIfWon(uint96) (runs: 256, μ: 834282, ~: 834282)
BillboardTest:testCannotWithdrawTaxByAttacker() (gas: 16687)
BillboardTest:testClearAuctionIfAuctionEnded(uint96) (runs: 256, μ: 837581, ~: 837581)
BillboardTest:testClearAuctionsIfAuctionEnded() (gas: 1379962)
BillboardTest:testGetBids(uint8,uint8,uint8) (runs: 256, μ: 4728587, ~: 2077366)
BillboardTest:testGetTokenURI() (gas: 154936)
BillboardTest:testMintBoard() (gas: 225541)
BillboardTest:testMintBoardByWhitelist() (gas: 154942)
BillboardTest:testMintBoardIfOpened() (gas: 145715)
BillboardTest:testPlaceBidByWhitelist() (gas: 579179)
BillboardTest:testPlaceBidIfAuctionEnded() (gas: 1090700)
BillboardTest:testPlaceBidOnNewBoard(uint96) (runs: 256, μ: 615079, ~: 635089)
BillboardTest:testPlaceBidWithHigherPrice(uint96) (runs: 256, μ: 903459, ~: 913254)
BillboardTest:testPlaceBidWithSamePrices(uint96) (runs: 256, μ: 905690, ~: 918050)
BillboardTest:testPlaceBidZeroPrice() (gas: 376947)
BillboardTest:testRemoveToWhitelist() (gas: 23188)
BillboardTest:testSafeTransferByOperator() (gas: 141193)
BillboardTest:testSetBoardProperties() (gas: 305972)
BillboardTest:testSetBoardPropertiesAfterTransfer() (gas: 335477)
BillboardTest:testSetIsOpened() (gas: 22661)
BillboardTest:testSetTaxRate() (gas: 22887)
BillboardTest:testUpgradeRegistry() (gas: 3132722)
BillboardTest:testWithdrawBid(uint96) (runs: 256, μ: 1081415, ~: 1081415)
BillboardTest:testWithdrawTax(uint96) (runs: 256, μ: 597714, ~: 597714)
CurationTest:testCannotCurateERC20CurateZeroAmount() (gas: 12194)
CurationTest:testCannotCurateERC20EmptyURI() (gas: 15797)
CurationTest:testCannotCurateERC20IfNotApproval() (gas: 21624)
Expand All @@ -74,8 +26,8 @@ DistributionTest:testCannotClaimIfAlreadyClaimed() (gas: 284835)
DistributionTest:testCannotClaimIfInsufficientBalance() (gas: 394264)
DistributionTest:testCannotClaimIfInvalidProof() (gas: 245236)
DistributionTest:testCannotClaimIfInvalidTreeId() (gas: 243332)
DistributionTest:testCannotDropIfInsufficientAllowance(uint256) (runs: 256, μ: 212266, ~: 212285)
DistributionTest:testCannotDropIfInsufficientBalance(uint256) (runs: 256, μ: 214503, ~: 214742)
DistributionTest:testCannotDropIfInsufficientAllowance(uint256) (runs: 256, μ: 212265, ~: 212278)
DistributionTest:testCannotDropIfInsufficientBalance(uint256) (runs: 256, μ: 214502, ~: 214742)
DistributionTest:testCannotDropIfZeroAmount() (gas: 148793)
DistributionTest:testCannotDropTwiceWithSameTreeId() (gas: 307260)
DistributionTest:testCannotSetAdminByAdmin() (gas: 17334)
Expand All @@ -86,13 +38,13 @@ DistributionTest:testClaim() (gas: 414576)
DistributionTest:testDrop() (gas: 568791)
DistributionTest:testSetAdmin() (gas: 20239)
DistributionTest:testSweep() (gas: 253087)
LogbookNFTSVGTest:testTokenURI(uint8,uint8,uint16) (runs: 256, μ: 2021610, ~: 1310779)
LogbookNFTSVGTest:testTokenURI(uint8,uint8,uint16) (runs: 256, μ: 2019505, ~: 1310779)
LogbookTest:testClaim() (gas: 135608)
LogbookTest:testDonate(uint96) (runs: 256, μ: 155485, ~: 156936)
LogbookTest:testDonateWithCommission(uint96,uint96) (runs: 256, μ: 150646, ~: 140444)
LogbookTest:testFork(uint96,string) (runs: 256, μ: 450121, ~: 453928)
LogbookTest:testForkRecursively(uint8,uint96) (runs: 256, μ: 4402585, ~: 1014389)
LogbookTest:testForkWithCommission(uint96,string,uint256) (runs: 256, μ: 485550, ~: 257636)
LogbookTest:testDonateWithCommission(uint96,uint96) (runs: 256, μ: 150402, ~: 140444)
LogbookTest:testFork(uint96,string) (runs: 256, μ: 450748, ~: 453928)
LogbookTest:testForkRecursively(uint8,uint96) (runs: 256, μ: 4613856, ~: 1014389)
LogbookTest:testForkWithCommission(uint96,string,uint256) (runs: 256, μ: 469806, ~: 257636)
LogbookTest:testMulticall() (gas: 284999)
LogbookTest:testPublicSale() (gas: 204837)
LogbookTest:testPublish(string) (runs: 256, μ: 264065, ~: 263590)
Expand All @@ -114,7 +66,7 @@ LogbookTest:testPublishZh5000() (gas: 607690)
LogbookTest:testSetDescription() (gas: 140760)
LogbookTest:testSetForkPrice() (gas: 153925)
LogbookTest:testSetTitle() (gas: 168680)
LogbookTest:testSplitRoyalty(uint8,uint8,uint96) (runs: 256, μ: 2005914, ~: 801064)
LogbookTest:testSplitRoyalty(uint8,uint8,uint96) (runs: 256, μ: 2012966, ~: 636792)
LogbookTest:testWithdraw() (gas: 7284400)
SnapperTest:testCannotInitRegionByNotOwner() (gas: 11365)
SnapperTest:testCannotReInitRegion() (gas: 14373)
Expand All @@ -125,7 +77,7 @@ SnapperTest:testCannotTakeSnapshotWrongSnapshotBlock() (gas: 23899)
SnapperTest:testInitRegion(uint256) (runs: 256, μ: 114408, ~: 114408)
SnapperTest:testTakeSnapshot() (gas: 47831)
TheSpaceTest:testBatchBid() (gas: 690308)
TheSpaceTest:testBatchSetPixels(uint16,uint8) (runs: 256, μ: 368737, ~: 370338)
TheSpaceTest:testBatchSetPixels(uint16,uint8) (runs: 256, μ: 368699, ~: 370338)
TheSpaceTest:testBidDefaultedToken() (gas: 409416)
TheSpaceTest:testBidExistingToken() (gas: 355023)
TheSpaceTest:testBidNewToken() (gas: 301184)
Expand Down
Loading

0 comments on commit 4bed635

Please sign in to comment.