Skip to content

explorer/parser: decode DaoVote calls + state - #2067

Merged
Maxnflaxl merged 3 commits into
masterfrom
dao-vote-parser
Aug 18, 2026
Merged

explorer/parser: decode DaoVote calls + state#2067
Maxnflaxl merged 3 commits into
masterfrom
dao-vote-parser

Conversation

@Maxnflaxl

@Maxnflaxl Maxnflaxl commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

Extends the Explorer rich-parser to fully decode the DaoVote governance contract. It was scaffolded but only recognised the method names, so vote/proposal arguments and tallies came through empty. Now:

Calls

  • AddProposal — variant count + proposal text.
  • Vote — voter, epoch, counter, and the per-proposal choices.
  • MoveFunds — Funds Lock/Unlock. The user and amount are deliberately not decoded: they already show up in the generic Keys (AddSig) and Funds (FundsLock/FundsUnlock) columns of the invocation.

State

  • Epoch stats — current + finalized epochs, with stake active / dividend-eligible.
  • Proposals — per-proposal variant tallies (No/Yes for binary proposals) and total stake voted.
  • User votes — per-voter ballots enumerated from the contract's UserVote logs (Env::LogReader): voter pubkey, stake (weight), and per-proposal choices.

Testing

Reparsed a mainnet explorer-node with the new parser: DaoVote now surfaces decoded calls, per-epoch / per-proposal tallies, and the per-voter User votes table.

AddProposal (text, variants), Vote (voter, epoch, per-proposal choices), MoveFunds (user, amount); OnState enumerates per-epoch turnout (EpochStats) and per-proposal variant tallies.
@Maxnflaxl
Maxnflaxl requested a review from valdok July 8, 2026 01:16
@Maxnflaxl
Maxnflaxl marked this pull request as draft July 8, 2026 11:59

@valdok valdok left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. One thing I'd change: DaoVote::Method::MoveFunds - no need to decode the "user" and "amount", because those will appear it general fields: the amount moved out of the contracts, and the method signature (user).
But overall it's ok

@Maxnflaxl

Copy link
Copy Markdown
Member Author

Makes sense, thanks.

@Maxnflaxl
Maxnflaxl requested a review from valdok August 17, 2026 16:50
@Maxnflaxl
Maxnflaxl marked this pull request as ready for review August 18, 2026 09:18
@Maxnflaxl
Maxnflaxl merged commit b976559 into master Aug 18, 2026
9 of 11 checks passed
@Maxnflaxl
Maxnflaxl deleted the dao-vote-parser branch August 18, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants