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

New release #466

Merged
merged 83 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
6a5a1c1
feat: Ethena pool on sepolia
GitGuru7 Dec 10, 2024
7f0605d
feat: updating deployment files
GitGuru7 Dec 10, 2024
1eca225
fix: vtoken symbol
GitGuru7 Dec 11, 2024
be61772
feat: updating deployment files
GitGuru7 Dec 11, 2024
f66fba7
refactor: update RF of USDC of Ethena pool
GitGuru7 Dec 12, 2024
176c87a
feat: updating deployment files
GitGuru7 Dec 12, 2024
3eca687
refactor: update initial supply for Ethena on sepolia
GitGuru7 Dec 13, 2024
8d65088
feat: deployed MockERC4626Token
GitGuru7 Dec 17, 2024
9ddc742
feat: updating deployment files
GitGuru7 Dec 17, 2024
dba17a8
refactor: update risk parameters & redeploy markets
GitGuru7 Dec 18, 2024
7477de4
feat: updating deployment files
GitGuru7 Dec 18, 2024
c66c5b5
feat: add config of Ethena pool on ethereum
GitGuru7 Dec 18, 2024
abfe9c0
Merge pull request #461 from VenusProtocol/main
chechu Dec 18, 2024
ca25f35
fix: support breaking changes in protocol reserve deployment scripts
coreyar Dec 19, 2024
1ecb48f
Merge branch 'develop' into feat/ven-2968
GitGuru7 Dec 19, 2024
390eab4
fixup! fix: support breaking changes in protocol reserve deployment s…
chechu Dec 19, 2024
d1546b9
fix: PR comments
GitGuru7 Dec 19, 2024
f5f5be9
feat: add MockUSDe deployment file
GitGuru7 Dec 19, 2024
5ce862b
feat: updating deployment files
GitGuru7 Dec 19, 2024
a30a86a
fix: support breaking changes in protocol reserve deployment scripts
coreyar Dec 19, 2024
d50f1c9
test: add unsafeAllow internal-function-storage for upgradeable contr…
coreyar Dec 19, 2024
adbda19
Merge pull request #462 from VenusProtocol/support-latest-protocol-re…
coreyar Dec 19, 2024
01239a9
chore(release): 3.7.1-dev.1 [skip ci]
toolsvenus Dec 19, 2024
76f6597
feat: add deployments for ethereum
GitGuru7 Dec 20, 2024
65bf6d2
feat: updating deployment files
GitGuru7 Dec 20, 2024
042dc51
Merge branch 'develop' into feat/ven-2968
chechu Dec 23, 2024
2622a1d
feat: update dependencies
chechu Dec 23, 2024
7e2dce7
feat: add BTC pool deployments on BNB chain
kkirka Dec 12, 2024
36b22c4
chore: update lockfile
kkirka Dec 23, 2024
322b605
feat: updating deployment files
kkirka Dec 23, 2024
1905f69
feat: support deployment dry run on forked network
coreyar Sep 24, 2024
b883fe0
refactor: remove duplicate logs
coreyar Sep 24, 2024
b6adb16
fix: correct symbol in crv reward config
coreyar Sep 24, 2024
b3b84ca
fix: skip networks where PSR hasnt been deployed yet
coreyar Sep 24, 2024
9376046
refactor: remove duplicate scripts
coreyar Sep 24, 2024
926e03a
refactor: check owner before transfering
coreyar Sep 24, 2024
3370818
fix: send to treasury only assets that were minted
coreyar Sep 24, 2024
6667a64
fix: compare lowercase addresses
coreyar Sep 24, 2024
0d9ada0
chore: :shirt:
coreyar Sep 24, 2024
97fe346
docs: udpate readme with forked deployments details
coreyar Oct 16, 2024
0b25aee
refactor: remove lowercasing addresses; compare checksummed addresses
coreyar Oct 16, 2024
048996b
feat: update multifiers for bscmainnet markets
web3rover Dec 26, 2024
c4f388c
feat: deployed bscmainnet IRMs
web3rover Dec 26, 2024
5b1e29b
feat: updating deployment files
web3rover Dec 26, 2024
e57d2be
feat: deployed ethereum IRMs
web3rover Dec 26, 2024
068b2c6
Merge branch 'feat/ven-2975' of github.com:VenusProtocol/isolated-poo…
web3rover Dec 26, 2024
f0945cd
fix: fixed lint
web3rover Dec 26, 2024
4da1b96
feat: updating deployment files
web3rover Dec 26, 2024
3ff3310
feat: added arbitrum IRM
web3rover Dec 26, 2024
2188780
feat: deployed arbitrum IRMs
web3rover Dec 26, 2024
9fe4131
Merge branch 'feat/ven-2975' of github.com:VenusProtocol/isolated-poo…
web3rover Dec 26, 2024
fc1ada6
feat: updating deployment files
web3rover Dec 26, 2024
39249a0
feat: deployed ethereum IRM
web3rover Dec 26, 2024
110f8dc
Merge branch 'feat/ven-2975' of github.com:VenusProtocol/isolated-poo…
web3rover Dec 26, 2024
8ea645c
feat: updating deployment files
web3rover Dec 26, 2024
18d98e2
feat: deployed zksyncmainnet IRMs
web3rover Dec 26, 2024
959bc5c
Merge branch 'feat/ven-2975' of github.com:VenusProtocol/isolated-poo…
web3rover Dec 26, 2024
b92379b
feat: updating deployment files
web3rover Dec 26, 2024
9da5f6c
refactor: add forked env var to .env.example
coreyar Dec 26, 2024
6d0ad6c
refactor: add missing external deployments
coreyar Dec 26, 2024
0491b86
Merge pull request #442 from VenusProtocol/add-forked-deployment
coreyar Dec 26, 2024
a161d9c
chore(release): 3.8.0-dev.1 [skip ci]
toolsvenus Dec 26, 2024
dfb6da3
fix: removed wrong deployments
web3rover Dec 27, 2024
9ce2609
Merge branch 'feat/ven-2975' of github.com:VenusProtocol/isolated-poo…
web3rover Dec 27, 2024
ae189af
feat: updating deployment files
web3rover Dec 27, 2024
c603f79
Merge pull request #457 from VenusProtocol/feat/ven-2968
GitGuru7 Dec 27, 2024
fd4bb5e
chore(release): 3.8.0-dev.2 [skip ci]
toolsvenus Dec 27, 2024
6b59b8c
Merge pull request #458 from VenusProtocol/feat/btc-pool
chechu Dec 30, 2024
807c3a8
chore(release): 3.8.0-dev.3 [skip ci]
toolsvenus Dec 30, 2024
9dc73dc
fix: merge conflict
web3rover Dec 30, 2024
3f418d0
feat: updating deployment files
web3rover Dec 30, 2024
6a1664c
fix: fixed mantissaToBps params
web3rover Dec 30, 2024
5d98ed0
fix: merge conflict
web3rover Dec 30, 2024
9dadc77
Merge pull request #464 from VenusProtocol/feat/ven-2975
web3rover Jan 2, 2025
1ad2d73
chore(release): 3.8.0-dev.4 [skip ci]
toolsvenus Jan 2, 2025
3fda9a5
fix: support getNetworkName for zkSync
kkirka Jan 20, 2025
970486b
feat: tag testnets and deploy mock tokens on testnets
kkirka Jan 20, 2025
b4d72dd
feat: use timelocks instead of guardians for zkSync deployments
kkirka Jan 20, 2025
37dac6b
feat: support ERC-4626 mock tokens
kkirka Jan 20, 2025
feeb90c
feat: add vwUSDM_Core deployment to zkSync
kkirka Jan 20, 2025
b62c931
feat: updating deployment files
kkirka Jan 20, 2025
6032ccc
Merge pull request #465 from VenusProtocol/feat/zksync-wusdm
kkirka Jan 22, 2025
1181771
chore(release): 3.8.0-dev.5 [skip ci]
toolsvenus Jan 22, 2025
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: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ ETHERSCAN_API_KEY=
REPORT_GAS=

# Set to true or false to deploy contracts based on timestamp or block
IS_TIME_BASED_DEPLOYMENT=false
IS_TIME_BASED_DEPLOYMENT=false
HARDHAT_FORK_NETWORK=
2 changes: 1 addition & 1 deletion .eslint-tsconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "./tsconfig.json",
"include": ["jest.config.js", ".eslintrc.js", "tests", "scenario", "deploy", "docgen-templates", "commitlint.config.js", "./hardhat.config.zksync.ts"]
"include": ["jest.config.js", ".eslintrc.js", "tests", "scenario", "deploy", "docgen-templates", "commitlint.config.js", "./hardhat.config.zksync.ts", "type-extensions.ts"]
}
101 changes: 101 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,104 @@
## [3.8.0-dev.5](https://github.com/VenusProtocol/isolated-pools/compare/v3.8.0-dev.4...v3.8.0-dev.5) (2025-01-22)


### Features

* add vwUSDM_Core deployment to zkSync ([feeb90c](https://github.com/VenusProtocol/isolated-pools/commit/feeb90c8c15b207a988b8acdd3e9ac309c84a545))
* support ERC-4626 mock tokens ([37dac6b](https://github.com/VenusProtocol/isolated-pools/commit/37dac6b4319b37f4dd3a5cd32915605ce41bf285))
* tag testnets and deploy mock tokens on testnets ([970486b](https://github.com/VenusProtocol/isolated-pools/commit/970486b17a31d99b33f8f43fa0a19b7e222c1adf))
* updating deployment files ([b62c931](https://github.com/VenusProtocol/isolated-pools/commit/b62c9314ba83c74c311a96b037b0bb8161e5d8ce))
* use timelocks instead of guardians for zkSync deployments ([b4d72dd](https://github.com/VenusProtocol/isolated-pools/commit/b4d72dd13a43e03486d0be238d72c8676f507de6))


### Bug Fixes

* support getNetworkName for zkSync ([3fda9a5](https://github.com/VenusProtocol/isolated-pools/commit/3fda9a55216b34db394b68627e430b5d43afffb4))

## [3.8.0-dev.4](https://github.com/VenusProtocol/isolated-pools/compare/v3.8.0-dev.3...v3.8.0-dev.4) (2025-01-02)


### Features

* added arbitrum IRM ([3ff3310](https://github.com/VenusProtocol/isolated-pools/commit/3ff33101a782d2e863d36638fde64b3124b30e6e))
* deployed arbitrum IRMs ([2188780](https://github.com/VenusProtocol/isolated-pools/commit/21887808706b7ce278e858c853f5476cfbcdfed4))
* deployed bscmainnet IRMs ([c4f388c](https://github.com/VenusProtocol/isolated-pools/commit/c4f388c001ae6537136ea0a6cd5ffc1706feb733))
* deployed ethereum IRM ([39249a0](https://github.com/VenusProtocol/isolated-pools/commit/39249a081e125216c1201af6dd8526af9e4e8433))
* deployed ethereum IRMs ([e57d2be](https://github.com/VenusProtocol/isolated-pools/commit/e57d2be44aca87055eef949269dfae391c34b106))
* deployed zksyncmainnet IRMs ([18d98e2](https://github.com/VenusProtocol/isolated-pools/commit/18d98e295af98a76d1748d94fe01b42d8e4423f1))
* update multifiers for bscmainnet markets ([048996b](https://github.com/VenusProtocol/isolated-pools/commit/048996b9cec4075b4ec6e28806ef40d599b8ae9a))
* updating deployment files ([3f418d0](https://github.com/VenusProtocol/isolated-pools/commit/3f418d03db1d1dcc5ae5ebe921852b78e47cf679))
* updating deployment files ([ae189af](https://github.com/VenusProtocol/isolated-pools/commit/ae189af3fb012ec6886562708e11b0cafa49e8f7))
* updating deployment files ([b92379b](https://github.com/VenusProtocol/isolated-pools/commit/b92379b1e734d44b11bac1cfe0047a26b1850b5a))
* updating deployment files ([8ea645c](https://github.com/VenusProtocol/isolated-pools/commit/8ea645c50fc8d119993714020de8c25255917d1f))
* updating deployment files ([fc1ada6](https://github.com/VenusProtocol/isolated-pools/commit/fc1ada665a46f42869a2521d121b489db2ca921c))
* updating deployment files ([4da1b96](https://github.com/VenusProtocol/isolated-pools/commit/4da1b969d3cb61f7cf82ce5c788cceabf3b2363f))
* updating deployment files ([5b1e29b](https://github.com/VenusProtocol/isolated-pools/commit/5b1e29b73ced945f0d0294d854fc895ad493d3db))


### Bug Fixes

* fixed lint ([f0945cd](https://github.com/VenusProtocol/isolated-pools/commit/f0945cd85521f10db1c6d7285f9af7883fbe91dd))
* fixed mantissaToBps params ([6a1664c](https://github.com/VenusProtocol/isolated-pools/commit/6a1664c2947193299485c6e329b7a680de29c7c2))
* merge conflict ([5d98ed0](https://github.com/VenusProtocol/isolated-pools/commit/5d98ed083fcbc416e74fef113d0c9359f6371221))
* merge conflict ([9dc73dc](https://github.com/VenusProtocol/isolated-pools/commit/9dc73dc0a3cab4dc2efd2680d48bf558e1438d9f))
* removed wrong deployments ([dfb6da3](https://github.com/VenusProtocol/isolated-pools/commit/dfb6da3c46fbcce70519aa73098469e54e386718))

## [3.8.0-dev.3](https://github.com/VenusProtocol/isolated-pools/compare/v3.8.0-dev.2...v3.8.0-dev.3) (2024-12-30)


### Features

* add BTC pool deployments on BNB chain ([7e2dce7](https://github.com/VenusProtocol/isolated-pools/commit/7e2dce7f0d06fcc7f1fadfa3bf7ccc813eea5833))
* updating deployment files ([322b605](https://github.com/VenusProtocol/isolated-pools/commit/322b6052025144f27a5dbeb315400164f1e65970))

## [3.8.0-dev.2](https://github.com/VenusProtocol/isolated-pools/compare/v3.8.0-dev.1...v3.8.0-dev.2) (2024-12-27)


### Features

* deployed MockERC4626Token ([8d65088](https://github.com/VenusProtocol/isolated-pools/commit/8d650882a5582ea823ab7e3119693729750e8a4e))
* add config of Ethena pool on ethereum ([c66c5b5](https://github.com/VenusProtocol/isolated-pools/commit/c66c5b5f6cee88fdb66575d0d9194fb91b2ed6a7))
* add deployments for ethereum ([76f6597](https://github.com/VenusProtocol/isolated-pools/commit/76f6597dd266ee488532885c03981fc015ab6f05))
* add MockUSDe deployment file ([f5f5be9](https://github.com/VenusProtocol/isolated-pools/commit/f5f5be977bfd4cc34b83bb854f12b818ec64ceeb))
* Ethena pool on sepolia ([6a5a1c1](https://github.com/VenusProtocol/isolated-pools/commit/6a5a1c1185e3c55a9617499dde7e00b41a2e73e6))
* update dependencies ([2622a1d](https://github.com/VenusProtocol/isolated-pools/commit/2622a1d1b11260863d9aeca40aa16fee4e6f015e))
* updating deployment files ([65bf6d2](https://github.com/VenusProtocol/isolated-pools/commit/65bf6d27c8e6ceec880ff74776fc0b86f4f8ec2b))
* updating deployment files ([5ce862b](https://github.com/VenusProtocol/isolated-pools/commit/5ce862bb1e774443cd5dfbddb9e87d9213dfb985))
* updating deployment files ([7477de4](https://github.com/VenusProtocol/isolated-pools/commit/7477de43476c924cf6c9f90fb94d3367ee99f641))
* updating deployment files ([9ddc742](https://github.com/VenusProtocol/isolated-pools/commit/9ddc74298592f622ea527db0f1b339925ca731af))
* updating deployment files ([176c87a](https://github.com/VenusProtocol/isolated-pools/commit/176c87a16678b77c7826218082ae42e9715908cc))
* updating deployment files ([be61772](https://github.com/VenusProtocol/isolated-pools/commit/be617727ce777e7bf486ebce2bc250d4329eeb46))
* updating deployment files ([7f0605d](https://github.com/VenusProtocol/isolated-pools/commit/7f0605dfbe075b1f25ce90ae00a398fdc8296c27))


### Bug Fixes

* PR comments ([d1546b9](https://github.com/VenusProtocol/isolated-pools/commit/d1546b947ef23e23b6755a6ad44b7f139f9b8d70))
* vtoken symbol ([1eca225](https://github.com/VenusProtocol/isolated-pools/commit/1eca2254ea75ffe85182824411d7bd0b3f926049))

## [3.8.0-dev.1](https://github.com/VenusProtocol/isolated-pools/compare/v3.7.1-dev.1...v3.8.0-dev.1) (2024-12-26)


### Features

* support deployment dry run on forked network ([1905f69](https://github.com/VenusProtocol/isolated-pools/commit/1905f69e0b6065309d3975f73626c8a576f6a566))


### Bug Fixes

* compare lowercase addresses ([6667a64](https://github.com/VenusProtocol/isolated-pools/commit/6667a645ac397938407bfbaf5cb5604f733aad45))
* correct symbol in crv reward config ([b6adb16](https://github.com/VenusProtocol/isolated-pools/commit/b6adb1648d7d34d28053e5c65c99cabd2d4b1cee))
* send to treasury only assets that were minted ([3370818](https://github.com/VenusProtocol/isolated-pools/commit/3370818fae202fd7a61fc8c389375a9bdd6a40ba))
* skip networks where PSR hasnt been deployed yet ([b3b84ca](https://github.com/VenusProtocol/isolated-pools/commit/b3b84ca117e8869cb0886f2534e343e8db08280e))

## [3.7.1-dev.1](https://github.com/VenusProtocol/isolated-pools/compare/v3.7.0...v3.7.1-dev.1) (2024-12-19)


### Bug Fixes

* support breaking changes in protocol reserve deployment scripts ([a30a86a](https://github.com/VenusProtocol/isolated-pools/commit/a30a86abe11cfec55bdf45829856d701db01e9b8))
* support breaking changes in protocol reserve deployment scripts ([ca25f35](https://github.com/VenusProtocol/isolated-pools/commit/ca25f351f3f4bec3e02ffb47e35162bd50b81a73))

## [3.7.0](https://github.com/VenusProtocol/isolated-pools/compare/v3.6.0...v3.7.0) (2024-12-18)


Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ npx hardhat deploy
- In the deployment scripts you have added `tags` for example: - `func.tags = ["MockTokens"];`
- Once this is done, adding `--tags "<tag_name>,<tag_name>..."` to the deployment command will execute only the scripts containing the tags.

### Dry Run / Forked Deployments

To simulate what contracts would be deployed on a given network the deployment scripts support running on a forked network. To run the deployment scripts on a forked network the `HARDHAT_FORK_NETWORK` env variable needs to be set.

For example

```bash
HARDHAT_FORK_NETWORK=ethereum npx hardhat deploy
```

### Deployed Contracts

Deployed contract abis and addresses are exported in the `deployments` directory. To create a summary export of all contracts deployed to a network run
Expand Down
13 changes: 13 additions & 0 deletions contracts/test/Mocks/MockERC4626Token.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { MockToken } from "./MockToken.sol";

contract MockERC4626Token is MockToken {
constructor(string memory name_, string memory symbol_, uint8 decimals_) MockToken(name_, symbol_, decimals_) {}

function convertToAssets(uint256 shares) external pure returns (uint256) {
return shares;
}
}
9 changes: 6 additions & 3 deletions deploy/001-deploy-mock-tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@ 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 }: any = hre;
const { deployments, getNamedAccounts } = hre;
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();

const { tokensConfig } = await getConfig(hre.network.name);
const { tokensConfig } = await getConfig(hre.getNetworkName());

for (const token of tokensConfig) {
if (token.isMock) {
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,4 +28,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

func.tags = ["MockTokens"];

func.skip = skipMainnets();

export default func;
24 changes: 17 additions & 7 deletions deploy/004-swap-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const vbnbAddress = (await deployments.get("vBNB")).address;
// Pancake Factory doesn't exist on hardhat so we are using the testnet address
const pancakeFactoryAddress =
hre.network.name === "bscmainnet"
hre.getNetworkName() === "bscmainnet"
? Mainnet.contracts.pancakeFactory.address
: Testnet.contracts.pancakeFactory.address;

Expand Down Expand Up @@ -48,7 +48,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
autoMine: true,
skipIfAlreadyDeployed: true,
});
if (hre.network.name !== "bsctestnet") {
if (hre.getNetworkName() !== "bsctestnet") {
const comptrollerStablecoinsAddresses = (await deployments.get("Comptroller_Stablecoins")).address;
await deploy("SwapRouter_Stablecoins", {
contract: "SwapRouter",
Expand Down Expand Up @@ -89,16 +89,26 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
autoMine: true,
skipIfAlreadyDeployed: true,
});

const comptrollerBTCAddresses = (await deployments.get("Comptroller_BTC")).address;
await deploy("SwapRouter_BTC", {
contract: "SwapRouter",
from: deployer,
args: [wBNBAddress, pancakeFactoryAddress, comptrollerBTCAddresses, vbnbAddress],
log: true,
autoMine: true,
skipIfAlreadyDeployed: true,
});
};

func.tags = ["SwapRouter", "il"];
// deploySwapRouter.skip = async (hre: HardhatRuntimeEnvironment) => hre.network.live;
// Pancake Factory is not deployed on the local network
func.skip = async hre =>
hre.network.name === "sepolia" ||
hre.network.name === "hardhat" ||
hre.network.name === "opbnbtestnet" ||
hre.network.name === "opbnbmainnet" ||
hre.network.name === "ethereum";
hre.getNetworkName() === "sepolia" ||
hre.getNetworkName() === "hardhat" ||
hre.getNetworkName() === "opbnbtestnet" ||
hre.getNetworkName() === "opbnbmainnet" ||
hre.getNetworkName() === "ethereum";

export default func;
5 changes: 2 additions & 3 deletions deploy/006-deploy-pool-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deployments, getNamedAccounts } = hre;
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();
const { preconfiguredAddresses } = await getConfig(hre.network.name);
const { preconfiguredAddresses } = await getConfig(hre.getNetworkName());
const accessControlManagerAddress = await toAddress(
preconfiguredAddresses.AccessControlManager || "AccessControlManager",
hre,
);
const proxyOwnerAddress = await toAddress(preconfiguredAddresses.NormalTimelock || "account:deployer", hre);
const proxyOwnerAddress = await toAddress(preconfiguredAddresses.NormalTimelock || "account:deployer");

// The reason for this is that the contracts `OptimizedTransparentUpgradeableProxy` and `DefaultProxyAdmin` that the hardhat-deploy
// plugin fetches from the artifact is not zk compatible causing the deployments to fail. So we bought it one level up to our repo,
Expand Down
2 changes: 1 addition & 1 deletion deploy/007-deploy-pool-lens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();

const { isTimeBased, blocksPerYear } = getBlockOrTimestampBasedDeploymentInfo(hre.network.name);
const { isTimeBased, blocksPerYear } = getBlockOrTimestampBasedDeploymentInfo(hre.getNetworkName());

await deploy("PoolLens", {
from: deployer,
Expand Down
9 changes: 4 additions & 5 deletions deploy/008-deploy-comptrollers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deployments, getNamedAccounts } = hre;
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();
const deploymentConfig = await getConfig(hre.network.name);
const deploymentConfig = await getConfig(hre.getNetworkName());
const { poolConfig, preconfiguredAddresses } = deploymentConfig;
const poolRegistry = await ethers.getContract("PoolRegistry");
const accessControlManagerAddress = await toAddress(
preconfiguredAddresses.AccessControlManager || "AccessControlManager",
hre,
);
const maxLoopsLimit = 100;

Expand All @@ -25,6 +24,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
args: [poolRegistry.address],
log: true,
autoMine: true,
skipIfAlreadyDeployed: true,
});

// Comptroller Beacon
Expand All @@ -37,12 +37,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
skipIfAlreadyDeployed: true,
});

const unregisteredPools = await getUnregisteredPools(poolConfig, hre);
const unregisteredPools = await getUnregisteredPools(poolConfig);
for (const pool of unregisteredPools) {
// Deploying a proxy for Comptroller
console.log(`Deploying a proxy for Comptroller of the pool ${pool.name}`);
const Comptroller = await ethers.getContractFactory("Comptroller");

// Deploying a proxy for Comptroller
await deploy(`Comptroller_${pool.id}`, {
from: deployer,
contract: "BeaconProxy",
Expand Down
Loading