-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
64 additions
and
19 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 |
---|---|---|
|
@@ -5,4 +5,5 @@ node_modules/ | |
env/ | ||
.env | ||
.history | ||
coverage* | ||
coverage* | ||
deployments |
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,28 @@ | ||
import { DeployFunction } from "hardhat-deploy/types"; | ||
import { HardhatRuntimeEnvironment } from "hardhat/types"; | ||
|
||
const FIRST_ADDRESS = "0x0000000000000000000000000000000000000001"; | ||
|
||
const deploy: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const { deployments, getNamedAccounts } = hre; | ||
const { deployer } = await getNamedAccounts(); | ||
const { deploy } = deployments; | ||
const args = [FIRST_ADDRESS, FIRST_ADDRESS, FIRST_ADDRESS, 1, 0, 60, 0, 0]; | ||
|
||
await deploy("DaoModuleERC20", { | ||
from: deployer, | ||
args, | ||
log: true, | ||
deterministicDeployment: true, | ||
}); | ||
|
||
await deploy("DaoModuleETH", { | ||
from: deployer, | ||
args, | ||
log: true, | ||
deterministicDeployment: true, | ||
}); | ||
}; | ||
|
||
deploy.tags = ["dao-module"]; | ||
export default deploy; |
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,32 @@ | ||
import { HardhatRuntimeEnvironment } from "hardhat/types"; | ||
import { DeployFunction } from "hardhat-deploy/types"; | ||
import { TASK_ETHERSCAN_VERIFY } from "hardhat-deploy"; | ||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const { run } = hre; | ||
if (!["rinkeby", "mainnet"].includes(hre.network.name)) { | ||
return; | ||
} | ||
|
||
if (!process.env.INFURA_KEY) { | ||
console.log( | ||
`Could not find Infura key in env, unable to connect to network ${hre.network.name}` | ||
); | ||
return; | ||
} | ||
|
||
console.log("Verification of DAO Modules in etherscan..."); | ||
console.log("Waiting for 1 minute before verifying contracts..."); | ||
// Etherscan needs some time to process before trying to verify. | ||
await new Promise((resolve) => setTimeout(resolve, 60000)); | ||
|
||
console.log("Starting to verify now"); | ||
|
||
await run(TASK_ETHERSCAN_VERIFY, { | ||
apiKey: process.env.ETHERSCAN_KEY_API, | ||
license: "GPL-3.0", | ||
solcInput: true, | ||
forceLicense: true, // we need this because contracts license is LGPL-3.0-only | ||
}); | ||
}; | ||
export default func; |
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