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 #60

Merged
merged 25 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
0e1cc14
Merge pull request #56 from VenusProtocol/main
chechu Dec 27, 2023
2cc0d6a
chore: update governance-contracts package version
0xlucian Dec 6, 2023
50af4da
refactor: add the correct config for sepolia
0xlucian Dec 6, 2023
e7fcd57
refactor: add explicit log about the timelock before deployment
0xlucian Dec 6, 2023
204910d
refactor: add all the correct config for sepolia
0xlucian Dec 6, 2023
d892e67
chore: PSR deployment
0xlucian Dec 6, 2023
80226d8
feat: updating deployment files
0xlucian Dec 6, 2023
b02ab0f
refactor: rebase script from develop
0xlucian Dec 13, 2023
c0656d4
refactor: make deployment compatible with sepolia network
0xlucian Dec 13, 2023
7f3b045
chore: PSR deployment
0xlucian Dec 13, 2023
5462ca9
feat: update dependencies
chechu Dec 13, 2023
b28f9ca
feat: updating deployment files
chechu Dec 13, 2023
1ec0b89
chore: address PR comments and redeploy PSR with correct ProxyAdmin
0xlucian Dec 28, 2023
e6348b7
feat: updating deployment files
0xlucian Dec 28, 2023
f76d1c7
chore: update governance package version
GitGuru7 Jan 2, 2024
6903029
chore: use the utils file with shared addresses and set deployer as o…
chechu Jan 2, 2024
152b463
fixup! chore: use the utils file with shared addresses and set deploy…
chechu Jan 2, 2024
80215bb
Merge pull request #46 from VenusProtocol/chore/psr-sepolia
GitGuru7 Jan 3, 2024
2144213
chore(release): 1.3.0-dev.1 [skip ci]
toolsvenus Jan 3, 2024
ea28049
feat: add PSR deployments of opbnbtestnet
GitGuru7 Jan 15, 2024
1c75102
Merge pull request #57 from VenusProtocol/feat/VEN-2311
GitGuru7 Jan 16, 2024
5e4bed6
chore(release): 1.3.0-dev.2 [skip ci]
toolsvenus Jan 16, 2024
7afc729
feat: update deps to the stable versions
chechu Jan 23, 2024
2e5faa8
Merge pull request #59 from VenusProtocol/release/VEN-1825
chechu Jan 23, 2024
6cba6e1
chore(release): 1.3.0-dev.3 [skip ci]
toolsvenus Jan 23, 2024
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
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ DEPLOYER_PRIVATE_KEY=
#ARCHIVE_NODE_sepolia=https://ethereum-sepolia.blockpi.network/v1/rpc/public
#ARCHIVE_NODE_ethereum=https://eth-mainnet.nodereal.io/v1/<YOUR_KEY_HERE>
#ARCHIVE_NODE_ethereum=http://127.0.0.1:1248
#ARCHIVE_NODE_opbnbtestnet=https://opbnb-testnet.nodereal.io/v1/<YOUR_KEY_HERE>
#ARCHIVE_NODE_opbnbmainnet=https://opbnb-mainnet.nodereal.io/v1/<YOUR_KEY_HERE>

ETHERSCAN_API_KEY=
REPORT_GAS=
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
## [1.3.0-dev.3](https://github.com/VenusProtocol/protocol-reserve/compare/v1.3.0-dev.2...v1.3.0-dev.3) (2024-01-23)


### Features

* update deps to the stable versions ([7afc729](https://github.com/VenusProtocol/protocol-reserve/commit/7afc7298c994d89a8178a7fb11f69054c0670cba))

## [1.3.0-dev.2](https://github.com/VenusProtocol/protocol-reserve/compare/v1.3.0-dev.1...v1.3.0-dev.2) (2024-01-16)


### Features

* add PSR deployments of opbnbtestnet ([ea28049](https://github.com/VenusProtocol/protocol-reserve/commit/ea2804990da19e5c200a40cf590d03d1bf9d4bbb))

## [1.3.0-dev.1](https://github.com/VenusProtocol/protocol-reserve/compare/v1.2.0...v1.3.0-dev.1) (2024-01-03)


### Features

* update dependencies ([5462ca9](https://github.com/VenusProtocol/protocol-reserve/commit/5462ca98577100cf6c0f286c36b29db63ddf7c3b))
* updating deployment files ([e6348b7](https://github.com/VenusProtocol/protocol-reserve/commit/e6348b72a8c9b2ff81b10a17660d8ce49e34ef08))
* updating deployment files ([b28f9ca](https://github.com/VenusProtocol/protocol-reserve/commit/b28f9ca99f626a7d09fe93255f8d906ad29264db))
* updating deployment files ([80226d8](https://github.com/VenusProtocol/protocol-reserve/commit/80226d8b95d03b1ee3c925718fd8666afa29790a))

## [1.2.0](https://github.com/VenusProtocol/protocol-reserve/compare/v1.1.0...v1.2.0) (2023-12-27)


Expand Down
20 changes: 10 additions & 10 deletions deploy/1-deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@ import hre, { ethers } from "hardhat";
import { DeployFunction } from "hardhat-deploy/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";

import { ADDRESS_ONE, multisigs } from "../helpers/utils";

const func: DeployFunction = async ({
network: { live },
network: { live, name },
getNamedAccounts,
deployments,
}: HardhatRuntimeEnvironment) => {
const MOCK_ADDRESS = live ? undefined : "0x0000000000000000000000000000000000000001";
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();

const vBNBAddress = (await ethers.getContractOrNull("vBNB"))?.address || MOCK_ADDRESS;
const comptrollerAddress = (await ethers.getContractOrNull("Unitroller"))?.address || MOCK_ADDRESS;
const WBNBAddress = (await ethers.getContractOrNull("WBNB"))?.address || MOCK_ADDRESS;
const timelockAddress = (await ethers.getContractOrNull("NormalTimelock"))?.address || MOCK_ADDRESS;
const acmAddress = (await ethers.getContractOrNull("AccessControlManager"))?.address || MOCK_ADDRESS;
const vBNBAddress = (await ethers.getContractOrNull("vBNB"))?.address || ADDRESS_ONE;
const comptrollerAddress = (await ethers.getContractOrNull("Unitroller"))?.address || ADDRESS_ONE;
const WBNBAddress = (await ethers.getContractOrNull("WBNB"))?.address || ADDRESS_ONE;
const timelockAddress = (await ethers.getContractOrNull("NormalTimelock"))?.address || multisigs[name];
const acmAddress = (await ethers.getContractOrNull("AccessControlManager"))?.address || ADDRESS_ONE;
const loopsLimit = 20;

await deploy("ProtocolShareReserve", {
Expand All @@ -24,7 +25,7 @@ const func: DeployFunction = async ({
deterministicDeployment: false,
args: [comptrollerAddress, WBNBAddress, vBNBAddress],
proxy: {
owner: timelockAddress,
owner: live ? timelockAddress : deployer,
proxyContract: "OpenZeppelinTransparentProxy",
execute: {
methodName: "initialize",
Expand All @@ -34,9 +35,8 @@ const func: DeployFunction = async ({
});

const psr = await hre.ethers.getContract("ProtocolShareReserve");
const psrOwner = await psr.owner();

if (psrOwner === deployer) {
if (live) {
const tx = await psr.transferOwnership(timelockAddress);
await tx.wait();
console.log("Transferred ownership of PSR to Timelock");
Expand Down
1 change: 1 addition & 0 deletions deployments/opbnbtestnet/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5611
257 changes: 257 additions & 0 deletions deployments/opbnbtestnet/DefaultProxyAdmin.json

Large diffs are not rendered by default.

Loading