Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VEN-3017]: Add wUSDM to zkSync Core pool #465

Merged
merged 6 commits into from
Jan 22, 2025
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
5 changes: 3 additions & 2 deletions deploy/001-deploy-mock-tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { DeployFunction } from "hardhat-deploy/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";

import { getConfig } from "../helpers/deploymentConfig";
import { skipMainnets } from "../helpers/deploymentUtils";

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deployments, getNamedAccounts } = hre;
Expand All @@ -15,7 +16,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const contractName = `Mock${token.symbol}`;
await deploy(contractName, {
from: deployer,
contract: "MockToken",
contract: token.standard === "ERC-4626" ? "MockERC4626Token" : "MockToken",
args: [token.name, token.symbol, token.decimals],
log: true,
autoMine: true, // speed up deployment on local network (ganache, hardhat), no effect on live networks
Expand All @@ -27,6 +28,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

func.tags = ["MockTokens"];

func.skip = async hre => hre.network.live;
func.skip = skipMainnets();

export default func;
11 changes: 10 additions & 1 deletion deploy/009-deploy-vtokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,19 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { isTimeBased, blocksPerYear } = getBlockOrTimestampBasedDeploymentInfo(hre.network.name);
const maxBorrowRateMantissa = getMaxBorrowRateMantissa(hre.network.name);
await timelocksDeployment(hre);
const timelock = await toAddress(preconfiguredAddresses.NormalTimelock || "NormalTimelock");
const accessControlManagerAddress = await toAddress(
preconfiguredAddresses.AccessControlManager || "AccessControlManager",
);

let vTokenOwner = timelock;
if (!vTokenOwner || !hre.network.live) {
console.warn("Using deployer as vToken owner");
vTokenOwner = deployer;
} else {
console.warn("Using timelock as vToken owner");
}

console.log("Is Time based", isTimeBased);

// VToken Beacon
Expand Down Expand Up @@ -176,7 +185,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
name,
symbol,
vTokenDecimals,
preconfiguredAddresses.NormalTimelock || deployer, // admin
vTokenOwner,
accessControlManagerAddress,
[AddressOne, protocolShareReserveAddress],
reserveFactor,
Expand Down
Loading
Loading