= msg.sender
How it actually assigns to that address?
Like if somebody else calls the contract that means he is the msg.sender then he will be now the owner
No, its only called in the constructor
Owner should be called with constructor function initially.. Constructor function is a special function which is automatically called, only one time in a lifetime of that contract at the time of deployment.. So so can't change ownership after that.. hence u can make another function transferOwnership with onlyOwner modifier...
Обсуждают сегодня