-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy path8-deploy-vote.js
More file actions
42 lines (33 loc) · 1.44 KB
/
8-deploy-vote.js
File metadata and controls
42 lines (33 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import sdk from "./1-initialize-sdk.js";
(async () => {
try {
const voteContractAddress = await sdk.deployer.deployVote({
// Give your governance contract a name.
name: "My amazing DAO",
// This is the location of our governance token, our ERC-20 contract!
voting_token_address: "0x6B8f666c5F843056DEfA2ef8124A562E5496d141",
// These parameters are specified in number of blocks.
// Assuming block time of around 13.14 seconds (for Ethereum)
// After a proposal is created, when can members start voting?
// For now, we set this to immediately.
voting_delay_in_blocks: 0,
// How long do members have to vote on a proposal when it's created?
// we will set it to 1 day = 6570 blocks
voting_period_in_blocks: 6570,
// The minimum % of the total supply that need to vote for
// the proposal to be valid after the time for the proposal has ended.
voting_quorum_fraction: 0,
// What's the minimum # of tokens a user needs to be allowed to create a proposal?
// I set it to 0. Meaning no tokens are required for a user to be allowed to
// create a proposal.
proposal_token_threshold: 0,
});
console.log(
"✅ Successfully deployed vote contract, address:",
voteContractAddress,
);
} catch (err) {
console.error("Failed to deploy vote contract", err);
}
})();
// voting address 0x74FB3B7259CE850fA3A2EED3Bf9F610fC9756164