@venusprotocol/protocol-reserve 1.2.0-dev.3 → 1.2.0-dev.5
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/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol/ReentrancyGuardUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol/IERC20Upgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol/IERC20PermitUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol/SafeERC20Upgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json +1 -1
- package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol/AccessControlledV8.dbg.json +1 -1
- package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol/IAccessControlManagerV8.dbg.json +1 -1
- package/artifacts/@venusprotocol/solidity-utilities/contracts/MaxLoopsLimitHelper.sol/MaxLoopsLimitHelper.dbg.json +1 -1
- package/artifacts/build-info/ac790619cb42a0f08af77d9ea733874e.json +1 -0
- package/artifacts/contracts/Interfaces/ComptrollerInterface.sol/ComptrollerInterface.dbg.json +1 -1
- package/artifacts/contracts/Interfaces/IIncomeDestination.sol/IIncomeDestination.dbg.json +1 -1
- package/artifacts/contracts/Interfaces/IProtocolShareReserve.sol/IProtocolShareReserve.dbg.json +1 -1
- package/artifacts/contracts/Interfaces/IVToken.sol/IVToken.dbg.json +1 -1
- package/artifacts/contracts/Interfaces/PoolRegistryInterface.sol/PoolRegistryInterface.dbg.json +1 -1
- package/artifacts/contracts/ProtocolReserve/ProtocolShareReserve.sol/ProtocolShareReserve.dbg.json +1 -1
- package/artifacts/contracts/ProtocolReserve/ProtocolShareReserve.sol/ProtocolShareReserve.json +16 -16
- package/artifacts/contracts/Test/Mocks/MockToken.sol/MockToken.dbg.json +1 -1
- package/contracts/ProtocolReserve/ProtocolShareReserve.sol +7 -7
- package/dist/deploy/1-deploy.d.ts +2 -0
- package/dist/deploy/1-deploy.d.ts.map +1 -0
- package/dist/deploy/1-deploy.js +93 -0
- package/dist/deploy/1-deploy.js.map +1 -0
- package/dist/hardhat.config.d.ts +15 -0
- package/dist/hardhat.config.d.ts.map +1 -0
- package/dist/hardhat.config.js +184 -0
- package/dist/hardhat.config.js.map +1 -0
- package/package.json +2 -2
- package/typechain/ProtocolShareReserve.d.ts +6 -6
- package/typechain/factories/ProtocolShareReserve__factory.ts +15 -15
- package/artifacts/build-info/0bf08ffb3b10e68a2b3f4538fccc61c5.json +0 -1
- package/deploy/1-deploy.ts +0 -64
package/deploy/1-deploy.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import mainnetDeployments from "@venusprotocol/venus-protocol/networks/mainnet.json";
|
|
2
|
-
import testnetDeployments from "@venusprotocol/venus-protocol/networks/testnet.json";
|
|
3
|
-
import hre, { ethers } from "hardhat";
|
|
4
|
-
import { HardhatRuntimeEnvironment } from "hardhat/types";
|
|
5
|
-
|
|
6
|
-
const ADDRESSES: any = {
|
|
7
|
-
bsctestnet: {
|
|
8
|
-
vBNBAddress: testnetDeployments.Contracts.vBNB,
|
|
9
|
-
comptroller: testnetDeployments.Contracts.Unitroller,
|
|
10
|
-
WBNBAddress: "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd",
|
|
11
|
-
timelock: testnetDeployments.Contracts.Timelock,
|
|
12
|
-
acm: "0x45f8a08F534f34A97187626E05d4b6648Eeaa9AA",
|
|
13
|
-
},
|
|
14
|
-
bscmainnet: {
|
|
15
|
-
vBNBAddress: mainnetDeployments.Contracts.vBNB,
|
|
16
|
-
comptroller: mainnetDeployments.Contracts.Unitroller,
|
|
17
|
-
WBNBAddress: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
|
|
18
|
-
timelock: mainnetDeployments.Contracts.Timelock,
|
|
19
|
-
acm: "0x4788629ABc6cFCA10F9f969efdEAa1cF70c23555",
|
|
20
|
-
},
|
|
21
|
-
sepolia: {
|
|
22
|
-
vBNBAddress: ethers.constants.AddressZero,
|
|
23
|
-
comptroller: ethers.constants.AddressZero,
|
|
24
|
-
WBNBAddress: ethers.constants.AddressZero,
|
|
25
|
-
timelock: ethers.constants.AddressZero,
|
|
26
|
-
acm: ethers.constants.AddressZero,
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
module.exports = async ({ getNamedAccounts, deployments, network }: HardhatRuntimeEnvironment) => {
|
|
31
|
-
const { deploy } = deployments;
|
|
32
|
-
const { deployer } = await getNamedAccounts();
|
|
33
|
-
|
|
34
|
-
const networkName = network.name;
|
|
35
|
-
|
|
36
|
-
const { vBNBAddress, comptroller, WBNBAddress, timelock, acm } = ADDRESSES[networkName];
|
|
37
|
-
const loopsLimit = 20;
|
|
38
|
-
|
|
39
|
-
await deploy("ProtocolShareReserve", {
|
|
40
|
-
from: deployer,
|
|
41
|
-
log: true,
|
|
42
|
-
deterministicDeployment: false,
|
|
43
|
-
args: [comptroller, WBNBAddress, vBNBAddress],
|
|
44
|
-
proxy: {
|
|
45
|
-
owner: timelock,
|
|
46
|
-
proxyContract: "OpenZeppelinTransparentProxy",
|
|
47
|
-
execute: {
|
|
48
|
-
methodName: "initialize",
|
|
49
|
-
args: [acm, loopsLimit],
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
const psr = await hre.ethers.getContract("ProtocolShareReserve");
|
|
55
|
-
const psrOwner = await psr.owner();
|
|
56
|
-
|
|
57
|
-
if (psrOwner === deployer) {
|
|
58
|
-
const tx = await psr.transferOwnership(ADDRESSES[networkName].timelock);
|
|
59
|
-
await tx.wait();
|
|
60
|
-
console.log("Transferred ownership of PSR to Timelock");
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
module.exports.tags = ["deploy"];
|