Skip to content

Commit

Permalink
Merge branch 'main' into release-packge-with-new-venus-lens-deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyar committed Aug 24, 2023
2 parents d21cb59 + 1abcc9c commit dff1653
Show file tree
Hide file tree
Showing 13 changed files with 1,688 additions and 1,114 deletions.
56 changes: 0 additions & 56 deletions .dockerignore

This file was deleted.

4 changes: 4 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ jobs:

- uses: actions/setup-node@v2
with:
node-version: 16
cache: "yarn"

- name: Install dependencies
# Hack to get around failing "ethereumjs-abi The remote archive doesn't match the expected checksum" error
run: YARN_CHECKSUM_BEHAVIOR=update yarn

- name: Compile types
run: yarn hardhat typechain

- name: Build
run: yarn build

Expand Down
25 changes: 13 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,30 @@ name: Venus-Protocol

on:
push:
branches: [master, develop]
branches: [main, develop]
pull_request:
branches: [main, develop]

jobs:
test:
name: Test
runs-on: self-hosted

runs-on: ubuntu-22.04
env:
NODE_OPTIONS: --max-old-space-size=4096
steps:
- uses: actions/checkout@v2

- name: Clear
run: docker system prune -f -a --volumes

- name: Build docker
run: docker build -t venus:${GITHUB_SHA::7} .
- uses: actions/setup-node@v2
with:
node-version: 16
cache: "yarn"

- name: Run tests
run: docker run --name ${GITHUB_SHA::7} venus:${GITHUB_SHA::7} yarn test
- name: Install deps
run: yarn

- name: Clear
run: docker rm ${GITHUB_SHA::7}
- name: Run hardhat compile and tests coverage
run: |
yarn test
lint:
name: Lint
Expand Down
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,12 @@ dist
docgen-docs

#openzepplin files
.openzeppelin/*
.openzeppelin/*

# yarn
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
Binary file added .yarn/install-state.gz
Binary file not shown.
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
## [2.1.0](https://github.com/VenusProtocol/venus-protocol/compare/v2.0.1...v2.1.0) (2023-08-24)


### Features

* add access control to interest params ([66d65fe](https://github.com/VenusProtocol/venus-protocol/commit/66d65feb8afd3fc42685be39009822098f72b124))
* add deploy script for lens contracts ([cd80912](https://github.com/VenusProtocol/venus-protocol/commit/cd8091273432bb921328104049de4f0005d81b2a))
* add governance simulation framework ([57a909d](https://github.com/VenusProtocol/venus-protocol/commit/57a909d033fc981582f55b9c183f55e57d531d4a))
* add restrictions and allowlist to liquidations ([a3e5a39](https://github.com/VenusProtocol/venus-protocol/commit/a3e5a3938138913f7c4ec9cf5983b1ccec495e90))
* add semantic release to main ([7f28dc0](https://github.com/VenusProtocol/venus-protocol/commit/7f28dc0d705e9339ad27472c6e9ebd3e88a3e4a5))
* adjust GovernorBravo test cases according to vault change ([66642b6](https://github.com/VenusProtocol/venus-protocol/commit/66642b6bbf86a143d3fa9414ba3b9ba063ce22ee))
* customize docgen ([698b2bb](https://github.com/VenusProtocol/venus-protocol/commit/698b2bb5f5361e3516f5ae676c23aaf7bcff088c))
* make Liquidator upgradeable ([44c1f5a](https://github.com/VenusProtocol/venus-protocol/commit/44c1f5a49b0180bd1832b57c5bcec9c35745aca5))
* upgrade Liquidator Solidity version ([9788625](https://github.com/VenusProtocol/venus-protocol/commit/9788625958d282a27c20878fdebc5a665f70df84))


### Bug Fixes

* :shirt: ([ab2f2aa](https://github.com/VenusProtocol/venus-protocol/commit/ab2f2aa9e39f0b01d505c33c323cb44a314fd353))
* add vTokenBorrowed to the emitted event ([99a5099](https://github.com/VenusProtocol/venus-protocol/commit/99a50999a16fd4333924fafd0e810b30e8567fe3))
* avoid unnecessary multiplications ([711d775](https://github.com/VenusProtocol/venus-protocol/commit/711d775728e66a14f3fcbba340b4e30be4803f23))
* increase optimizer runs ([65d19e7](https://github.com/VenusProtocol/venus-protocol/commit/65d19e7dcb14fb4820dd837471236097229cd5ef))
* prevent VAI from compiling with 0.8 ([7723ee3](https://github.com/VenusProtocol/venus-protocol/commit/7723ee3dd5c24102bedadd96a0fb86be82bad5c7))
* Reentrancy issue. ([22cfee1](https://github.com/VenusProtocol/venus-protocol/commit/22cfee15d473c6c0cf9d0638f4e0641a309aefc5))
* remove duplicate import ([e220aec](https://github.com/VenusProtocol/venus-protocol/commit/e220aec2090af60aaeee778f58b70f13fe9b5ba7))
* set initial stability fee index for past minters ([199c045](https://github.com/VenusProtocol/venus-protocol/commit/199c045351bbfe59667402c1620140a0d9cf48ac))
* set path for hardhat-ethers ([28795b1](https://github.com/VenusProtocol/venus-protocol/commit/28795b1001119a85ac9a0f5ae303945c8c3ba66f))
* set timelock delays to time units ([4a29128](https://github.com/VenusProtocol/venus-protocol/commit/4a29128b0b71eac03eb6024ce31bc20767e31e26))
* update dependencies ([36b6e76](https://github.com/VenusProtocol/venus-protocol/commit/36b6e76ee022360f7421156ca9d0e4423215f4c5))
* update publish command ([2177df9](https://github.com/VenusProtocol/venus-protocol/commit/2177df93548c9437f78e2c57ab6805f96c6c6735))
* update the network files with the currently used addresses ([4eaa8ae](https://github.com/VenusProtocol/venus-protocol/commit/4eaa8aef5e6a3ece21e2116073efb4c6bf1c26d5))
* upgrade compiler and lock pragma version ([ed19a94](https://github.com/VenusProtocol/venus-protocol/commit/ed19a9407a457e73864de864088fde36be6142ba))
* use custom errors instead of error strings ([4208e85](https://github.com/VenusProtocol/venus-protocol/commit/4208e85199ae31084981b7887ec8de8b12ea2a41))
* xvs -> xvsVault in GovernerBravo cancellation test ([83ccbe0](https://github.com/VenusProtocol/venus-protocol/commit/83ccbe0d3538dff6642f747e1537bf78db6e6f20))


### Reverts

* Revert "Fix cache errors in scenario installation" ([9385dba](https://github.com/VenusProtocol/venus-protocol/commit/9385dba2a60028e59fdad143e9468413e168b3c9))
21 changes: 0 additions & 21 deletions Dockerfile

This file was deleted.

1 change: 0 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import fs from "fs";
import "hardhat-deploy";
import { HardhatUserConfig, task } from "hardhat/config";
import "solidity-docgen";
import "solidity-docgen";

require("dotenv").config();

Check warning on line 15 in hardhat.config.ts

View workflow job for this annotation

GitHub Actions / Lint

Require statement not part of import statement

Expand Down
17 changes: 12 additions & 5 deletions networks/mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@
"MATIC": "0xCC42724C6683B7E57334c4E856f4c9965ED682bD",
"CAKE": "0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82",
"AAVE": "0xfb6115445Bff7b52FeB98650C87f44907E58f802",
"TUSD": "0x14016E85a25aeb13065688cAFB43044C2ef86784",
"TUSDOLD": "0x14016E85a25aeb13065688cAFB43044C2ef86784",
"TUSD": "0x40af3827F39D0EAcBF4A168f8D4ee67c121D11c9",
"TRX": "0xCE7de646e7208a4Ef112cb6ed5038FA6cC6b12e3",
"TRXOLD": "0x85EAC5Ac2F758618dFa09bDbe0cf174e7d574D5B",
"UST": "0x3d4350cD54aeF9f9b2C29435e0fa809957B3F30a",
"LUNA": "0x156ab3346823B651294766e23e6Cf87254d68962",
"WBETH": "0xa2e3356610840701bdf5611a53974510ae27e2e1",
"vUSDC": "0xecA88125a5ADbe82614ffC12D0DB554E2e2867C8",
"vUSDT": "0xfD5840Cd36d94D7229439859C0112a4185BC0255",
"vBUSD": "0x95c78222B3D6e262426483D42CfA53685A67Ab9D",
Expand All @@ -59,31 +61,36 @@
"vMATIC": "0x5c9476FcD6a4F9a3654139721c949c2233bBbBc8",
"vCAKE": "0x86aC3974e2BD0d60825230fa6F355fF11409df5c",
"vAAVE": "0x26DA28954763B92139ED49283625ceCAf52C6f94",
"vTUSD": "0x08CEB3F4a7ed3500cA0982bcd0FC7816688084c3",
"vTUSDOLD": "0x08CEB3F4a7ed3500cA0982bcd0FC7816688084c3",
"vTUSD": "0xBf762cd5991cA1DCdDaC9ae5C638F5B5Dc3Bee6E",
"vUST": "0x78366446547D062f45b4C0f320cDaa6d710D87bb",
"vLUNA": "0xb91A659E88B51474767CD97EF3196A3e7cEDD2c8",
"vWBETH": "0x6CFdEc747f37DAf3b87a35a1D9c8AD3063A1A8A0",
"Timelock": "0x939bD8d64c0A9583A7Dcea9933f7b21697ab6396",
"GovernorAlpha": "0x406f48f47D25E9caa29f17e7Cfbd1dc6878F078f",
"VenusPriceOracle": "0x516c18DC440f107f12619a6d2cc320622807d0eE",
"WBNB": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
"pancakeFactory": "0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73",
"XVSVault": "0x6eF49b4e0772Fe78128F981d42D54172b55eCF9F",
"XVSVault": "0x4d067D2471406a778D103B5742eCC83668ea5345",
"XVSVaultProxy": "0x051100480289e704d20e9DB4804837068f3f9204",
"XVSStore": "0x1e25CF968f12850003Db17E0Dba32108509C4359",
"SnapshotLens": "0x9802448Af040DA880Bf51bCbe4f2A4205ebC6d2C",
"VTreasury": "0xF322942f644A996A617BD29c16bd7d231d9F35E9",
"GovernorAlpha2": "0x388313BfEFEE8ddfeAD55b585F62812293Cf3A60",
"GovernorBravoDelegate": "0x360ac19648efC29d2b7b70baC227C35e909272Fd",
"GovernorBravoDelegator": "0x2d56dC077072B53571b8252008C60e945108c75a",
"VRTVault": "0xA3EEA5e491AD45caE30F6E0a315A275cc99EE147",
"VRTVault": "0x1405899732Cfe963EaB935a8bBa49c47FE996048",
"VRTVaultProxy": "0x98bF4786D72AAEF6c714425126Dd92f149e3F334",
"VAIVault": "0x0B4d7776b87deD4a0958E32D5155598057D2620D",
"VAIVaultProxy": "0x0667Eed0a0aAb930af74a3dfeDD263A73994f216",
"VRTConverter": "0xF0fCB229031A386C672e291cE183390c1a7705dA",
"VRTConverterProxy": "0x92572fB60f4874d37917C53599cAe5b085B9Facd",
"XVSVesting": "0xA9dD0536Ab0699D60c28CE369Ff366a1e621BFf1",
"XVSVestingProxy": "0xb28Dec7C7Ac80f4D0B6a1B711c39e444cDE8B2cE",
"ComptrollerLens": "0x50F618A2EAb0fB55e87682BbFd89e38acb2735cD",
"Liquidator": "0x0870793286aaDA55D39CE7f82fb2766e8004cF43",
"VenusChainlinkOracle": "0x7FabdD617200C9CB4dcf3dd2C41273e60552068A"
"VenusChainlinkOracle": "0x7FabdD617200C9CB4dcf3dd2C41273e60552068A",
"SwapRouterCorePool": "0x8938E6dA30b59c1E27d5f70a94688A89F7c815a4"
},
"Accounts": {
"admin": "0x0000000000000000000000000000000000000000",
Expand Down
20 changes: 16 additions & 4 deletions networks/testnet.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Contracts": {
"VenusLens": "0x4C97B56d596d5cCc11727c0AD7d171E7F0d5134e",
"VenusLens": "0x11c8dC3DcA87E8205ec01e6d79Be9442d31701d3",
"SnapshotLens": "0x61610DeC84448Ed17A2a0317667a99ca0CC6f697",
"WhitepaperInterestRateModel": "0xdE9beC5102ee897a2c934321309517dD6c0106F4",
"Comptroller": "0xfd301ad2503b25a7670a45b11a043c20b04ee896",
Expand All @@ -19,6 +19,8 @@
"ETH": "0x98f7A83361F7Ac8765CcEBAB1425da6b341958a7",
"LTC": "0x969F147B6b8D81f86175de33206A4FD43dF17913",
"XRP": "0x3022A32fdAdB4f02281E8Fab33e0A6811237aab0",
"WBETH": "0xf9F98365566F4D55234f24b99caA1AfBE6428D44",
"TUSD": "0xB32171ecD878607FFc4F8FC0bCcE6852BB3149E0",
"vUSDC": "0xD5C4C2e2facBEB59D0216D0595d63FcDc6F9A1a7",
"vUSDT": "0xb7526572FFE56AB9D7489838Bf2E18e3323b441A",
"vBUSD": "0x08e0A5575De71037aE36AbfAfb516595fE68e5e4",
Expand All @@ -30,26 +32,36 @@
"vETH": "0x162D005F0Fff510E54958Cfc5CF32A3180A84aab",
"vLTC": "0xAfc13BC065ABeE838540823431055D2ea52eBA52",
"vXRP": "0x488aB2826a154da01CC4CC16A8C83d4720D3cA2C",
"vWBETH": "0x35566ED3AF9E537Be487C98b1811cDf95ad0C32b",
"vTUSD": "0xEFAACF73CE2D38ED40991f29E72B12C74bd4cf23",
"Timelock": "0xce10739590001705F7FF231611ba4A48B2820327",
"GovernorAlpha": "0x7df10b2118eb04d9806b15198019f83741a9f8f4",
"GovernorAlpha2": "0x7116894ed34FC4B27D5b84f46B70Af48397a6C24",
"GovernorBravoDelegate": "0x0A79EEFA81098B8BD3c8B11Fc0113f1be088F1c0",
"GovernorBravoDelegator": "0x5573422A1a59385C247ec3a66B93B7C08eC2f8f2",
"XVSVault": "0xa4Fd54cACdA379FB7CaA783B83Cc846f8ac0Faa6",
"XVSVault": "0x7f32f15F1806B0EE04b946c7E1Ad9f1df06fEe81",
"XVSVaultProxy": "0x9aB56bAD2D7631B2A857ccf36d998232A8b82280",
"XVSStore": "0x7B4dba3b320E7D421A213e1a73bB9858bb6839F8",
"VenusPriceOracle": "0x03cf8ff6262363010984b192dc654bd4825caffc",
"VRT": "0x331F639B4F3CF6E391CD244e0b5027C5968Ec325",
"VRTVault": "0x0543001bc1A2bDafB9dD6Cf7370616177CF7dCde",
"VRTVault": "0xa298713eCaE4e2C35C3af5241AAf81E0cc34Da84",
"VRTVaultProxy": "0x1ffD1b8B67A1AE0C189c734B0F58B0954522FF71",
"VAIVault": "0x5c1c23ac038059c7B4EC1659728c166facab590b",
"VAIVaultProxy": "0x7Db4f5cC3bBA3e12FF1F528D2e3417afb0a57118",
"VRTConverter": "0xF0fCB229031A386C672e291cE183390c1a7705dA",
"VRTConverterProxy": "0xAb81e79F9607eC4C7b69Ab4f7cf6c0AF607aA131",
"XVSVesting": "0x9667B6E438232925525F26CeC0acC3A39B9980C8",
"XVSVestingProxy": "0xcfa3a6bc934EcA22fa39e854c823cD3dE79D9BC8",
"ComptrollerLens": "0xc698edFbac7F4A3A2A06757860938e73260ed7a4",
"Liquidator": "0x40FB27A83e52E7B213CC345f5b6ACA17bf7D5139",
"WBNB": "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd",
"pancakeFactory": "0x182859893230dC89b114d6e2D547BFFE30474a21"
"pancakeFactory": "0x182859893230dC89b114d6e2D547BFFE30474a21",
"SwapRouterCorePool": "0x83edf1deE1B730b7e8e13C00ba76027D63a51ac0",
"SwapRouterLiquidStakedBNB": "0x7DcBd10E3479907e0B8C79d01D0572C8cc00227B",
"SwapRouterDefi": "0x76B88ff4579B35D2722B7383b9B9ce831dc89B72",
"SwapRouterStableCoins": "0x6cE131c2321e25d7b4C63283b75DB160Ce3Fb710",
"SwapRouterTronFamily": "0x51Fd03aD1132e8cb5a5a793528c9F4ec918667d4",
"SwapRouterGamefi": "0xFdeBF4530F9c7d352ffFE88cd0e96C8Bb7391BD9"
},
"Accounts": {
"admin": "0xfea1c651a47fe29db9b1bf3cc1f224d8d9cff68c",
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{
"name": "@venusprotocol/venus-protocol",
"version": "0.7.1",
"version": "2.1.0",
"description": "The Venus Money Market",
"repository": "[email protected]:VenusProtocol/venus-protocol.git",
"author": "Venus",
"license": "BSD-3-Clause",
"files": [
"artifacts",
"networks",
"deploy",
"dist",
"contracts",
"deployments"
],
Expand All @@ -29,9 +33,6 @@
"docgen": "hardhat docgen",
"prepare": "husky install"
},
"repository": "[email protected]:VenusProtocol/venus-protocol.git",
"author": "Venus",
"license": "BSD-3-Clause",
"dependencies": {
"@openzeppelin/contracts": "^4.8.3",
"@openzeppelin/contracts-upgradeable": "^4.8.0",
Expand Down Expand Up @@ -73,7 +74,7 @@
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^27.1.2",
"ethers": "^5.6.9",
"hardhat": "^2.10.1",
"hardhat": "^2.16.1",
"hardhat-deploy": "^0.11.14",
"hardhat-deploy-ethers": "^0.3.0-beta.13",
"hardhat-gas-reporter": "^1.0.8",
Expand All @@ -90,8 +91,7 @@
"web3-utils": "^1.7.5"
},
"_moduleAliases": {
"@nomiclabs/hardhat-ethers": "node_modules/hardhat-deploy-ethers",
"@nomiclabs/hardhat-ethers/types": "hardhat-deploy-ethers/types"
"@nomiclabs/hardhat-ethers": "node_modules/hardhat-deploy-ethers"
},
"packageManager": "[email protected]",
"publishConfig": {
Expand Down
6 changes: 5 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{
"compilerOptions": {
"baseUrl": ".",
"target": "ES2020",
"module": "commonjs",
"strict": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"outDir": "dist"
"outDir": "dist",
"paths": {
"@nomiclabs/hardhat-ethers": ["node_modules/hardhat-deploy-ethers"]
}
},
"include": ["./typechain", "./deploy"],
"files": ["./hardhat.config.ts"]
Expand Down
Loading

0 comments on commit dff1653

Please sign in to comment.