#Read-only functions for free?

4 messages · Page 1 of 1 (latest)

bleak palm
#

NEAR protocol contracts allow to have read-only methods that do not change the state or data on-chain, so invoking these methods is totally free. See https://www.calvintorra.com/blog/how-to-view-data-on-a-near-protocol-contract-for-free.

I know that currently, to invoke a Soroban contract function this involves sending a transaction with the InvokeHostFunction operation so at least the base fee of 100 stroops should be paid.

But, is there a way in Soroban to query read-only functions for free? If not, are there plans to add this or is it unfeasible?

Calvin Torra

There are two ways to view and interact with data on the NEAR blockchain. Change methods and view methods

broken geode
#

the json-rpc simulateTransaction method allows you to execute queries for free

#

we have some semantical challenges around conveying what preflight/simulateTransaction actually means. More context #1114217683664261180 message

tawdry pollen