0
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

What is the purpose of this line?

https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/ownership/Ownable.sol

1

This line defines an event which can be emitted after something takes place. Clients can then listen for this event and react when it happens. http://solidity.readthedocs.io/en/develop/contracts.html#events

  • Is it necessary for the ownership of a contract to be transferred? Or is it just an extra functionality? – enriquejr99 Mar 12 '18 at 17:01
  • No.. smart contracts can't be edited once deployed. So its good to put it in there just in case. – Marc Alexander Mar 12 '18 at 20:08
  • But we can still change the owner address without the event. What do you mean? – enriquejr99 Mar 13 '18 at 0:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.