Right now oracle prices are fetched from frontend via graphql query, which is then forwarded by indexer to blockchain and returned back to the frontend. With this issue we would like to try store oracle price changes, once they happen on the blockchain, so users can subscribe for them
I have in mind some path like this:
For each block parsed by indexer, we track a set of all OracleKeys that occured among oracle.NewFeedData for that block. Once all events are processed, we query node via grpc for historical data specifying this block hash and OracleKeys that have been updated. Next we update the database with returned values.
In order to query data, we need to generate additional types (check here)
Right now oracle prices are fetched from frontend via graphql query, which is then forwarded by indexer to blockchain and returned back to the frontend. With this issue we would like to try store oracle price changes, once they happen on the blockchain, so users can subscribe for them
I have in mind some path like this: For each block parsed by indexer, we track a set of all
OracleKey
s that occured amongoracle.NewFeedData
for that block. Once all events are processed, we query node via grpc for historical data specifying this block hash andOracleKey
s that have been updated. Next we update the database with returned values.In order to query data, we need to generate additional types (check here)