zeitgeist icon indicating copy to clipboard operation
zeitgeist copied to clipboard

Release event with only changed fields when market is edited

Open saboonikhil opened this issue 1 year ago • 1 comments

It would be good to have event PredictionMarkets.MarketEdited which only has fields whose data got updated by the user. This should allow lay person to identify the changed data and reduce work for downstreams especially.

Presently subsquid would check every field on the market schema before and after edit to track changes.

Example: As seen for marketId:535 on testnet, its difficult to make out what changed post edit.

Screenshot 2023-06-10 at 1 11 34 PM Screenshot 2023-06-10 at 1 11 26 PM

saboonikhil avatar Jun 10 '23 07:06 saboonikhil

The solution should be on the Squid side imo, as the actual metadata lives in IPFS it should fetch the data and diff it. We could also enforce providing the actual metadata as a bytearray to the on-chain call and checking if it matches the metadata, but that introduces unnecessary load on the chain and raises the transaction cost, as the transaction gets bigger and computation time increases.

sea212 avatar Aug 31 '23 08:08 sea212

Closing because we're removing market editing completely.

maltekliemann avatar May 03 '24 20:05 maltekliemann