formSetPolicyCalldata(data, currency)
Feature
Used to generate call data if the proposal covers changing the voting rules from DAO model in 'crypto Options'.
Parameters
object policyData, // same with daoData for registerModel() but exclude "option”
string currency ID,
Return Value
object set policy calldata
example
const policyData = {
votingPowerToken: "MCC",
threshold: 100000,
proposalFee: 100,
proposerWhitelist: ["0x07469989b2562afF5E5C3B116CD3AA5Ef814e5a1fca"],
proposalReviewPeriod: 1800000,
registrationPeriod: 3500000,
preSnapshotPeriod: 1800000,
votingPeriod: 6000000,
postSnapshotPeriod: 1800000,
executionDelayPeriod: 3000000,
turnout: 33,
quorum: 50,
};
const currencyID = "MCC";
const policyCallData = mitum.dao.formSetPolicyCalldata(policyData, currencyID);
console.log(policyCallData);
// output
GovernanceCalldata {
hint: Hint { s: 'mitum-dao-governance-calldata' },
policy: DAOPolicy {
hint: Hint { s: 'mitum-dao-policy' },
votingPowerToken: CurrencyID { s: 'MCC' },
threshold: Big { big: 100000n },
proposalFee: Fee { hint: [Hint], currency: [CurrencyID], big: [Big] },
proposerWhitelist: Whitelist { hint: [Hint], active: [Bool], accounts: [Array] },
proposalReviewPeriod: Big { big: 1800000n },
registrationPeriod: Big { big: 3500000n },
preSnapshotPeriod: Big { big: 1800000n },
votingPeriod: Big { big: 6000000n },
postSnapshotPeriod: Big { big: 1800000n },
executionDelayPeriod: Big { big: 3000000n },
turnout: Big { big: 33n },
quorum: Big { big: 50n }
}
}PreviousformTransferCalldata(sender, receiver, currency, amount)Nextpropose(contract, sender, proposalId, data, currency)
Last updated