regen-network / indexer

:rocket: Blockchain indexer and database
Other
2 stars 0 forks source link

fix: `all_ecocredit_txes` to use msg.data->@type instead of msg_event.type #56

Closed blushi closed 11 months ago

blushi commented 11 months ago

closes: #55

The all_ecocredit_txes pg function - that we rely on on the front-end to display the activity table: https://app.regen.network/stats/activity which is msg-based - was using a join on the msg_event table instead of the msg table. For certain msgs, multiple events can be emitted (eg for MsgBuyDirect: EventBuyDirect, EventRetire and EventTransfer can be emitted). This is why we could see the same row multiple times in the Activity table.

I've deployed to the indexer staging heroku app and db, which is used on https://dev.app.regen.network/stats/activity and now works as expected.