The SDK allows developers to vote on specific proposals within the governance framework of the Polkadot network using the multisig wallet. This functionality enables active participation in the decision-making process.
Note: only working for ReferendumV1 and ReferendumV2
const multisigAddress = '...';
const proposalIndex = 101 // number
const vote = { Standard: { balance: lockedBalance, vote: { aye, conviction } }
// A function that takes a single parameter.
const eventGrabber = (message)=>{
// use message to track transaction progress and events using eventGrabber for real-time visibility
console.log(message)
}
const { data, error } = await client.voteOnProposal(multisigAddress, proposalIndex, vote, statusGrabber, proposalType);
if (data){
console.log(data)
// use your data
}
else if(error){
console.log(error)
}