Getting Storage Diff on Operation Level
Closed this issue · 5 comments
I am wondering if it's possible to get storage diff from /v1/operations/transactions
similar to the result of https://api.better-call.dev/v1/opg/xxx
TzKT doesn't process storage diffs, but stores the whole storage objects for performance reasons. The only way to do that is to calculate diffs on your end by processing a sequence of storage changes.
You can get all storage changes in two ways:
- /v1/contracts/{address}/storage/history;
- /v1/operations/transactions?target={contract}&select=id,storage&sort.desc=id (note, if
storage
isnull
, then it wasn't changed).
Then you can compare each storage object with the previous one to find diffs.
Feel free to re-open, or just comment if you have any other questions.
TzKT doesn't process storage diffs, but stores the whole storage objects for performance reasons. The only way to do that is to calculate diffs on your end by processing a sequence of storage changes.
You can get all storage changes in two ways:
Thank you for the detailed response.
I have a question about how is the storage history being recorded? Is it per-block or per-operation?
My use case will require per-operation level storage diff.
Yes, it is per operation