Skip to content

Commit

Permalink
feat(billboard): remove unused "payable"
Browse files Browse the repository at this point in the history
  • Loading branch information
robertu7 committed Aug 15, 2024
1 parent 21a13cb commit 36926d8
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 42 deletions.
76 changes: 38 additions & 38 deletions .gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ BillboardTest:testCannotClearAuctionIfClosed() (gas: 252825)
BillboardTest:testCannotClearAuctionIfNoBid() (gas: 260776)
BillboardTest:testCannotGetBlockFromEpoch() (gas: 8600)
BillboardTest:testCannotGetEpochFromBlock() (gas: 18393)
BillboardTest:testCannotPlaceBidIfAuctionEnded() (gas: 282918)
BillboardTest:testCannotPlaceBidIfClosed() (gas: 252721)
BillboardTest:testCannotPlaceBidIfNotWhitelisted() (gas: 465605)
BillboardTest:testCannotPlaceBidIfAuctionEnded() (gas: 282966)
BillboardTest:testCannotPlaceBidIfClosed() (gas: 252745)
BillboardTest:testCannotPlaceBidIfNotWhitelisted() (gas: 465624)
BillboardTest:testCannotSafeTransferByAttacker() (gas: 221525)
BillboardTest:testCannotSetBoardByAttacker() (gas: 229589)
BillboardTest:testCannotSetBoardByOwner() (gas: 362030)
Expand All @@ -30,36 +30,36 @@ BillboardTest:testCannotSetWhitelistByAttacker() (gas: 228664)
BillboardTest:testCannotTransferByOperator() (gas: 226771)
BillboardTest:testCannotTransferToZeroAddress() (gas: 222258)
BillboardTest:testCannotUpgradeRegistryByAttacker() (gas: 9017)
BillboardTest:testCannotWithdrawBidIfAuctionNotEndedOrCleared(uint96) (runs: 257, μ: 632826, ~: 632826)
BillboardTest:testCannotWithdrawBidIfNotFound(uint96) (runs: 257, μ: 750322, ~: 750322)
BillboardTest:testCannotWithdrawBidIfWon(uint96) (runs: 257, μ: 1026468, ~: 1026468)
BillboardTest:testCannotWithdrawBidTwice(uint96) (runs: 257, μ: 1110954, ~: 1110954)
BillboardTest:testClearAuction(uint96) (runs: 257, μ: 731791, ~: 731791)
BillboardTest:testClearAuctionIfAlreadyCleared() (gas: 738871)
BillboardTest:testClearAuctions() (gas: 1315269)
BillboardTest:testClearLastAuction(uint96) (runs: 257, μ: 732715, ~: 732715)
BillboardTest:testClearLastAuctions() (gas: 1332571)
BillboardTest:testGetBidderBids(uint8,uint8,uint8) (runs: 256, μ: 1508516, ~: 1140480)
BillboardTest:testGetBids(uint8,uint8,uint8) (runs: 256, μ: 8284065, ~: 6311026)
BillboardTest:testCannotWithdrawBidIfAuctionNotEndedOrCleared(uint96) (runs: 256, μ: 632850, ~: 632850)
BillboardTest:testCannotWithdrawBidIfNotFound(uint96) (runs: 256, μ: 750346, ~: 750346)
BillboardTest:testCannotWithdrawBidIfWon(uint96) (runs: 256, μ: 1026516, ~: 1026516)
BillboardTest:testCannotWithdrawBidTwice(uint96) (runs: 256, μ: 1111002, ~: 1111002)
BillboardTest:testClearAuction(uint96) (runs: 256, μ: 731815, ~: 731815)
BillboardTest:testClearAuctionIfAlreadyCleared() (gas: 738895)
BillboardTest:testClearAuctions() (gas: 1315317)
BillboardTest:testClearLastAuction(uint96) (runs: 256, μ: 732739, ~: 732739)
BillboardTest:testClearLastAuctions() (gas: 1332619)
BillboardTest:testGetBidderBids(uint8,uint8,uint8) (runs: 256, μ: 1508601, ~: 1140537)
BillboardTest:testGetBids(uint8,uint8,uint8) (runs: 256, μ: 8312589, ~: 6311372)
BillboardTest:testGetBlockFromEpoch() (gas: 16893)
BillboardTest:testGetEpochFromBlock() (gas: 17903)
BillboardTest:testGetTokenURI() (gas: 391345)
BillboardTest:testMintBoard() (gas: 585666)
BillboardTest:testPlaceBid(uint96) (runs: 257, μ: 840034, ~: 840654)
BillboardTest:testPlaceBidIfBoardWhitelistDisabled() (gas: 598142)
BillboardTest:testPlaceBidWithHigherPrice(uint96) (runs: 256, μ: 1011469, ~: 1011474)
BillboardTest:testPlaceBidWithSamePrices(uint96) (runs: 257, μ: 908798, ~: 909728)
BillboardTest:testPlaceBidZeroPrice() (gas: 432681)
BillboardTest:testPlaceBid(uint96) (runs: 256, μ: 840080, ~: 840702)
BillboardTest:testPlaceBidIfBoardWhitelistDisabled() (gas: 598166)
BillboardTest:testPlaceBidWithHigherPrice(uint96) (runs: 256, μ: 1011527, ~: 1011532)
BillboardTest:testPlaceBidWithSamePrices(uint96) (runs: 256, μ: 908843, ~: 909776)
BillboardTest:testPlaceBidZeroPrice() (gas: 432705)
BillboardTest:testSafeTransferByOperator() (gas: 235259)
BillboardTest:testSetBidURIs() (gas: 659810)
BillboardTest:testSetBidURIs() (gas: 659834)
BillboardTest:testSetBoardByCreator() (gas: 342395)
BillboardTest:testSetBoardWhitelistDisabled() (gas: 244401)
BillboardTest:testSetClosed() (gas: 241110)
BillboardTest:testSetWhitelist() (gas: 245426)
BillboardTest:testUpgradeRegistry() (gas: 3997817)
BillboardTest:testWithdrawBid(uint96) (runs: 257, μ: 1098918, ~: 1098918)
BillboardTest:testWithdrawBidIfClosed(uint96) (runs: 257, μ: 697012, ~: 697012)
BillboardTest:testWithdrawTax(uint96) (runs: 257, μ: 737092, ~: 737092)
BillboardTest:testUpgradeRegistry() (gas: 3924811)
BillboardTest:testWithdrawBid(uint96) (runs: 256, μ: 1098966, ~: 1098966)
BillboardTest:testWithdrawBidIfClosed(uint96) (runs: 256, μ: 697036, ~: 697036)
BillboardTest:testWithdrawTax(uint96) (runs: 256, μ: 737116, ~: 737116)
CurationTest:testCannotCurateERC20CurateZeroAmount() (gas: 12194)
CurationTest:testCannotCurateERC20EmptyURI() (gas: 15797)
CurationTest:testCannotCurateERC20IfNotApproval() (gas: 21624)
Expand All @@ -77,8 +77,8 @@ DistributionTest:testCannotClaimIfAlreadyClaimed() (gas: 284835)
DistributionTest:testCannotClaimIfInsufficientBalance() (gas: 394264)
DistributionTest:testCannotClaimIfInvalidProof() (gas: 245236)
DistributionTest:testCannotClaimIfInvalidTreeId() (gas: 243332)
DistributionTest:testCannotDropIfInsufficientAllowance(uint256) (runs: 257, μ: 212269, ~: 212283)
DistributionTest:testCannotDropIfInsufficientBalance(uint256) (runs: 257, μ: 214708, ~: 214740)
DistributionTest:testCannotDropIfInsufficientAllowance(uint256) (runs: 256, μ: 212269, ~: 212284)
DistributionTest:testCannotDropIfInsufficientBalance(uint256) (runs: 256, μ: 214708, ~: 214740)
DistributionTest:testCannotDropIfZeroAmount() (gas: 148793)
DistributionTest:testCannotDropTwiceWithSameTreeId() (gas: 307260)
DistributionTest:testCannotSetAdminByAdmin() (gas: 17334)
Expand All @@ -91,14 +91,14 @@ DistributionTest:testSetAdmin() (gas: 20239)
DistributionTest:testSweep() (gas: 253087)
LogbookNFTSVGTest:testTokenURI(uint8,uint8,uint16) (runs: 256, μ: 2613180, ~: 1746428)
LogbookTest:testClaim() (gas: 135608)
LogbookTest:testDonate(uint96) (runs: 257, μ: 156550, ~: 156936)
LogbookTest:testDonateWithCommission(uint96,uint96) (runs: 257, μ: 146620, ~: 140444)
LogbookTest:testFork(uint96,string) (runs: 257, μ: 452543, ~: 453928)
LogbookTest:testForkRecursively(uint8,uint96) (runs: 257, μ: 5332405, ~: 1801537)
LogbookTest:testForkWithCommission(uint96,string,uint256) (runs: 257, μ: 342132, ~: 257636)
LogbookTest:testDonate(uint96) (runs: 256, μ: 156549, ~: 156936)
LogbookTest:testDonateWithCommission(uint96,uint96) (runs: 256, μ: 146644, ~: 140444)
LogbookTest:testFork(uint96,string) (runs: 256, μ: 452537, ~: 453928)
LogbookTest:testForkRecursively(uint8,uint96) (runs: 256, μ: 5351224, ~: 1801537)
LogbookTest:testForkWithCommission(uint96,string,uint256) (runs: 256, μ: 342465, ~: 257636)
LogbookTest:testMulticall() (gas: 284999)
LogbookTest:testPublicSale() (gas: 207337)
LogbookTest:testPublish(string) (runs: 257, μ: 264067, ~: 263590)
LogbookTest:testPublish(string) (runs: 256, μ: 264065, ~: 263590)
LogbookTest:testPublishEn1000() (gas: 243477)
LogbookTest:testPublishEn140() (gas: 221241)
LogbookTest:testPublishEn200() (gas: 222826)
Expand All @@ -117,18 +117,18 @@ LogbookTest:testPublishZh5000() (gas: 607690)
LogbookTest:testSetDescription() (gas: 140760)
LogbookTest:testSetForkPrice() (gas: 153925)
LogbookTest:testSetTitle() (gas: 168680)
LogbookTest:testSplitRoyalty(uint8,uint8,uint96) (runs: 257, μ: 1952649, ~: 965338)
LogbookTest:testSplitRoyalty(uint8,uint8,uint96) (runs: 256, μ: 1959072, ~: 965338)
LogbookTest:testWithdraw() (gas: 7284400)
SnapperTest:testCannotInitRegionByNotOwner() (gas: 11365)
SnapperTest:testCannotReInitRegion() (gas: 14373)
SnapperTest:testCannotTakeSnapshotBeforeInit() (gas: 15717)
SnapperTest:testCannotTakeSnapshotByNotOwner() (gas: 12478)
SnapperTest:testCannotTakeSnapshotWrongLastBlock() (gas: 49242)
SnapperTest:testCannotTakeSnapshotWrongSnapshotBlock() (gas: 23899)
SnapperTest:testInitRegion(uint256) (runs: 257, μ: 114408, ~: 114408)
SnapperTest:testInitRegion(uint256) (runs: 256, μ: 114408, ~: 114408)
SnapperTest:testTakeSnapshot() (gas: 47831)
TheSpaceTest:testBatchBid() (gas: 695308)
TheSpaceTest:testBatchSetPixels(uint16,uint8) (runs: 257, μ: 371405, ~: 372904)
TheSpaceTest:testBatchSetPixels(uint16,uint8) (runs: 256, μ: 371399, ~: 372904)
TheSpaceTest:testBidDefaultedToken() (gas: 413399)
TheSpaceTest:testBidExistingToken() (gas: 360023)
TheSpaceTest:testBidNewToken() (gas: 303729)
Expand All @@ -140,7 +140,7 @@ TheSpaceTest:testCannotGetTaxWithNonExistingToken() (gas: 16379)
TheSpaceTest:testCannotGetTokenURIInLogicContract() (gas: 300973)
TheSpaceTest:testCannotSetColorByAttacker() (gas: 305326)
TheSpaceTest:testCannotSetConfigByAttacker() (gas: 12031)
TheSpaceTest:testCannotSetPixel(uint256) (runs: 257, μ: 314857, ~: 314857)
TheSpaceTest:testCannotSetPixel(uint256) (runs: 256, μ: 314857, ~: 314857)
TheSpaceTest:testCannotSetPriceByNonOwner() (gas: 305424)
TheSpaceTest:testCannotSetTokenImageURIByNonACLManager() (gas: 11862)
TheSpaceTest:testCannotSetTotalSupplyByAttacker() (gas: 11836)
Expand All @@ -164,12 +164,12 @@ TheSpaceTest:testGetTokenURI() (gas: 333462)
TheSpaceTest:testSetColor() (gas: 331348)
TheSpaceTest:testSetMintTax() (gas: 271715)
TheSpaceTest:testSetPixel(uint256) (runs: 256, μ: 403816, ~: 403816)
TheSpaceTest:testSetPrice(uint256) (runs: 257, μ: 304652, ~: 304652)
TheSpaceTest:testSetPrice(uint256) (runs: 256, μ: 304652, ~: 304652)
TheSpaceTest:testSetPriceByOperator(uint96) (runs: 256, μ: 354785, ~: 354785)
TheSpaceTest:testSetPriceTooHigh() (gas: 314504)
TheSpaceTest:testSetTaxRate() (gas: 347951)
TheSpaceTest:testSetTokenImageURI() (gas: 355813)
TheSpaceTest:testSetTotalSupply(uint256) (runs: 257, μ: 352202, ~: 352208)
TheSpaceTest:testSetTotalSupply(uint256) (runs: 256, μ: 352202, ~: 352208)
TheSpaceTest:testSetTreasuryShare() (gas: 384288)
TheSpaceTest:testSettleTax() (gas: 339465)
TheSpaceTest:testTaxCalculation() (gas: 402405)
Expand Down
4 changes: 2 additions & 2 deletions src/Billboard/Billboard.sol
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ contract Billboard is IBillboard {
uint256 tokenId_,
uint256 epoch_,
uint256 price_
) external payable isNotClosed(tokenId_) isFromWhitelist(tokenId_) {
) external isNotClosed(tokenId_) isFromWhitelist(tokenId_) {
_placeBid(tokenId_, epoch_, price_, "", "", false);
}

Expand All @@ -158,7 +158,7 @@ contract Billboard is IBillboard {
uint256 price_,
string calldata contentURI_,
string calldata redirectURI_
) external payable isNotClosed(tokenId_) isFromWhitelist(tokenId_) {
) external isNotClosed(tokenId_) isFromWhitelist(tokenId_) {
_placeBid(tokenId_, epoch_, price_, contentURI_, redirectURI_, true);
}

Expand Down
4 changes: 2 additions & 2 deletions src/Billboard/IBillboard.sol
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ interface IBillboard {
* @param epoch_ Epoch.
* @param price_ Amount of a bid.
*/
function placeBid(uint256 tokenId_, uint256 epoch_, uint256 price_) external payable;
function placeBid(uint256 tokenId_, uint256 epoch_, uint256 price_) external;

/**
* @notice Place bid on a board auction.
Expand All @@ -200,7 +200,7 @@ interface IBillboard {
uint256 price_,
string calldata contentURI_,
string calldata redirectURI_
) external payable;
) external;

/**
* @notice Set the content URI and redirect URI of a board.
Expand Down

0 comments on commit 36926d8

Please sign in to comment.