@venusprotocol/venus-protocol 7.5.0-dev.1 → 7.5.0-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deploy/009-configure-prime.ts +36 -0
- package/deploy/009-deploy-prime.ts +20 -9
- package/deployments/ethereum/Prime.json +2047 -0
- package/deployments/ethereum/PrimeLiquidityProvider.json +1118 -0
- package/deployments/ethereum/PrimeLiquidityProvider_Implementation.json +1415 -0
- package/deployments/ethereum/PrimeLiquidityProvider_Proxy.json +277 -0
- package/deployments/ethereum/Prime_Implementation.json +2949 -0
- package/deployments/ethereum/Prime_Proxy.json +287 -0
- package/deployments/ethereum/solcInputs/0e89febeebc7444140de8e67c9067d2c.json +78 -0
- package/deployments/ethereum/solcInputs/75246dd56192f1ba5a6df71cd4c4757d.json +237 -0
- package/deployments/ethereum.json +5823 -0
- package/deployments/ethereum_addresses.json +6 -0
- package/deployments/sepolia/Prime.json +56 -56
- package/deployments/sepolia/PrimeLiquidityProvider.json +48 -48
- package/deployments/sepolia/PrimeLiquidityProvider_Implementation.json +30 -30
- package/deployments/sepolia/PrimeLiquidityProvider_Proxy.json +47 -47
- package/deployments/sepolia/Prime_Implementation.json +74 -74
- package/deployments/sepolia/Prime_Proxy.json +54 -54
- package/deployments/sepolia/solcInputs/75246dd56192f1ba5a6df71cd4c4757d.json +237 -0
- package/deployments/sepolia.json +6 -6
- package/deployments/sepolia_addresses.json +6 -6
- package/dist/deploy/009-configure-prime.js +24 -0
- package/dist/deploy/009-deploy-prime.js +14 -8
- package/dist/hardhat.config.js +3 -4
- package/package.json +3 -3
- package/deploy/009.5-configure-prime.ts +0 -22
- package/dist/deploy/009.5-configure-prime.js +0 -16
- /package/dist/deploy/{009.5-configure-prime.d.ts → 009-configure-prime.d.ts} +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ethers } from "hardhat";
|
|
2
|
+
import { DeployFunction } from "hardhat-deploy/types";
|
|
3
|
+
import { HardhatRuntimeEnvironment } from "hardhat/types";
|
|
4
|
+
|
|
5
|
+
import { getContractAddressOrNullAddress } from "../helpers/deploymentConfig";
|
|
6
|
+
|
|
7
|
+
interface AdminAccounts {
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
|
12
|
+
const { deployments, network } = hre;
|
|
13
|
+
|
|
14
|
+
const adminAccount: AdminAccounts = {
|
|
15
|
+
sepolia: "0x94fa6078b6b8a26f0b6edffbe6501b22a10470fb", // SEPOLIA MULTISIG
|
|
16
|
+
ethereum: "0x285960C5B22fD66A736C7136967A3eB15e93CC67", // ETHEREUM MULTISIG
|
|
17
|
+
opbnbtestnet: "0xb15f6EfEbC276A3b9805df81b5FB3D50C2A62BDf", // OPBNBTESTNET MULTISIG
|
|
18
|
+
opbnbmainnet: "0xC46796a21a3A9FAB6546aF3434F2eBfFd0604207", // OPBNBMAINNET MULTISIG
|
|
19
|
+
bscmainnet: await getContractAddressOrNullAddress(deployments, "NormalTimelock"),
|
|
20
|
+
bsctestnet: await getContractAddressOrNullAddress(deployments, "NormalTimelock"),
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const prime = await ethers.getContract("Prime");
|
|
24
|
+
const plp = await ethers.getContract("PrimeLiquidityProvider");
|
|
25
|
+
|
|
26
|
+
console.log("Transferring Prime ownership to Timelock");
|
|
27
|
+
await prime.transferOwnership(adminAccount[network.name]);
|
|
28
|
+
|
|
29
|
+
console.log("Transferring PLP ownership to Timelock");
|
|
30
|
+
await plp.transferOwnership(adminAccount[network.name]);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
func.tags = ["Prime"];
|
|
34
|
+
func.id = "configure_prime"; // id required to prevent re-execution
|
|
35
|
+
|
|
36
|
+
export default func;
|
|
@@ -4,11 +4,17 @@ import { HardhatRuntimeEnvironment } from "hardhat/types";
|
|
|
4
4
|
|
|
5
5
|
import { getContractAddressOrNullAddress } from "../helpers/deploymentConfig";
|
|
6
6
|
|
|
7
|
+
interface AdminAccounts {
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
7
11
|
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
|
8
12
|
const { deployments, network, getNamedAccounts } = hre;
|
|
9
13
|
const { deploy } = deployments;
|
|
10
14
|
const { deployer } = await getNamedAccounts();
|
|
11
15
|
|
|
16
|
+
console.log(deployer);
|
|
17
|
+
|
|
12
18
|
const TEN_MINUTES = 60 * 10;
|
|
13
19
|
const NINETY_DAYS = 90 * 24 * 60 * 60;
|
|
14
20
|
const ZERO_ADDRESS = ethers.constants.AddressZero;
|
|
@@ -49,13 +55,21 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
|
|
49
55
|
const isTimeBased = false; // revise this value when deploying on L2s
|
|
50
56
|
|
|
51
57
|
const corePoolAddress = await getContractAddressOrNullAddress(deployments, "Unitroller");
|
|
52
|
-
const wrappedNativeToken =
|
|
53
|
-
const nativeMarket =
|
|
58
|
+
const wrappedNativeToken = await getContractAddressOrNullAddress(deployments, "WBNB");
|
|
59
|
+
const nativeMarket = await getContractAddressOrNullAddress(deployments, "vBNB");
|
|
54
60
|
const acmAddress = (await deployments.get("AccessControlManager")).address;
|
|
55
61
|
const xvsVaultAddress = (await deployments.get("XVSVaultProxy")).address;
|
|
56
62
|
const xvsAddress = (await deployments.get("XVS")).address;
|
|
57
63
|
const resilientOracleAddress = (await deployments.get("ResilientOracle")).address;
|
|
58
|
-
|
|
64
|
+
|
|
65
|
+
const adminAccount: AdminAccounts = {
|
|
66
|
+
sepolia: "0x94fa6078b6b8a26f0b6edffbe6501b22a10470fb", // SEPOLIA MULTISIG
|
|
67
|
+
ethereum: "0x285960C5B22fD66A736C7136967A3eB15e93CC67", // ETHEREUM MULTISIG
|
|
68
|
+
opbnbtestnet: "0xb15f6EfEbC276A3b9805df81b5FB3D50C2A62BDf", // OPBNBTESTNET MULTISIG
|
|
69
|
+
opbnbmainnet: "0xC46796a21a3A9FAB6546aF3434F2eBfFd0604207", // OPBNBMAINNET MULTISIG
|
|
70
|
+
bscmainnet: await getContractAddressOrNullAddress(deployments, "NormalTimelock"),
|
|
71
|
+
bsctestnet: await getContractAddressOrNullAddress(deployments, "NormalTimelock"),
|
|
72
|
+
};
|
|
59
73
|
|
|
60
74
|
await deploy("PrimeLiquidityProvider", {
|
|
61
75
|
from: deployer,
|
|
@@ -63,7 +77,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
|
|
63
77
|
deterministicDeployment: false,
|
|
64
78
|
args: [isTimeBased, blocksPerYear[networkName]],
|
|
65
79
|
proxy: {
|
|
66
|
-
owner: network.name === "hardhat" ? deployer :
|
|
80
|
+
owner: network.name === "hardhat" ? deployer : adminAccount[networkName],
|
|
67
81
|
proxyContract: "OpenZeppelinTransparentProxy",
|
|
68
82
|
execute: {
|
|
69
83
|
methodName: "initialize",
|
|
@@ -88,7 +102,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
|
|
88
102
|
isTimeBased,
|
|
89
103
|
],
|
|
90
104
|
proxy: {
|
|
91
|
-
owner: network.name === "hardhat" ? deployer :
|
|
105
|
+
owner: network.name === "hardhat" ? deployer : adminAccount[networkName],
|
|
92
106
|
proxyContract: "OpenZeppelinTransparentProxy",
|
|
93
107
|
execute: {
|
|
94
108
|
methodName: "initialize",
|
|
@@ -98,7 +112,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
|
|
98
112
|
xVSVaultPoolId[networkName],
|
|
99
113
|
xvsVaultAlphaNumerator,
|
|
100
114
|
xvsVaultAlphaDenominator,
|
|
101
|
-
|
|
115
|
+
acmAddress,
|
|
102
116
|
plp.address,
|
|
103
117
|
corePoolAddress,
|
|
104
118
|
resilientOracleAddress,
|
|
@@ -110,8 +124,5 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
|
|
110
124
|
};
|
|
111
125
|
|
|
112
126
|
func.tags = ["Prime"];
|
|
113
|
-
// Script is written specifically for bnb chain
|
|
114
|
-
func.skip = async hre =>
|
|
115
|
-
hre.network.name !== "bscmainnet" && hre.network.name !== "bsctestnet" && hre.network.name !== "hardhat";
|
|
116
127
|
|
|
117
128
|
export default func;
|