Can someone explain to me why external
is used in below code snippet?
A general clarification of how the visibility modifiers work in practice would be great, I've always understood that external
meant that the function can only be called from outside the contract, yet this particular piece is a part of the contract, so wouldn't internal
or private
be the right one to use?
function finalizePresale() external onlyOwner {
require (!isFinalized);
isFinalized = true;
token.transferOwnership(owner);
}