what exactly is a view function? Who executes the code of a view function of a smart contract if not a node on the blockchain (no gas fees after all and no transaction required)?
A view function is the same as a normal endpoint. It is only marked as readonly so anybody reading your code would know it isn't necessary to make a transaction.
The query will be executed by an observer squad/node in a sandboxed mode. Any change it makes will be discarded and just the result will be returned to you.
anyone?
A view function is the same as a normal endpoint. It is only marked as readonly so anybody reading your code would know it isn't necessary to make a transaction. The query will be executed by an observer squad/node in a sandboxed mode. Any change it makes will be discarded and just the result will be returned to you.