modifier
Estimated reading time: 1 minutemodifier
- modifier change the function behaviour. it woeks as like middleware also.
modifier onlyOwner {
require(
msg.sender == owner,
"Only owner can call this function."
);
_;
}
// use modifier
function human() view public onlyOwner {
//
}