Vyacheslav
Vyacheslav

Reputation: 77

How to backup data of NEAR smart contract?

It possible backup or make snapshots for data stored in NEAR smart contract? I try use near view-state but this method return base64 encoded data and don't work on contracts with some data size bigger than hello world apps.

Upvotes: 2

Views: 58

Answers (1)

Benjamin Kurrek
Benjamin Kurrek

Reputation: 1094

You can query for the state of any contract / account at any given block height since genesis. The chain is essentially just a giant history of backups / snapshots in a way. See this stack overflow post which outlines how you can view the data and how you can get past the Error: [-32000] Server error: State of contract _____.near is too large to be viewed error by running your own node.

Upvotes: 2

Related Questions