generated from proofoftom/buidler-waffle-typechain-quasar
-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of github.com:clrfund/monorepo into develop
- Loading branch information
Showing
38 changed files
with
1,774 additions
and
242 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
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
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
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
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
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
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 |
---|---|---|
|
@@ -24,7 +24,7 @@ | |
"dependencies": { | ||
"@openzeppelin/contracts": "3.2.0", | ||
"dotenv": "^8.2.0", | ||
"maci-contracts": "0.9.4", | ||
"maci-contracts": "0.10.1", | ||
"solidity-rlp": "2.0.3" | ||
}, | ||
"devDependencies": { | ||
|
@@ -46,9 +46,9 @@ | |
"hardhat": "^2.12.5", | ||
"hardhat-contract-sizer": "^2.6.1", | ||
"ipfs-only-hash": "^2.0.1", | ||
"maci-cli": "0.9.4", | ||
"maci-crypto": "~0.9.1", | ||
"maci-domainobjs": "~0.9.1", | ||
"maci-cli": "npm:@clrfund/[email protected]", | ||
"maci-crypto": "npm:@clrfund/[email protected]", | ||
"maci-domainobjs": "npm:@clrfund/[email protected]", | ||
"solhint": "^3.3.2", | ||
"ts-generator": "^0.0.8", | ||
"ts-node": "^8.8.1", | ||
|
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
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
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
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
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,34 @@ | ||
import { task, types } from 'hardhat/config' | ||
import { MaciParameters } from '../utils/maci' | ||
|
||
task('set-durations', 'Set the signup and voting durations for future rounds') | ||
.addParam('factory', 'The funding round factory contract address') | ||
.addParam('signup', 'Sign up duration in minutes', 60, types.int) | ||
.addParam('voting', 'Voting duration in minutes', 10, types.int) | ||
.setAction(async ({ factory, signup, voting }, { ethers }) => { | ||
const signUpDuration = signup * 60 | ||
const votingDuration = voting * 60 | ||
|
||
const fundingRoundFactory = await ethers.getContractAt( | ||
'FundingRoundFactory', | ||
factory | ||
) | ||
|
||
const maciFactoryAddress = await fundingRoundFactory.maciFactory() | ||
const maciFactory = await ethers.getContractAt( | ||
'MACIFactory', | ||
maciFactoryAddress | ||
) | ||
const maciParameters = await MaciParameters.read(maciFactory) | ||
maciParameters.update({ | ||
signUpDuration, | ||
votingDuration, | ||
}) | ||
const setMaciParametersTx = await fundingRoundFactory.setMaciParameters( | ||
...maciParameters.values() | ||
) | ||
await setMaciParametersTx.wait() | ||
|
||
const newParams = await MaciParameters.read(maciFactory) | ||
console.log('New durations set', newParams) | ||
}) |
Oops, something went wrong.