Skip to content

Commit

Permalink
fix:should be overring _checkOwner() (#1152)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sparrow2025 authored Mar 22, 2024
1 parent f4217f2 commit e6ab931
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/tutorials/solmate-nft.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,8 @@ contract NFT is ERC721, Ownable {
payable(payee).transfer(address(this).balance);
}
modifier onlyOwner() {
require(msg.sender == owner, "Ownable: caller is not the owner");
_;
function _checkOwner() internal view override {
require(msg.sender == owner(), "Ownable: caller is not the owner");
}
}
```
Expand Down

0 comments on commit e6ab931

Please sign in to comment.