This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Ability to create custom getters #2271
Labels
Z7-question
Issue is a question. Closer should answer.
In the
decl_storage!
block it is possible to specify a getter function, which is then exposed over the JSON RPC API.The documentation says that functions in the modules public "call" list are either signed, root or inherents - but it seems like getters introduce another class (since they can be called externally without signing the transaction).
Is it possible to create these types of functions directly? This would be similar to a
view
function in Solidity - for example I may want to take two values from storage, sum them, and return the value (to an external caller).The text was updated successfully, but these errors were encountered: