Why would I need to use events when I can access a contract's variables through the automatic accessor functions?
Please explain the use of and/or need for events.
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
No, not exclusively for real-time updates.
Events are inexpensive, well-organized storage, so there are many possible uses.
Have a look here, for example. How can we retrieve the evolution of the state of an smart contract variable?
In my opinion it's a good habit to emit events that describe all state changes in the contract.
Hope it helps.