reigsterModel(contract, sender, data, currency)
Feature
Return raw operation that creates a new 'DAO model'. Note : Only contract owner or handler can execute.
Parameters
string contract address,
string sender,
object daoData,
string currency ID
Return Value
object register model operation
// [ parameter daoData’s structure ]
{
option: "crypto" | "biz",
votingPowerToken: string | CurrencyID,
threshold: string | number | Big,
proposalFee: string | number | Big,
proposerWhitelist: (string | Address)[],
proposalReviewPeriod: string | number | Big, // unit in seconds
registrationPeriod: string | number | Big, // seconds
preSnapshotPeriod: string | number | Big, // seconds
votingPeriod: string | number | Big, // seconds
postSnapshotPeriod: string | number | Big, // seconds
executionDelayPeriod: string | number | Big, // seconds
turnout: string | number | Big, // percentage
quorum: string | number | Big, // percentage
} option: proposal typevotingPowerToken: token symbol which will be used for calculate voting power and pay proposal fee.threshold: minimum token holdings to proposeproposalFee: the fees to propose, the fee transfer to contract accountproposerWhitelist: people who is authorized to make suggestions. If an empty array, all members can propose.proposalReviewPeriod: delay time before registration-period (in seconds)registrationPeriod: voter registration period (in seconds)preSnapshotPeriod: snap time before voting-period (in seconds)postSnapshotPeriod: snap time after voting-period (in seconds)executionDelayPeriod: time-lock before execution (in seconds)turnout: minimum rate of attendees for a proposal to pass (in percentage)quorum: minimum rate of upvotes for a proposal to pass (in percentage)
example
Last updated