Skip to content

Commit

Permalink
fix: listen to indexed MarketListed
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyar committed Nov 21, 2023
1 parent 718eb40 commit a8dbad3
Show file tree
Hide file tree
Showing 5 changed files with 172 additions and 153 deletions.
Original file line number Diff line number Diff line change
@@ -1,57 +1,5 @@
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Comptroller.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Comptroller.sol
index a07ff43..b7db1fa 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Comptroller.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Comptroller.sol
@@ -15,7 +15,7 @@ import "./Unitroller.sol";
* @title Venus's Comptroller Contract
* @author Venus
*/
-contract Comptroller is ComptrollerV12Storage, ComptrollerInterfaceG2, ComptrollerErrorReporter, ExponentialNoError {
+contract CorePoolComptroller is ComptrollerV12Storage, ComptrollerInterfaceG2, ComptrollerErrorReporter, ExponentialNoError {
/// @notice Emitted when an admin supports a market
event MarketListed(VToken vToken);

diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerG3.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerG3.sol
index bb00a9d..8e7e7f6 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerG3.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerG3.sol
@@ -1,7 +1,7 @@
pragma solidity ^0.5.16;

import "../Oracle/PriceOracle.sol";
-import "../Tokens/VTokens/VToken.sol";
+import { CorePoolVToken as VToken } from "../Tokens/VTokens/VToken.sol";
import "../Utils/ErrorReporter.sol";
import "../Utils/Exponential.sol";
import "../Tokens/XVS/XVS.sol";
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerG4.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerG4.sol
index aa478da..f6e7393 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerG4.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerG4.sol
@@ -1,7 +1,7 @@
pragma solidity ^0.5.16;

import "../Oracle/PriceOracle.sol";
-import "../Tokens/VTokens/VToken.sol";
+import { CorePoolVToken as VToken } from "../Tokens/VTokens/VToken.sol";
import "../Utils/ErrorReporter.sol";
import "../Tokens/XVS/XVS.sol";
import "../Tokens/VAI/VAI.sol";
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerG5.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerG5.sol
index e1c447f..942b96c 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerG5.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerG5.sol
@@ -1,7 +1,7 @@
pragma solidity ^0.5.16;

import "../Oracle/PriceOracle.sol";
-import "../Tokens/VTokens/VToken.sol";
+import { CorePoolVToken as VToken } from "../Tokens/VTokens/VToken.sol";
import "../Utils/ErrorReporter.sol";
import "../Tokens/XVS/XVS.sol";
import "../Tokens/VAI/VAI.sol";
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerInterface.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerInterface.sol
index c8695bc..83177b7 100644
index a6c8838..2d54e80 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerInterface.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerInterface.sol
@@ -1,6 +1,6 @@
Expand All @@ -60,8 +8,8 @@ index c8695bc..83177b7 100644
-import "../Tokens/VTokens/VToken.sol";
+import { CorePoolVToken as VToken } from "../Tokens/VTokens/VToken.sol";
import "../Oracle/PriceOracle.sol";
import "../Tokens/VAI/VAIControllerInterface.sol";

contract ComptrollerInterfaceG1 {
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerLensInterface.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerLensInterface.sol
index 2f56b52..fcd8940 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerLensInterface.sol
Expand All @@ -76,83 +24,124 @@ index 2f56b52..fcd8940 100644
interface ComptrollerLensInterface {
function liquidateCalculateSeizeTokens(
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerStorage.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerStorage.sol
index d651f66..80c99db 100644
index 729ada8..c0de12b 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerStorage.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerStorage.sol
@@ -1,6 +1,6 @@
pragma solidity ^0.5.16;

-import "../Tokens/VTokens/VToken.sol";
+import { CorePoolVToken as VToken } from "../Tokens/VTokens/VToken.sol";
import "../Oracle/PriceOracle.sol";
import "../Tokens/VAI/VAIControllerInterface.sol";
import "./ComptrollerLensInterface.sol";
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/UpdatedComptroller.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/UpdatedComptroller.sol
index 68c1ff9..28cf9af 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/UpdatedComptroller.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/UpdatedComptroller.sol
@@ -1,7 +1,7 @@
pragma solidity ^0.5.16;
@@ -2,7 +2,7 @@

import "../Oracle/PriceOracle.sol";
-import "../Tokens/VTokens/VToken.sol";
+import { CorePoolVToken as VToken } from "../Tokens/VTokens/VToken.sol";
import "../Utils/ErrorReporter.sol";
import "../Tokens/XVS/XVS.sol";
import "../Tokens/VAI/VAI.sol";
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/UpdatedComptrollerInterface.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/UpdatedComptrollerInterface.sol
index 3e476c3..565ebda 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/UpdatedComptrollerInterface.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/UpdatedComptrollerInterface.sol
@@ -1,6 +1,6 @@
pragma solidity ^0.5.16;

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

contract UpdatedComptrollerInterfaceG1 {
import { PriceOracle } from "../Oracle/PriceOracle.sol";
import { VAIControllerInterface } from "../Tokens/VAI/VAIControllerInterface.sol";
import { ComptrollerLensInterface } from "./ComptrollerLensInterface.sol";
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Diamond/facets/FacetBase.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Diamond/facets/FacetBase.sol
index 47d6d43..0bfc050 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Diamond/facets/FacetBase.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Diamond/facets/FacetBase.sol
@@ -2,7 +2,7 @@

pragma solidity 0.5.16;

-import { VToken, ComptrollerErrorReporter, ExponentialNoError } from "../../../Tokens/VTokens/VToken.sol";
+import { CorePoolVToken as VToken, ComptrollerErrorReporter, ExponentialNoError } from "../../../Tokens/VTokens/VToken.sol";
import { IVAIVault } from "../../../Comptroller/ComptrollerInterface.sol";
import { ComptrollerV14Storage } from "../../../Comptroller/ComptrollerStorage.sol";
import { IAccessControlManagerV5 } from "@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol";
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Diamond/interfaces/IMarketFacet.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Diamond/interfaces/IMarketFacet.sol
index 684d76f..4e8ce87 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Diamond/interfaces/IMarketFacet.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Diamond/interfaces/IMarketFacet.sol
@@ -2,7 +2,7 @@

pragma solidity 0.5.16;

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

interface IMarketFacet {
function isComptroller() external pure returns (bool);
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Diamond/interfaces/IPolicyFacet.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Diamond/interfaces/IPolicyFacet.sol
index 3eac49c..faf85a5 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Diamond/interfaces/IPolicyFacet.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Diamond/interfaces/IPolicyFacet.sol
@@ -2,7 +2,7 @@

pragma solidity 0.5.16;

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

interface IPolicyFacet {
function mintAllowed(address vToken, address minter, uint256 mintAmount) external returns (uint256);
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Diamond/interfaces/IRewardFacet.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Diamond/interfaces/IRewardFacet.sol
index f44a8f0..bb2a814 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Diamond/interfaces/IRewardFacet.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Diamond/interfaces/IRewardFacet.sol
@@ -2,7 +2,7 @@

pragma solidity 0.5.16;

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

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 35526fc..a07eab4 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 @@
pragma solidity 0.5.16;

import { PriceOracle } from "../../../Oracle/PriceOracle.sol";
-import { VToken } from "../../../Tokens/VTokens/VToken.sol";
+import { CorePoolVToken as VToken } from "../../../Tokens/VTokens/VToken.sol";
import { ComptrollerV14Storage } from "../../ComptrollerStorage.sol";
import { VAIControllerInterface } from "../../../Tokens/VAI/VAIController.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 5e08227..6de41a6 100644
index 3359849..9a5feaa 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Lens/ComptrollerLens.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Lens/ComptrollerLens.sol
@@ -6,7 +6,7 @@ import "../Tokens/VTokens/VToken.sol";
@@ -2,7 +2,7 @@ pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;

import "../Tokens/VTokens/VBep20.sol";
-import "../Tokens/VTokens/VToken.sol";
+import { CorePoolVToken as VToken } from "../Tokens/VTokens/VToken.sol";
import "../Tokens/EIP20Interface.sol";
import "../Oracle/PriceOracle.sol";
import "../Utils/ErrorReporter.sol";
-import "../Comptroller/Comptroller.sol";
+import { CorePoolComptroller as Comptroller, ComptrollerLensInterface, ComptrollerErrorReporter } from "../Comptroller/Comptroller.sol";
import "../Tokens/VAI/VAIControllerInterface.sol";

/**
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Lens/SnapshotLens.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Lens/SnapshotLens.sol
index d44d94a..8750d4d 100644
index 9bad3b7..d8bc659 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Lens/SnapshotLens.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Lens/SnapshotLens.sol
@@ -3,7 +3,7 @@ pragma experimental ABIEncoderV2;
@@ -1,7 +1,7 @@
pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;

import "../Tokens/VTokens/VToken.sol";
-import "../Tokens/VTokens/VToken.sol";
+import { CorePoolVToken as VToken } from "../Tokens/VTokens/VToken.sol";
import "../Utils/SafeMath.sol";
-import "../Comptroller/Comptroller.sol";
+import { CorePoolComptroller as Comptroller } from "../Comptroller/Comptroller.sol";
import "../Comptroller/ComptrollerInterface.sol";
import "../Tokens/EIP20Interface.sol";
import "../Tokens/VTokens/VBep20.sol";

diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Lens/VenusLens.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Lens/VenusLens.sol
index 234ca82..8906ec0 100644
index a2448a4..e0ceda8 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Lens/VenusLens.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Lens/VenusLens.sol
@@ -2,7 +2,7 @@ pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;

import "../Tokens/VTokens/VBep20.sol";
-import "../Tokens/VTokens/VToken.sol";
+import { CorePoolVToken as VToken } from "../Tokens/VTokens/VToken.sol";
+import {CorePoolVToken as VToken } from "../Tokens/VTokens/VToken.sol";
import "../Oracle/PriceOracle.sol";
import "../Tokens/EIP20Interface.sol";
import "../Governance/GovernorAlpha.sol";
import "../Tokens/XVS/XVS.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..a7aca96 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 @@
Expand All @@ -164,35 +153,35 @@ index 15f44c1..f8f5685 100644
contract PriceOracle {
/// @notice Indicator that this is a PriceOracle contract (for inspection)
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 5998a64..b03f187 100644
index 7e76520..738f1e6 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Tokens/VAI/VAIController.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Tokens/VAI/VAIController.sol
@@ -4,7 +4,7 @@ import "../../Oracle/PriceOracle.sol";
import "../../Utils/ErrorReporter.sol";
@@ -5,7 +5,7 @@ import "../../Utils/ErrorReporter.sol";
import "../../Utils/Exponential.sol";
import "../../Comptroller/ComptrollerStorage.sol";
-import { Comptroller } from "../../Comptroller/Comptroller.sol";
+import { CorePoolComptroller } from "../../Comptroller/Comptroller.sol";
import "../../Governance/IAccessControlManager.sol";
import "../VTokens/VToken.sol";
import "./VAIControllerStorage.sol";
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Tokens/VAI/VAIControllerStorage.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Tokens/VAI/VAIControllerStorage.sol
index 2dbd38a..548c27e 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Tokens/VAI/VAIControllerStorage.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Tokens/VAI/VAIControllerStorage.sol
import "../../Comptroller/ComptrollerInterface.sol";
import "@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol";
-import "../VTokens/VToken.sol";
+import { CorePoolVToken as VToken } from "../VTokens/VToken.sol";
import "./VAIUnitroller.sol";
import "./VAI.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 53ea99e..195a94c 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Tokens/VTokens/VBep20.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Tokens/VTokens/VBep20.sol
@@ -1,6 +1,6 @@
pragma solidity ^0.5.16;

-import { Comptroller } from "../../Comptroller/Comptroller.sol";
+import { CorePoolComptroller as Comptroller } from "../../Comptroller/Comptroller.sol";
-import "./VToken.sol";
+import { CorePoolVToken as VToken } from "./VToken.sol";

contract VAIUnitrollerAdminStorage {
/**
/**
* @title Venus's VBep20 Contract
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Tokens/VTokens/VToken.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Tokens/VTokens/VToken.sol
index fdbc8b8..4c27206 100644
index 7786270..8334f51 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Tokens/VTokens/VToken.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Tokens/VTokens/VToken.sol
@@ -13,7 +13,7 @@ import "./VTokenInterfaces.sol";
@@ -14,7 +14,7 @@ import { IAccessControlManagerV5 } from "@venusprotocol/governance-contracts/con
* @notice Abstract base for vTokens
* @author Venus
*/
Expand All @@ -202,7 +191,7 @@ index fdbc8b8..4c27206 100644
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 a8a4cab..59d4173 100644
index 3d98cda..1d0c236 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 @@
Expand All @@ -214,7 +203,7 @@ index a8a4cab..59d4173 100644
/**
* @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
index fe9520f..1af355e 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 @@
Expand Down
2 changes: 1 addition & 1 deletion subgraphs/venus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"test:integration": "true"
},
"dependencies": {
"@venusprotocol/venus-protocol": "3.1.0",
"@venusprotocol/venus-protocol": "5.2.0",
"@venusprotocol/venus-protocol-orig-events": "npm:@venusprotocol/[email protected]"
}
}
Loading

0 comments on commit a8dbad3

Please sign in to comment.