vote(contract, sender, proposalID, voteOption, currency)
const contractAddress = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const sender = "0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca";
const proposalID = "test_proposal";
const voteOption = 1;
const currencyID = "MCC";
const castVoteOperation = mitum.dao.vote(contractAddress, sender, proposalID, voteOption, currencyID);
console.log(castVoteOperation);
// output
Operation {
id: 'mitum',
fact: VoteFact {
hint: Hint { s: 'mitum-dao-vote-operation-fact' },
token: Token { s: '2023-10-18 06:11:25.574 +0000 UTC' },
_hash: <Buffer e4 ae 66 5a cb 8b e2 fc 88 df a6 57 d4 ce 3b 01 1b 39 be fe 75 8e 91 80 b0 19 3b 01 61 f6 1f 68>,
sender: Address {
s: '0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca',
type: 'mitum'
},
contract: Address {
s: '0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca',
type: 'mitum'
},
currency: CurrencyID { s: 'MCC' },
proposalID: 'test_proposal',
vote: Big { big: 1n }
},
hint: Hint { s: 'mitum-dao-vote-operation' },
_factSigns: [],
_hash: <Buffer >
}Last updated