Reading and Writing Data to the Blockchain
Casper features several means of reading and writing data to global state, depending on user needs and complexity. Reading data from global state can be done off-chain or on-chain. Writing data requires on-chain interactions, due to the nature of the system.
Due to the nature of Casper's serialization standard,
NamedKeys should be used sparingly for smaller subsets of data. Developers should use dictionaries for larger subsets of mapped structures.
query_global_state method available through the JSON-RPC allows users to read data from global state without performing on-chain actions.
The Casper API includes the following for reading and writing to global state: