Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions deploy/000-psr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { DeployFunction } from "hardhat-deploy/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";

import { ADDRESS_ONE } from "../helpers/utils";
import { verifyDeployment } from "../helpers/verify";

const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const {
Expand Down Expand Up @@ -67,6 +68,8 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
await tx.wait();
console.log("Transferred ownership of PSR to Timelock");
}

await verifyDeployment(hre, "ProtocolShareReserve");
};

func.tags = ["ProtocolShareReserve"];
Expand Down
15 changes: 10 additions & 5 deletions deploy/001-risk-fund-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ import { ethers } from "hardhat";
import { DeployFunction } from "hardhat-deploy/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";

const func: DeployFunction = async ({
network: { live },
getNamedAccounts,
deployments,
}: HardhatRuntimeEnvironment) => {
import { verifyDeployment } from "../helpers/verify";

const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const {
network: { live },
getNamedAccounts,
deployments,
} = hre;
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();

Expand Down Expand Up @@ -40,6 +43,8 @@ const func: DeployFunction = async ({
await tx.wait();
}
}

await verifyDeployment(hre, "RiskFundV2");
};

func.tags = ["RiskFundV2"];
Expand Down
14 changes: 9 additions & 5 deletions deploy/002-risk-fund-converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@ import { DeployFunction } from "hardhat-deploy/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";

import { ADDRESS_ONE } from "../helpers/utils";
import { verifyDeployment } from "../helpers/verify";

const MIN_AMOUNT_TO_CONVERT = parseUnits("10", 18);

const getTokenOrMockName = (name: string, live: boolean) => {
return `${live ? "" : "Mock"}${name}`;
};

const func: DeployFunction = async ({
network: { live },
getNamedAccounts,
deployments,
}: HardhatRuntimeEnvironment) => {
const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const {
network: { live },
getNamedAccounts,
deployments,
} = hre;
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();

Expand Down Expand Up @@ -82,6 +84,8 @@ const func: DeployFunction = async ({
await tx.wait();
console.log(`Transferred ownership of RiskFundConverter to Timelock`);
}

await verifyDeployment(hre, "RiskFundConverter");
};

func.tags = ["RiskFundConverter"];
Expand Down
11 changes: 10 additions & 1 deletion deploy/003-xvs-vault-treasury.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import { ethers } from "hardhat";
import { HardhatRuntimeEnvironment } from "hardhat/types";

const func = async ({ network: { live }, getNamedAccounts, deployments }: HardhatRuntimeEnvironment) => {
import { verifyDeployment } from "../helpers/verify";

const func = async (hre: HardhatRuntimeEnvironment) => {
const {
network: { live },
getNamedAccounts,
deployments,
} = hre;
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();

Expand Down Expand Up @@ -34,6 +41,8 @@ const func = async ({ network: { live }, getNamedAccounts, deployments }: Hardha
await tx.wait();
console.log("Transferred ownership of XVSVaultTreasury to Timelock");
}

await verifyDeployment(hre, "XVSVaultTreasury");
};

func.tags = ["XVSVaultTreasury"];
Expand Down
5 changes: 5 additions & 0 deletions deploy/004-single-token-converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { DeployFunction } from "hardhat-deploy/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";

import { ADDRESS_ONE } from "../helpers/utils";
import { verifyDeployment } from "../helpers/verify";

type NETWORK = "hardhat" | "bsctestnet" | "bscmainnet" | "sepolia" | "ethereum";
interface BaseAssets {
Expand Down Expand Up @@ -96,6 +97,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
autoMine: true,
skipIfAlreadyDeployed: true,
});
await verifyDeployment(hre, "SingleTokenConverterImp");

const SingleTokenConverterBeacon: DeployResult = await deploy("SingleTokenConverterBeacon", {
contract: "UpgradeableBeacon",
Expand All @@ -105,6 +107,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
autoMine: true,
skipIfAlreadyDeployed: true,
});
await verifyDeployment(hre, "SingleTokenConverterBeacon");

const SingleTokenConverter = await ethers.getContractFactory("SingleTokenConverter");

Expand Down Expand Up @@ -139,6 +142,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
await tx.wait();
console.log(`Transferred ownership of ${singleTokenConverterName} to Timelock: ` + proxyOwnerAddress);
}

await verifyDeployment(hre, singleTokenConverterName);
}
};

Expand Down
11 changes: 10 additions & 1 deletion deploy/005-converter-network.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import { ethers } from "hardhat";
import { HardhatRuntimeEnvironment } from "hardhat/types";

import { verifyDeployment } from "../helpers/verify";

const MAX_LOOPS_LIMIT = 20;

const func = async ({ network: { live }, getNamedAccounts, deployments }: HardhatRuntimeEnvironment) => {
const func = async (hre: HardhatRuntimeEnvironment) => {
const {
network: { live },
getNamedAccounts,
deployments,
} = hre;
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();

Expand Down Expand Up @@ -33,6 +40,8 @@ const func = async ({ network: { live }, getNamedAccounts, deployments }: Hardha
await tx.wait();
console.log("Transferred ownership of ConverterNetwork to Timelock");
}

await verifyDeployment(hre, "ConverterNetwork");
};

func.tags = ["ConverterNetwork", "Converters"];
Expand Down
3 changes: 3 additions & 0 deletions deploy/006-risk-fund-buyback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { DeployFunction } from "hardhat-deploy/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";

import { TOKEN_BUYBACK_DEFAULTS } from "../helpers/deploymentConfig";
import { verifyDeployment } from "../helpers/verify";

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deployments, getNamedAccounts } = hre;
Expand Down Expand Up @@ -54,6 +55,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
console.log(`Ownership transfer already pending to ${pendingOwner}`);
}
}

await verifyDeployment(hre, "RiskFundBuyback");
};

func.tags = ["RiskFundBuyback"];
Expand Down
3 changes: 3 additions & 0 deletions deploy/007-prime-buyback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { DeployFunction } from "hardhat-deploy/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";

import { TOKEN_BUYBACK_DEFAULTS } from "../helpers/deploymentConfig";
import { verifyDeployment } from "../helpers/verify";

// U token is not registered in `@venusprotocol/venus-protocol` external deployments.
// Hard-coded per-network so TokenBuyback's immutable BASE_ASSET can be set at deploy.
Expand Down Expand Up @@ -68,6 +69,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
console.log(`Ownership transfer of ${instanceName} already pending to ${pendingOwner}`);
}
}

await verifyDeployment(hre, instanceName);
}
};

Expand Down
3 changes: 3 additions & 0 deletions deploy/008-xvs-buyback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { DeployFunction } from "hardhat-deploy/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";

import { TOKEN_BUYBACK_DEFAULTS } from "../helpers/deploymentConfig";
import { verifyDeployment } from "../helpers/verify";

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deployments, getNamedAccounts } = hre;
Expand Down Expand Up @@ -54,6 +55,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
console.log(`Ownership transfer already pending to ${pendingOwner}`);
}
}

await verifyDeployment(hre, "XVSBuyback");
};

func.tags = ["XVSBuyback"];
Expand Down
3 changes: 3 additions & 0 deletions deploy/009-treasury-buyback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { DeployFunction } from "hardhat-deploy/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";

import { TOKEN_BUYBACK_DEFAULTS } from "../helpers/deploymentConfig";
import { verifyDeployment } from "../helpers/verify";

// U token is not registered in `@venusprotocol/venus-protocol` external deployments.
// Hard-coded per-network so TokenBuyback's immutable BASE_ASSET can be set at deploy.
Expand Down Expand Up @@ -72,6 +73,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
console.log(`Ownership transfer of ${instanceName} already pending to ${pendingOwner}`);
}
}

await verifyDeployment(hre, instanceName);
}
};

Expand Down
Loading
Loading