I am building a dao by governance contract. When i making test, I make a propose everything worked great. After queue and execute first propose i start a second propose to undone what first propose do.
This time i have problem. I can get propose id. i can see proposal state. I can make votes. Looks like i can get correct result of that voting. When i finished the voting ( proposal state = 4 or 3 ) i cant get proposalVotes. They return undefined.
Code to reproduce
// getting to results
const { againstVotesCancel, forVotesCancel, abstainVotesCancel } =
await governor.proposalVotes(proposalIdCancel);
console.log(`Vote on against: ${againstVotesCancel}`);
console.log(`Vote on for: ${forVotesCancel}`);
console.log(`Vote on abstain: ${abstainVotesCancel}`);
Terminal output from my code:
CancelProposalId = 96265046379828225455504338025800183255920452744066584404801722501207421577384
Proposal deadline on block 429
Current Proposal State: 0
Moving blocks...
Current Proposal State: 1
Moving blocks...
Current Proposal State: 3
Vote on against: undefined
Vote on for: undefined
Vote on abstain: undefined