If we want to query the state of a module, the only way now is to do that is query related objects and read the data.
There are some cases we want to store some data, but get calculated results based on the stored data.
For example, we have a complex mechanism to calculate reward based on many parameters, and it changes according to time. Since there is no such view functions in sui Move and associated query API, we have to implement the calculation methods in both the contract and the frontend.
The current objects query API just returns all the objects simply, e.g. sui_getObjectsOwnedByAddress.
It might be a frontend performance issue when users get a lot of objects.
It's better to add some filter parameters, e.g. type_
, and pagination mechanism.