Skip to content

Commit

Permalink
2, 1, 0 order
Browse files Browse the repository at this point in the history
  • Loading branch information
Akilesh Tangella authored and Akilesh Tangella committed Jun 18, 2023
1 parent e3aa822 commit b5eac6e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions contracts/zkvote/zkvote.sol
Original file line number Diff line number Diff line change
Expand Up @@ -341,17 +341,20 @@ contract ZKVote is IZKVote {
vote_totals[proposalId][k] = lookup_table[VG[0]][VG[1]];
}

// We send in reverse order of the vote_totals mapping so that we match
// the order of the VoteTally struct in zkvote.sol as well as the
// receiveVoteTally function in IDAOProxy.sol.
setupVoteCaller[proposalId].receiveVoteTally(
proposalId,
vote_totals[proposalId][0],
vote_totals[proposalId][2],
vote_totals[proposalId][1],
vote_totals[proposalId][2]
vote_totals[proposalId][0]
);
emit TallyComplete(
proposalId,
vote_totals[proposalId][0],
vote_totals[proposalId][2],
vote_totals[proposalId][1],
vote_totals[proposalId][2]
vote_totals[proposalId][0]
);
}

Expand Down

0 comments on commit b5eac6e

Please sign in to comment.