Skip to main content
typo
Source Link

Is it possible to emit event in view function (via event or logi)?

Since event logs are stored in transaction receipts, I do not believe it is possible to emit an event within a view function since tono transaction occurs.

Or is it possible to return value to javascript without(before) mining in a transaction function?

I don't think this is possible either. The return value from a function which creates a transaction will be the transaction receipt. Within the receipt, you can find any events which were emitted within that function.

Is it possible to emit event in view function (via event or logi)?

Since event logs are stored in transaction receipts, I do not believe it is possible to emit an event within a view function since to transaction occurs.

Or is it possible to return value to javascript without(before) mining in a transaction function?

I don't think this is possible either. The return value from a function which creates a transaction will be the transaction receipt. Within the receipt, you can find any events which were emitted within that function.

Is it possible to emit event in view function (via event or logi)?

Since event logs are stored in transaction receipts, I do not believe it is possible to emit an event within a view function since no transaction occurs.

Or is it possible to return value to javascript without(before) mining in a transaction function?

I don't think this is possible either. The return value from a function which creates a transaction will be the transaction receipt. Within the receipt, you can find any events which were emitted within that function.

Source Link

Is it possible to emit event in view function (via event or logi)?

Since event logs are stored in transaction receipts, I do not believe it is possible to emit an event within a view function since to transaction occurs.

Or is it possible to return value to javascript without(before) mining in a transaction function?

I don't think this is possible either. The return value from a function which creates a transaction will be the transaction receipt. Within the receipt, you can find any events which were emitted within that function.