I have created an address and some payload serialised with protobuf. I have then stored this serialised bytes on this address
context.set_state({address: account.SerializeToString()},
self._timeout)
Now, Lets say i have chnaged the payload and uploaded to this address. I just want to know, If i can get the history of all the changes made to this address alongwith the present payload stored at this address.
First: There is no immediate or obvious api to fetch the history of data for a specific address.
That being said, each transaction, as you know, does get a context which is what is then written through to global state. The merkle tree maintains that transaction context however.
You have three choices:
/blocks
endpoint, iterate through each transaction in each block. From the transaction use the state root hash
field in the head
field of the /state
endpoint along with the address of interest./transactions
endpoint to get the list of transactions, using the same fields described in #1