Skip to content

Commit

Permalink
rinkeby deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
crisgarner committed Sep 8, 2021
1 parent 97033e8 commit eca4855
Show file tree
Hide file tree
Showing 13 changed files with 7,080 additions and 160 deletions.
534 changes: 534 additions & 0 deletions cache/solidity-files-cache.json

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions deploy/rinkeby/000_delegator_factory.ts
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;
1 change: 1 addition & 0 deletions deployments/rinkeby/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4
Loading

0 comments on commit eca4855

Please sign in to comment.