updateModelConfig(contract, sender, data, currency)
Feature
Return raw operation to update exist DAO model. Note : Only contract owner or handler can execute.
Parameters
string contract address,
string sender,
object daoData, // same with daoData of registerModel()
string currency
Return Value
object update model config operation
example
const contractAddress = "0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca";
const sender = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const currencyID = "MCC";
const daoData = {
option: "crypto",
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 operation = mitum.dao.updateModelConfig(contractAddress, sender, daoData, currencyID);
console.log(operation);
//output
Operation {
id: 'mitum',
fact: UpdateModelConfigFact {
hint: Hint { s: 'mitum-dao-update-model-config-operation-fact' },
token: Token { s: '2024-06-25 23:47:56.386 +0000 UTC' },
_hash: <Buffer e5 a3 89 07 bb e4 16 77 43 37 cd 0a 61 9d ff 01 6d 37 c3 08 70 e5 52 b7 8a f0 b8 1b 0f 58 5c 0a>,
sender: Address {
s: '0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca',
type: 'mitum'
},
contract: Address {
s: '0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca',
type: 'mitum'
},
currency: CurrencyID { s: 'MCC' },
option: 'crypto',
policy: DAOPolicy {
hint: [Hint],
votingPowerToken: [CurrencyID],
threshold: [Big],
proposalFee: [Fee],
proposerWhitelist: [Whitelist],
proposalReviewPeriod: [Big],
registrationPeriod: [Big],
preSnapshotPeriod: [Big],
votingPeriod: [Big],
postSnapshotPeriod: [Big],
executionDelayPeriod: [Big],
turnout: [Big],
quorum: [Big]
}
},
hint: Hint { s: 'mitum-dao-update-model-config-operation' },
_factSigns: [],
_hash: <Buffer >
}Last updated