So let's assume the following code:
modifier Owner() {
if (msg.sender == owner) _;
}
function uploadContent() external Owner {
uploadContent() ..
}
Why not use this?
function checkOwner() internal {
require(msg.sener == owner, "Youre not the owner");
}
function uploadContent() external Owner {
checkOwner()
uploadContent() ...
}
Whats the difference? Is it cheaper in terms of gas cost? Because I dont see any reason why to use the first approach?