Is it possible to make a view function (that doesn't modify the state of the chain) that as a result of running would invoke another function, which modifies the state of the chain?
For example, make a function A view, which will return function B()?
My goal is to verify something inside the view function, and only if it's true, initiate the transaction (to save gas).
Thank you,