Skip to content

Commit

Permalink
Remove unnecessary address validator from modifiers.
Browse files Browse the repository at this point in the history
  • Loading branch information
zeckli committed Nov 7, 2023
1 parent 7841bbe commit 5e989e9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
22 changes: 11 additions & 11 deletions .gas-snapshot
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
BillboardTest:testApprove() (gas: 195001)
BillboardTest:testApproveByAttacker() (gas: 165734)
BillboardTest:testApprove() (gas: 194731)
BillboardTest:testApproveByAttacker() (gas: 165464)
BillboardTest:testBid() (gas: 143)
BillboardTest:testBidByAttacker() (gas: 188)
BillboardTest:testClearAuction() (gas: 210)
BillboardTest:testClearAuctionByAttacker() (gas: 144)
BillboardTest:testGetTokenURI() (gas: 188684)
BillboardTest:testMintBoard() (gas: 177258)
BillboardTest:testMintBoardByAttacker() (gas: 19766)
BillboardTest:testSetBoardProperties() (gas: 301005)
BillboardTest:testSetBoardProprtiesByAttacker() (gas: 184150)
BillboardTest:testSetIsOpened() (gas: 48304)
BillboardTest:testGetTokenURI() (gas: 188414)
BillboardTest:testMintBoard() (gas: 176988)
BillboardTest:testMintBoardByAttacker() (gas: 19631)
BillboardTest:testSetBoardProperties() (gas: 300735)
BillboardTest:testSetBoardProprtiesByAttacker() (gas: 183880)
BillboardTest:testSetIsOpened() (gas: 47764)
BillboardTest:testSetIsOpenedByAttacker() (gas: 11962)
BillboardTest:testSetTaxRate() (gas: 27454)
BillboardTest:testSetTaxRate() (gas: 27319)
BillboardTest:testSetTaxRateByAttacker() (gas: 11992)
BillboardTest:testTransfer() (gas: 407583)
BillboardTest:testTransferByAttacker() (gas: 190220)
BillboardTest:testTransfer() (gas: 407313)
BillboardTest:testTransferByAttacker() (gas: 189950)
BillboardTest:testUpgradeAuctionByAttacker() (gas: 13591)
BillboardTest:testUpgradeRegistryByAttacker() (gas: 13657)
3 changes: 0 additions & 3 deletions src/Billboard/BillboardAuction.sol
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ contract BillboardAuction is IBillboardAuction {
}

modifier isFromOperator() {
if (operator == address(0)) {
revert OperatorNotFound();
}
if (msg.sender == address(0)) {
revert InvalidAddress();
}
Expand Down
3 changes: 0 additions & 3 deletions src/Billboard/BillboardRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ contract BillboardRegistry is IBillboardRegistry, ERC721 {
}

modifier isFromOperator() {
if (operator == address(0)) {
revert OperatorNotFound();
}
if (msg.sender == address(0)) {
revert InvalidAddress();
}
Expand Down

0 comments on commit 5e989e9

Please sign in to comment.