cancelProposal(contract, sender, proposalID, currency)
Feature
Returns raw operation that cancels the proposal by the proposer of the proposal. Notes: Proposal can only be canceled before 'registration period'. Only account who proposed the proposal can execute.
Parameters
string
contract address,
string
sender, // proposer of the proposal
string
proposal ID,
string
currency ID
Return Value
object
cancel operation
example
const contractAddress = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const sender = "0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca";
const proposalID = "test_proposal";
const currencyID = "MCC";
const cancelOperation = mitum.dao.cancelProposal(contractAddress, sender, proposalID, currencyID);
console.log(cancelOperation);
// output
Operation {
id: 'mitum',
fact: CancelProposalFact {
hint: Hint { s: 'mitum-dao-cancel-proposal-operation-fact' },
token: Token { s: '2023-10-18 05:05:25.876 +0000 UTC' },
_hash: <Buffer d1 77 a0 a5 2e 6a 5e df c1 54 32 b2 e9 fc 88 40 d5 06 3f d0 86 05 12 71 0b b4 23 51 f9 ef 79 b0>,
sender: Address {
s: '0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca',
type: 'mitum'
},
contract: Address {
s: '0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca',
type: 'mitum'
},
currency: CurrencyID { s: 'MCC' },
proposalID: 'test_proposal'
},
hint: Hint { s: 'mitum-dao-cancel-proposal-operation' },
_factSigns: [],
_hash: <Buffer >
}
PreviousgetProposal(contract, proposalID)Nextregister(contract, sender, proposalID, currency, approved?)
Last updated