Reputation: 711
Does it cost anything to call a Smart Contract on Tron that returns data from the contract but does NOT change any data?
Upvotes: 0
Views: 381
Reputation: 43481
It depends on how you call it.
The eth_call JSON-RPC method is free.
The eth_sendTransaction method creates a transaction and consumes gas in the form of native currency (in case of the Tron network, that's TRX).
Some wallet apps only support the transaction mode and do not support calls. Some JSON-RPC wrapper libraries such as web3js allow you to chose between the call (using the library .call()
method) and the transaction (using the library .send()
method).
Note: Even though the methods are prepended eth_
, they are used on the Tron network as well.
Upvotes: 1