1

I am curious as to why the emission of Ethereum events is tethered to the fact of a transaction being entirely mined

I realize that we can also make calls to public view functions, which do NOT require a transaction to be called in the Smart Contract

Can such functions result in events being emitted ?

1 Answer 1

2

Nope events cannot be emitted without transaction. until or unless you don't do any transaction they will not emit. basically they store data free

in case of public view functions they are simply the read functions (which cost not gas fee ) which retrieve the information stores on the blockchain. therefore we don't use events inside read functions. https://betterprogramming.pub/what-is-an-event-in-solidity-420caeb38859

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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