Skip to content

Commit

Permalink
Merge pull request #137 from VenusProtocol/feat/update-venus-packages
Browse files Browse the repository at this point in the history
  • Loading branch information
gleiser-oliveira authored Feb 5, 2024
2 parents 6678327 + 39d24ce commit 8eb25e8
Show file tree
Hide file tree
Showing 10 changed files with 736 additions and 650 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
sleep 5s
docker exec -i subgraph-hardhat-node yarn workspace isolated-pools-subgraph run generate-subgraph-types
- name: Run Isolated Pools integration integration tests
- name: Run Isolated Pools integration tests
run: |
docker exec -i subgraph-hardhat-node yarn workspace isolated-pools-subgraph run test:integration --bail
Expand Down
1 change: 1 addition & 0 deletions copy_contracts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ rm -rf contracts/isolated-pools/contracts/test
mkdir -p ./contracts/oracle
cp -rf ./node_modules/@venusprotocol/oracle/contracts/ ./contracts/oracle/contracts
rm -rf contracts/oracle/contracts/test
rm ./contracts/oracle/contracts/ResilientOracle.sol

mkdir -p ./contracts/protocol
cp -rf ./node_modules/@venusprotocol/venus-protocol/contracts/ ./contracts/protocol/contracts
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@
"@types/node": "^20.5.9",
"@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.40.1",
"@venusprotocol/governance-contracts": "^1.4.0-dev.9",
"@venusprotocol/isolated-pools": "^2.3.0-dev.4",
"@venusprotocol/oracle": "^1.8.0-dev.8",
"@venusprotocol/protocol-reserve": "^1.1.0",
"@venusprotocol/venus-protocol": "^6.1.0-dev.5",
"@venusprotocol/governance-contracts": "1.4.0",
"@venusprotocol/isolated-pools": "2.5.0",
"@venusprotocol/oracle": "^1.9.0",
"@venusprotocol/protocol-reserve": "1.4.0",
"@venusprotocol/venus-protocol": "7.2.0",
"assemblyscript": "0.19.23",
"chai": "^4.3.6",
"eslint": "^8.25.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ index 6b5eb75..94badd6 100644

interface IRewardFacet {
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Diamond/interfaces/ISetterFacet.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Diamond/interfaces/ISetterFacet.sol
index 43e629f..a802986 100644
index 6464f5c..a3d1a9d 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Diamond/interfaces/ISetterFacet.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Diamond/interfaces/ISetterFacet.sol
@@ -3,7 +3,7 @@
Expand All @@ -164,7 +164,7 @@ index 43e629f..a802986 100644
-import { VToken } from "../../../Tokens/VTokens/VToken.sol";
+import { CorePoolVToken as VToken } from "../../../Tokens/VTokens/VToken.sol";
import { ComptrollerTypes } from "../../ComptrollerStorage.sol";
import { VAIControllerInterface } from "../../../Tokens/VAI/VAIController.sol";
import { VAIControllerInterface } from "../../../Tokens/VAI/VAIControllerInterface.sol";
import { ComptrollerLensInterface } from "../../../Comptroller/ComptrollerLensInterface.sol";
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Lens/ComptrollerLens.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Lens/ComptrollerLens.sol
index 47e18e3..2394a23 100644
Expand Down Expand Up @@ -193,30 +193,29 @@ index 11b56be..04303bd 100644
import "../Utils/SafeMath.sol";
import "../Comptroller/ComptrollerInterface.sol";
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Oracle/PriceOracle.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Oracle/PriceOracle.sol
index 15f44c1..f8f5685 100644
index 15f44c1..52ddb52 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Oracle/PriceOracle.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Oracle/PriceOracle.sol
@@ -1,6 +1,6 @@
pragma solidity ^0.5.16;

-import "../Tokens/VTokens/VToken.sol";
+import { CorePoolVToken as VToken } from "../Tokens/VTokens/VToken.sol";

contract PriceOracle {
/// @notice Indicator that this is a PriceOracle contract (for inspection)
@@ -12,5 +12,5 @@ contract PriceOracle {
* @return The underlying asset price mantissa (scaled by 1e18).
* Zero means the price is unavailable.
*/
- function getUnderlyingPrice(VToken vToken) external view returns (uint);
+ function getUnderlyingPrice(CorePoolVToken vToken) external view returns (uint);
}
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Tokens/VAI/VAIController.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Tokens/VAI/VAIController.sol
index e1c21d3..191422a 100644
index 508a07a..c818fdd 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Tokens/VAI/VAIController.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Tokens/VAI/VAIController.sol
@@ -5,7 +5,7 @@ import "../../Utils/ErrorReporter.sol";
import "../../Utils/Exponential.sol";
import "../../Comptroller/ComptrollerInterface.sol";
import "@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol";
@@ -6,7 +6,7 @@ import { VAIControllerErrorReporter } from "../../Utils/ErrorReporter.sol";
import { Exponential } from "../../Utils/Exponential.sol";
import { ComptrollerInterface } from "../../Comptroller/ComptrollerInterface.sol";
import { IAccessControlManagerV5 } from "@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol";
-import { VToken, EIP20Interface } from "../VTokens/VToken.sol";
+import { CorePoolVToken as VToken, EIP20Interface } from "../VTokens/VToken.sol";
import "./VAIUnitroller.sol";
import "./VAI.sol";

import { VAIUnitroller, VAIControllerStorageG4 } from "./VAIUnitroller.sol";
import { VAI } from "./VAI.sol";
import { IPrime } from "../Prime/IPrime.sol";
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Tokens/VTokens/VBep20.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Tokens/VTokens/VBep20.sol
index e788777..31a188a 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Tokens/VTokens/VBep20.sol
Expand All @@ -242,27 +241,3 @@ index 7786270..8334f51 100644
struct MintLocalVars {
MathError mathErr;
uint exchangeRateMantissa;
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/test/MockVBNB.sol b/node_modules/@venusprotocol/venus-protocol/contracts/test/MockVBNB.sol
index 3d98cda..ad7e7a1 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/test/MockVBNB.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/test/MockVBNB.sol
@@ -1,6 +1,6 @@
pragma solidity ^0.5.16;

-import "../Tokens/VTokens/VToken.sol";
+import { CorePoolVToken as VToken } from "../Tokens/VTokens/VToken.sol";

/**
* @title Venus's vBNB Contract
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/test/VBep20MockDelegate.sol b/node_modules/@venusprotocol/venus-protocol/contracts/test/VBep20MockDelegate.sol
index fe9520f..f7eceb0 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/test/VBep20MockDelegate.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/test/VBep20MockDelegate.sol
@@ -1,6 +1,6 @@
pragma solidity ^0.5.16;

-import "../Tokens/VTokens/VToken.sol";
+import { CorePoolVToken as VToken } from "../Tokens/VTokens/VToken.sol";

/**
* @title Venus's VBep20 Contract
13 changes: 10 additions & 3 deletions subgraphs/isolated-pools/config/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import mainnetDeployments from '@venusprotocol/isolated-pools/deployments/bscmainnet.json';
import chapelDeployments from '@venusprotocol/isolated-pools/deployments/bsctestnet.json';
import ethereumDeployments from '@venusprotocol/isolated-pools/deployments/ethereum_addresses.json';
import sepoliaDeployments from '@venusprotocol/isolated-pools/deployments/sepolia.json';
import fs from 'fs';
import Mustache from 'mustache';

export const getNetwork = () => {
const supportedNetworks = ['sepolia', 'chapel', 'bsc', 'docker'] as const;
const supportedNetworks = ['mainnet', 'sepolia', 'chapel', 'bsc', 'docker'] as const;
const network = process.env.NETWORK;
// @ts-expect-error network env var is unknown here
if (!supportedNetworks.includes(network)) {
Expand All @@ -19,10 +20,16 @@ const main = () => {
const config = {
docker: {
network: 'hardhat',
poolRegistryAddress: '0x5bf5b11053e734690269C6B9D438F8C9d48F528A',
poolLensAddress: '0xffa7ca1aeeebbc30c874d32c7e22f052bbea0429',
poolRegistryAddress: '0xab16A69A5a8c12C732e0DEFF4BE56A70bb64c926',
poolLensAddress: '0xe3011a37a904ab90c8881a99bd1f6e21401f1522',
startBlock: 0,
},
mainnet: {
network: 'mainnet',
poolRegistryAddress: ethereumDeployments.addresses.PoolRegistry,
poolLensAddress: ethereumDeployments.addresses.PoolLens,
startBlock: '18968000',
},
sepolia: {
network: 'sepolia',
poolRegistryAddress: sepoliaDeployments.contracts.PoolRegistry.address,
Expand Down
2 changes: 2 additions & 0 deletions subgraphs/isolated-pools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
"deploy:docker": "yarn prepare:docker && npx graph deploy venusprotocol/venus-isolated-pools --ipfs http://ipfs:5001 --node http://graph-node:8020/ --version-label ci",
"deploy:chapel": "yarn prepare:chapel && graph deploy venusprotocol/venus-isolated-pools-chapel --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy:bsc": "yarn prepare:bsc && graph deploy venusprotocol/venus-isolated-pools --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy:ethereum": "yarn prepare:ethereum && npx graph deploy venusprotocol/venus-isolated-pools-ethereum --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy:sepolia": "yarn prepare:sepolia && npx graph deploy venusprotocol/venus-isolated-pools-sepolia --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"prepare:docker": "NETWORK=docker npx ts-node config/index.ts",
"prepare:chapel": "NETWORK=chapel npx ts-node config/index.ts",
"prepare:bsc": "NETWORK=bsc npx ts-node config/index.ts",
"prepare:ethereum": "NETWORK=mainnet npx ts-node config/index.ts",
"prepare:sepolia": "NETWORK=sepolia npx ts-node config/index.ts",
"generate-subgraph-types": "rm -rf /subgraph-client/.graphclient && npx graphclient build --dir ./subgraph-client",
"pretty": "prettier —-write '**/*.ts'",
Expand Down
Loading

0 comments on commit 8eb25e8

Please sign in to comment.