Is there a difference between onlyOwner vs onlyOwner() with brackets

I am digging into Safemoon code. I noticed that onlyOwner modyifier is used sometimes with and sometimes without brackets. For example:

function includeInFee(address account) public onlyOwner {
        _isExcludedFromFee[account] = false;
    }
    
function setTaxFeePercent(uint256 taxFee) external onlyOwner() {
        _taxFee = taxFee;
    }

What's the difference between onlyOwner vs onlyOwner() with brackets? Or you can use it as you want? Asking this becuase onlyOwner is a very important thing in the contract code and I want to be 100% sure...

There is no difference. onlyOwner is shorthand voor onlyOwner() without parameters.

1 Like

When implementing a modifier which takes no input arguments, you can omit the ().

When using a modifier which takes no input arguments, you can also omit the ().

1 Like