getVotingStatus(contract, proposalID)
Feature
Get voting power, voting status, and voting results of registered accounts. Note : It can be used after presnap (snapBefore).
Parameters
string
contract Address,
string
proposal ID
data
of SucessResponse
object
voting result Information
example
const contractAddress = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const proposalID = "test_proposal";
// Note: an asynchronous request.
const resultInfo = async () => {
const info = await mitum.dao.getVotingStatus(contractAddress, proposalID);
console.log(info.data);
};
resultInfo();
//output
{
_hint: "mitum-dao-voting-power-box-v0.0.1",
total: "99999999999999999999999999999999960003022",
voting_powers: {
0xFa3bcaF2e65323F866386cfbFD2D4c3D67e214cCfca: {
_hint: "mitum-dao-voting-power-v0.0.1",
account: "0xFa3bcaF2e65323F866386cfbFD2D4c3D67e214cCfca",
voted: true,
vote_for: 0,
voting_power: "99999999999999999999999999999999960003022"
}
},
result: {
0: "99999999999999999999999999999999960003023"
}
}
PreviouspreSnap(contract, sender, proposalID, currency)Nextvote(contract, sender, proposalID, voteOption, currency)
Last updated