-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from DemocracyEarth/dao
DAO deploy script
- Loading branch information
Showing
2 changed files
with
2,609 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
const deploymentParams = require('../deployment-params'); | ||
|
||
async function main() { | ||
|
||
const [deployer] = await ethers.getSigners(); | ||
|
||
console.log( | ||
"Deploying DAO with the account:", | ||
deployer.address | ||
); | ||
|
||
console.log("Account balance:", (await deployer.getBalance()).toString()); | ||
|
||
const DAO = await ethers.getContractFactory("Moloch"); | ||
console.log("Deploying DAO..."); | ||
|
||
const dao = await DAO.deploy( | ||
deploymentParams.SUMMONER, | ||
[deploymentParams.TOKEN], | ||
deploymentParams.PERIOD_DURATION_IN_SECONDS, | ||
deploymentParams.VOTING_DURATON_IN_PERIODS, | ||
deploymentParams.GRACE_DURATON_IN_PERIODS, | ||
deploymentParams.PROPOSAL_DEPOSIT, | ||
deploymentParams.DILUTION_BOUND, | ||
deploymentParams.PROCESSING_REWARD | ||
); | ||
|
||
console.log("DAO deployed to:", dao.address); | ||
} | ||
|
||
main() | ||
.then(() => process.exit(0)) | ||
.catch(error => { | ||
console.error(error); | ||
process.exit(1); | ||
}); |
Oops, something went wrong.