-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
97033e8
commit eca4855
Showing
13 changed files
with
7,080 additions
and
160 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 { HardhatRuntimeEnvironment } from "hardhat/types"; | ||
import { DeployFunction } from "hardhat-deploy/types"; | ||
import { deployments, hardhatArguments } from "hardhat"; | ||
import "hardhat-deploy/dist/src/type-extensions"; | ||
|
||
const delegatorFactory: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
if (hardhatArguments.network === "rinkeby") { | ||
console.log("=====Rinkeby Deploy====="); | ||
const delegatorFactory = await deployments.getOrNull("DelegatorFactory"); | ||
const { log } = deployments; | ||
if (!delegatorFactory) { | ||
const namedAccounts = await hre.getNamedAccounts(); | ||
|
||
const stakingContract = "0xAa715DbD2ED909B7B7727dC864F3B78276D14A19"; // CTX | ||
const waitTime = 604800; // 7 days | ||
const guardian = "0xf77E8426EceF4A44D5Ec8986FB525127BaD32Fd1"; // Multi sign | ||
|
||
const delegatorFactoryDeployment = await deployments.deploy("DelegatorFactory", { | ||
contract: "DelegatorFactory", | ||
from: namedAccounts.deployer, | ||
args: [stakingContract, stakingContract, waitTime, guardian], | ||
skipIfAlreadyDeployed: true, | ||
log: true, | ||
}); | ||
log( | ||
`DelegatorFactory deployed at ${delegatorFactoryDeployment.address} for ${delegatorFactoryDeployment.receipt?.gasUsed}` | ||
); | ||
} else { | ||
log("DelegatorFactory already deployed"); | ||
} | ||
} | ||
}; | ||
|
||
export default delegatorFactory; |
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 @@ | ||
4 |
Oops, something went wrong.