hoodrunio / explorer-backend

Backend app for Cosmos ecosystem explorer.
https://backend.testnet.run/
5 stars 1 forks source link

Feat: Trace governance votes via websocket and keep in database #74

Open Errorist79 opened 1 year ago

Errorist79 commented 1 year ago

Subscribe method:

{
    "jsonrpc": "2.0",
    "method": "subscribe",
    "id": "0",
    "params": {
        "query": "tm.event='Tx' AND message.action CONTAINS 'MsgVote'"
    }
}

Content parsing:

Example content: https://gist.github.com/Errorist79/0bf3d82c16157bb07cd6966d047803b1

Parsing;

Proposal ID: proposal_vote.proposal_id

Voter: message.sender

Vote option: proposal_vote.option

Tx HASH: tx.hash