Skip to content

Commit

Permalink
Merge branch 'develop' into feat/passive-swap
Browse files Browse the repository at this point in the history
  • Loading branch information
Debugger022 committed Dec 4, 2023
2 parents 8d8f8c7 + 52eab94 commit 9a915e7
Show file tree
Hide file tree
Showing 10 changed files with 108 additions and 22 deletions.
21 changes: 16 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# true or false
FORK=false
FORKED_NETWORK=bscmainnet

MNEMONIC="here is where your twelve words mnemonic should be put my friend"
BSCSCAN_API_KEY="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
BSC_ARCHIVE_NODE="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
DEPLOYER_PRIVATE_KEY="E9873D79C6D87DC0FB6A5778633389F4453213303DA61F20BD67FC233AA33262"
BSC_TESTNET_NODE="https://data-seed-prebsc-1-s1.binance.org:8545"
BSC_MAINNET_NODE="https://bsc-dataseed.binance.org/"
DEPLOYER_PRIVATE_KEY=

## Archive nodes
#ARCHIVE_NODE_bsctestnet=https://bsc-testnet.nodereal.io/v1/<YOUR_KEY_HERE>
#ARCHIVE_NODE_bscmainnet=https://bsc-mainnet.nodereal.io/v1/<YOUR_KEY_HERE>
#ARCHIVE_NODE_bscmainnet=http://127.0.0.1:1248
#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

ETHERSCAN_API_KEY=
REPORT_GAS=
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ jobs:

- name: Export deployments
run: |
yarn hardhat export --network bsctestnet --export ./deployments/bsctestnet.json
yarn hardhat export --network bscmainnet --export ./deployments/bscmainnet.json
yarn hardhat export --network sepolia --export ./deployments/sepolia.json
for NETWORK in bsctestnet bscmainnet ethereum sepolia; do
yarn hardhat export --network ${NETWORK} --export ./deployments/${NETWORK}.json
jq -M '{name, chainId, addresses: .contracts | map_values(.address)}' ./deployments/${NETWORK}.json > ./deployments/${NETWORK}_addresses.json
done
yarn prettier
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "feat: updating deployment files"
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## [1.2.0-dev.3](https://github.com/VenusProtocol/protocol-reserve/compare/v1.2.0-dev.2...v1.2.0-dev.3) (2023-12-01)


### Features

* generate file only with addresses of deployed contracts ([063d8d2](https://github.com/VenusProtocol/protocol-reserve/commit/063d8d2dd5405330f30b523bd56829be074fef9e))
* updating deployment files ([c2a2296](https://github.com/VenusProtocol/protocol-reserve/commit/c2a2296d8e81299c5ffad64b3060f6a7a809b8b8))


### Bug Fixes

* unify the use of the env variable DEPLOYER_PRIVATE_KEY ([59ee4ad](https://github.com/VenusProtocol/protocol-reserve/commit/59ee4ad49f8b950fb36a1da307431dc11aa980c8))

## [1.2.0-dev.2](https://github.com/VenusProtocol/protocol-reserve/compare/v1.2.0-dev.1...v1.2.0-dev.2) (2023-11-28)


Expand Down
10 changes: 10 additions & 0 deletions deployments/bscmainnet_addresses.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "bscmainnet",
"chainId": "56",
"addresses": {
"DefaultProxyAdmin": "0x6beb6D2695B67FEb73ad4f172E8E2975497187e4",
"ProtocolShareReserve": "0xCa01D5A9A248a830E9D93231e791B1afFed7c446",
"ProtocolShareReserve_Implementation": "0x5108E5F903Ecc5e3a2dA20171527aCe96CB3c7f8",
"ProtocolShareReserve_Proxy": "0xCa01D5A9A248a830E9D93231e791B1afFed7c446"
}
}
10 changes: 10 additions & 0 deletions deployments/bsctestnet_addresses.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "bsctestnet",
"chainId": "97",
"addresses": {
"DefaultProxyAdmin": "0x7877ffd62649b6a1557b55d4c20fcbab17344c91",
"ProtocolShareReserve": "0x25c7c7D6Bf710949fD7f03364E9BA19a1b3c10E3",
"ProtocolShareReserve_Implementation": "0x6A7FF4641F52b267102a5a0779cE7a060374d6cC",
"ProtocolShareReserve_Proxy": "0x25c7c7D6Bf710949fD7f03364E9BA19a1b3c10E3"
}
}
5 changes: 5 additions & 0 deletions deployments/ethereum.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "ethereum",
"chainId": "1",
"contracts": {}
}
5 changes: 5 additions & 0 deletions deployments/ethereum_addresses.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "ethereum",
"chainId": "1",
"addresses": {}
}
5 changes: 5 additions & 0 deletions deployments/sepolia_addresses.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "sepolia",
"chainId": "11155111",
"addresses": {}
}
51 changes: 39 additions & 12 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import "solidity-docgen";
//eslint-disable-next-line @typescript-eslint/no-var-requires
require("dotenv").config();

const DEPLOYER_PRIVATE_KEY = process.env.DEPLOYER_PRIVATE_KEY;

task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
const accounts = await hre.ethers.getSigners();

Expand All @@ -24,13 +26,15 @@ task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
});

function isFork() {
return process.env.FORK_MAINNET === "true"
return process.env.FORK === "true"
? {
allowUnlimitedContractSize: false,
loggingEnabled: false,
forking: {
url: `${process.env.BSC_ARCHIVE_NODE}`,
blockNumber: 31918256,
url:
process.env[`ARCHIVE_NODE_${process.env.FORKED_NETWORK}`] ||
"https://data-seed-prebsc-1-s1.binance.org:8545",
blockNumber: 21068448,
},
accounts: {
accountsBalance: "1000000000000000000",
Expand Down Expand Up @@ -81,32 +85,39 @@ const config: HardhatUserConfig = {
networks: {
hardhat: isFork(),
bsctestnet: {
url: process.env.BSC_TESTNET_NODE || "https://data-seed-prebsc-2-s3.binance.org:8545/",
url: process.env.ARCHIVE_NODE_bsctestnet || "https://data-seed-prebsc-1-s1.binance.org:8545",
chainId: 97,
accounts: {
mnemonic: process.env.MNEMONIC || "",
},
gasPrice: 10000000000, // 10 gwei
gasMultiplier: 10,
timeout: 12000000,
},
bscmainnet: {
url: process.env.BSC_MAINNET_NODE || "https://bsc-dataseed.binance.org/",
gasMultiplier: 10,
accounts: {
mnemonic: process.env.MNEMONIC || "",
},
url: process.env.ARCHIVE_NODE_bscmainnet || "https://bsc-dataseed.binance.org/",
accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [],
},
sepolia: {
url: "https://rpc.notadegen.com/eth/sepolia",
url: process.env.ARCHIVE_NODE_sepolia || "https://ethereum-sepolia.blockpi.network/v1/rpc/public",
chainId: 11155111,
gasPrice: 20000000000,
accounts: process.env.PRIVATE_KEY ? [`0x${process.env.PRIVATE_KEY}`] : [],
live: true,
gasPrice: 20000000000, // 20 gwei
accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [],
},
ethereum: {
url: process.env.ARCHIVE_NODE_ethereum || "https://ethereum.blockpi.network/v1/rpc/public",
chainId: 1,
live: true,
timeout: 1200000, // 20 minutes
},
},
etherscan: {
apiKey: {
bscmainnet: process.env.ETHERSCAN_API_KEY || "ETHERSCAN_API_KEY",
bsctestnet: process.env.ETHERSCAN_API_KEY || "ETHERSCAN_API_KEY",
sepolia: process.env.ETHERSCAN_API_KEY || "ETHERSCAN_API_KEY",
ethereum: process.env.ETHERSCAN_API_KEY || "ETHERSCAN_API_KEY",
},
customChains: [
{
Expand All @@ -125,6 +136,22 @@ const config: HardhatUserConfig = {
browserURL: "https://testnet.bscscan.com",
},
},
{
network: "sepolia",
chainId: 11155111,
urls: {
apiURL: "https://api-sepolia.etherscan.io/api",
browserURL: "https://sepolia.etherscan.io",
},
},
{
network: "ethereum",
chainId: 1,
urls: {
apiURL: "https://api.etherscan.io/api",
browserURL: "https://etherscan.io",
},
},
],
},
paths: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@venusprotocol/protocol-reserve",
"description": "Venus Protocol contracts to manage the income generated by the protocol",
"version": "1.2.0-dev.2",
"version": "1.2.0-dev.3",
"author": "Venus",
"engines": {
"node": ">=18.0.0"
Expand Down

0 comments on commit 9a915e7

Please sign in to comment.