Skip to content

Commit

Permalink
feat(billboard): remove unused TaxTreasury.owner
Browse files Browse the repository at this point in the history
  • Loading branch information
robertu7 committed Nov 24, 2023
1 parent e2975f1 commit a346b1f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
26 changes: 13 additions & 13 deletions .gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ ACLManagerTest:testTransferRole() (gas: 21528)
BillboardTest:testAddToWhitelist() (gas: 37205)
BillboardTest:testApproveAndTransfer() (gas: 162735)
BillboardTest:testCalculateTax() (gas: 29439)
BillboardTest:testCannnotWithdrawTaxIfSmallAmount(uint8) (runs: 256, μ: 419891, ~: 433722)
BillboardTest:testCannnotWithdrawTaxIfZero() (gas: 385903)
BillboardTest:testCannnotWithdrawTaxIfSmallAmount(uint8) (runs: 256, μ: 417758, ~: 431155)
BillboardTest:testCannnotWithdrawTaxIfZero() (gas: 383624)
BillboardTest:testCannotAddToWhitelistByAttacker() (gas: 11137)
BillboardTest:testCannotApproveByAttacker() (gas: 130388)
BillboardTest:testCannotClearAuctionIfAuctionNotEnded() (gas: 585072)
Expand All @@ -29,23 +29,23 @@ BillboardTest:testCannotSetTaxRateByAttacker() (gas: 11106)
BillboardTest:testCannotTransferByOperator() (gas: 132888)
BillboardTest:testCannotTransferToZeroAddress() (gas: 128375)
BillboardTest:testCannotUpgradeRegistryByAttacker() (gas: 11228)
BillboardTest:testCannotWithBidTwice(uint96) (runs: 256, μ: 915015, ~: 915015)
BillboardTest:testCannotWithBidTwice(uint96) (runs: 256, μ: 912727, ~: 912727)
BillboardTest:testCannotWithdrawBidIfAuctionNotCleared(uint96) (runs: 256, μ: 751566, ~: 751566)
BillboardTest:testCannotWithdrawBidIfAuctionNotEnded(uint96) (runs: 256, μ: 626363, ~: 626363)
BillboardTest:testCannotWithdrawBidIfNotFound() (gas: 419127)
BillboardTest:testCannotWithdrawBidIfWon(uint96) (runs: 256, μ: 721463, ~: 721463)
BillboardTest:testCannotWithdrawTaxByAttacker() (gas: 21053)
BillboardTest:testCannotWithdrawBidIfWon(uint96) (runs: 256, μ: 719175, ~: 719175)
BillboardTest:testCannotWithdrawTaxByAttacker() (gas: 18774)
BillboardTest:testClearAuctionIfAuctionEnded() (gas: 630598)
BillboardTest:testClearAuctionsIfAuctionEnded() (gas: 1168298)
BillboardTest:testGetBids(uint8,uint8,uint8) (runs: 256, μ: 2724918, ~: 1356638)
BillboardTest:testGetBids(uint8,uint8,uint8) (runs: 256, μ: 2888923, ~: 1434807)
BillboardTest:testGetTokenURI() (gas: 155303)
BillboardTest:testMintBoard() (gas: 225987)
BillboardTest:testMintBoardByWhitelist() (gas: 157167)
BillboardTest:testMintBoardIfOpened() (gas: 130861)
BillboardTest:testPlaceBidByWhitelist() (gas: 470067)
BillboardTest:testPlaceBidIfAuctionEnded() (gas: 918066)
BillboardTest:testPlaceBidOnNewBoard(uint96) (runs: 256, μ: 519460, ~: 529786)
BillboardTest:testPlaceBidWithHigherPrice(uint96) (runs: 256, μ: 747753, ~: 754983)
BillboardTest:testPlaceBidByWhitelist() (gas: 467779)
BillboardTest:testPlaceBidIfAuctionEnded() (gas: 915778)
BillboardTest:testPlaceBidOnNewBoard(uint96) (runs: 256, μ: 517306, ~: 527498)
BillboardTest:testPlaceBidWithHigherPrice(uint96) (runs: 256, μ: 747909, ~: 754983)
BillboardTest:testPlaceBidWithSamePrices(uint96) (runs: 256, μ: 745880, ~: 757556)
BillboardTest:testPlaceBidZeroPrice() (gas: 357842)
BillboardTest:testRemoveToWhitelist() (gas: 24957)
Expand All @@ -55,9 +55,9 @@ BillboardTest:testSetBoardPropertiesAfterTransfer() (gas: 334252)
BillboardTest:testSetIsOpened() (gas: 15978)
BillboardTest:testSetTaxRate() (gas: 27263)
BillboardTest:testSomethin() (gas: 1641191)
BillboardTest:testUpgradeRegistry() (gas: 2729870)
BillboardTest:testWithdrawBid(uint96) (runs: 256, μ: 916311, ~: 916311)
BillboardTest:testWithdrawTax(uint96) (runs: 256, μ: 509580, ~: 509580)
BillboardTest:testUpgradeRegistry() (gas: 2725044)
BillboardTest:testWithdrawBid(uint96) (runs: 256, μ: 914023, ~: 914023)
BillboardTest:testWithdrawTax(uint96) (runs: 256, μ: 507001, ~: 507001)
CurationTest:testCannotCurateERC20CurateZeroAmount() (gas: 12194)
CurationTest:testCannotCurateERC20EmptyURI() (gas: 15797)
CurationTest:testCannotCurateERC20IfNotApproval() (gas: 21624)
Expand Down
4 changes: 2 additions & 2 deletions src/Billboard/Billboard.sol
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ contract Billboard is IBillboard {
registry.transferAmount(_prevOwner, _highestBid.price);

// transfer bid tax to board creator's tax treasury
(, uint256 _taxAccumulated, uint256 _taxWithdrawn) = registry.taxTreasury(boardCreator_);
(uint256 _taxAccumulated, uint256 _taxWithdrawn) = registry.taxTreasury(boardCreator_);
registry.setTaxTreasury(boardCreator_, _taxAccumulated + _highestBid.tax, _taxWithdrawn);
}

Expand Down Expand Up @@ -325,7 +325,7 @@ contract Billboard is IBillboard {

/// @inheritdoc IBillboard
function withdrawTax() external {
(, uint256 _taxAccumulated, uint256 _taxWithdrawn) = registry.taxTreasury(msg.sender);
(uint256 _taxAccumulated, uint256 _taxWithdrawn) = registry.taxTreasury(msg.sender);

uint256 amount = _taxAccumulated - _taxWithdrawn;

Expand Down
1 change: 0 additions & 1 deletion src/Billboard/IBillboardRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ interface IBillboardRegistry is IERC721 {
}

struct TaxTreasury {
address owner;
uint256 accumulated;
uint256 withdrawn;
}
Expand Down

0 comments on commit a346b1f

Please sign in to comment.