Skip to content

Commit

Permalink
fix: add back patch package
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyar committed Sep 25, 2023
1 parent 36cbd79 commit 507e7c9
Show file tree
Hide file tree
Showing 3 changed files with 201 additions and 5 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"pretty": "prettier '**/*.ts' --write",
"test": "yarn workspaces foreach run test",
"test:integration": "yarn workspaces foreach run test:integration",
"postinstall": "./copy_contracts.sh"
"postinstall": "patch-package && ./copy_contracts.sh"
},
"devDependencies": {
"@graphprotocol/client-cli": "^3.0.0",
Expand Down Expand Up @@ -69,6 +69,7 @@
"matchstick-as": "^0.5.0",
"module-alias": "^2.2.2",
"mustache": "^4.2.0",
"patch-package": "6.5.1",
"prettier": "^2.5.1",
"prettier-airbnb-config": "^1.0.0",
"solidity-coverage": "^0.7.21",
Expand Down
111 changes: 111 additions & 0 deletions patches/patches/@venusprotocol+venus-protocol+0.6.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Comptroller.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/Comptroller.sol
index 918388f..233b6fc 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 ComptrollerV10Storage, ComptrollerInterfaceG2, ComptrollerErrorReporter, ExponentialNoError {
+contract CorePoolComptroller is ComptrollerV10Storage, 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/ComptrollerInterface.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Comptroller/ComptrollerInterface.sol
index 4c0ce6c..f18c3a5 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 @@
pragma solidity ^0.5.16;

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

contract ComptrollerInterfaceG1 {
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Lens/ComptrollerLens.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Lens/ComptrollerLens.sol
index b5a296a..7b104ef 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Lens/ComptrollerLens.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Lens/ComptrollerLens.sol
@@ -6,7 +6,8 @@ import "../Tokens/VTokens/VToken.sol";
import "../Tokens/EIP20Interface.sol";
import "../Oracle/PriceOracle.sol";
import "../Utils/ErrorReporter.sol";
-import "../Comptroller/Comptroller.sol";
+import { ComptrollerLensInterface } from "../Comptroller/ComptrollerLensInterface.sol";
+import { CorePoolComptroller as Comptroller, ComptrollerErrorReporter, ExponentialNoError } from "../Comptroller/Comptroller.sol";
import "../Tokens/VAI/VAIControllerInterface.sol";

contract ComptrollerLens is ComptrollerLensInterface, ComptrollerErrorReporter, ExponentialNoError {
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/Lens/SnapshotLens.sol b/node_modules/@venusprotocol/venus-protocol/contracts/Lens/SnapshotLens.sol
index d44d94a..826ce00 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Lens/SnapshotLens.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Lens/SnapshotLens.sol
@@ -1,9 +1,9 @@
pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;

-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 "../Tokens/EIP20Interface.sol";
import "../Tokens/VTokens/VBep20.sol";

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 2f472d8..9655f39 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/Tokens/VAI/VAIController.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/Tokens/VAI/VAIController.sol
@@ -4,9 +4,9 @@ import "../../Oracle/PriceOracle.sol";
import "../../Utils/ErrorReporter.sol";
import "../../Utils/Exponential.sol";
import "../../Comptroller/ComptrollerStorage.sol";
-import "../../Comptroller/Comptroller.sol";
+import { CorePoolComptroller as Comptroller } from "../../Comptroller/Comptroller.sol";
import "../../Governance/IAccessControlManager.sol";
-import "../VTokens/VToken.sol";
+import { CorePoolVToken as VToken } from "../VTokens/VToken.sol";
import "./VAIControllerStorage.sol";
import "./VAIUnitroller.sol";
import "./VAI.sol";
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 3cc3e70..e7be892 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";
* @notice Abstract base for VTokens
* @author Venus
*/
-contract VToken is VTokenInterface, Exponential, TokenErrorReporter {
+contract CorePoolVToken is VTokenInterface, Exponential, TokenErrorReporter {
/**
* @notice Initialize the money market
* @param comptroller_ The address of the Comptroller
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/test/ComptrollerHarness.sol b/node_modules/@venusprotocol/venus-protocol/contracts/test/ComptrollerHarness.sol
index f5495f4..362cb61 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/test/ComptrollerHarness.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/test/ComptrollerHarness.sol
@@ -1,6 +1,8 @@
pragma solidity ^0.5.16;

-import "../Comptroller/Comptroller.sol";
+import { UnitrollerAdminStorage } from "../Comptroller/ComptrollerStorage.sol";
+import { Unitroller } from "../Comptroller/Unitroller.sol";
+import { CorePoolComptroller as Comptroller } from "../Comptroller/Comptroller.sol";
import "../Oracle/PriceOracle.sol";

contract ComptrollerKovan is Comptroller {
diff --git a/node_modules/@venusprotocol/venus-protocol/contracts/test/ComptrollerScenario.sol b/node_modules/@venusprotocol/venus-protocol/contracts/test/ComptrollerScenario.sol
index 8c247aa..1c6e3db 100644
--- a/node_modules/@venusprotocol/venus-protocol/contracts/test/ComptrollerScenario.sol
+++ b/node_modules/@venusprotocol/venus-protocol/contracts/test/ComptrollerScenario.sol
@@ -1,6 +1,7 @@
pragma solidity ^0.5.16;

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

contract ComptrollerScenario is Comptroller {
uint public blockNumber;
92 changes: 88 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5260,6 +5260,13 @@ __metadata:
languageName: node
linkType: hard

"@yarnpkg/lockfile@npm:^1.1.0":
version: 1.1.0
resolution: "@yarnpkg/lockfile@npm:1.1.0"
checksum: 05b881b4866a3546861fee756e6d3812776ea47fa6eb7098f983d6d0eefa02e12b66c3fff931574120f196286a7ad4879ce02743c8bb2be36c6a576c7852083a
languageName: node
linkType: hard

"JSONStream@npm:1.3.2":
version: 1.3.2
resolution: "JSONStream@npm:1.3.2"
Expand Down Expand Up @@ -7516,7 +7523,7 @@ __metadata:
languageName: node
linkType: hard

"cross-spawn@npm:^6.0.0":
"cross-spawn@npm:^6.0.0, cross-spawn@npm:^6.0.5":
version: 6.0.5
resolution: "cross-spawn@npm:6.0.5"
dependencies:
Expand Down Expand Up @@ -9139,6 +9146,15 @@ __metadata:
languageName: node
linkType: hard

"find-yarn-workspace-root@npm:^2.0.0":
version: 2.0.0
resolution: "find-yarn-workspace-root@npm:2.0.0"
dependencies:
micromatch: ^4.0.2
checksum: fa5ca8f9d08fe7a54ce7c0a5931ff9b7e36f9ee7b9475fb13752bcea80ec6b5f180fa5102d60b376d5526ce924ea3fc6b19301262efa0a5d248dd710f3644242
languageName: node
linkType: hard

"flat-cache@npm:^3.0.4":
version: 3.1.0
resolution: "flat-cache@npm:3.1.0"
Expand Down Expand Up @@ -9304,7 +9320,7 @@ __metadata:
languageName: node
linkType: hard

"fs-extra@npm:9.1.0, fs-extra@npm:^9.1.0":
"fs-extra@npm:9.1.0, fs-extra@npm:^9.0.0, fs-extra@npm:^9.1.0":
version: 9.1.0
resolution: "fs-extra@npm:9.1.0"
dependencies:
Expand Down Expand Up @@ -9942,6 +9958,13 @@ __metadata:
languageName: node
linkType: hard

"graceful-fs@npm:^4.1.11":
version: 4.2.11
resolution: "graceful-fs@npm:4.2.11"
checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7
languageName: node
linkType: hard

"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.1.9, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6":
version: 4.2.10
resolution: "graceful-fs@npm:4.2.10"
Expand Down Expand Up @@ -10899,6 +10922,17 @@ __metadata:
languageName: node
linkType: hard

"is-ci@npm:^2.0.0":
version: 2.0.0
resolution: "is-ci@npm:2.0.0"
dependencies:
ci-info: ^2.0.0
bin:
is-ci: bin.js
checksum: 77b869057510f3efa439bbb36e9be429d53b3f51abd4776eeea79ab3b221337fe1753d1e50058a9e2c650d38246108beffb15ccfd443929d77748d8c0cc90144
languageName: node
linkType: hard

"is-core-module@npm:^2.13.0":
version: 2.13.0
resolution: "is-core-module@npm:2.13.0"
Expand Down Expand Up @@ -11707,6 +11741,15 @@ __metadata:
languageName: node
linkType: hard

"klaw-sync@npm:^6.0.0":
version: 6.0.0
resolution: "klaw-sync@npm:6.0.0"
dependencies:
graceful-fs: ^4.1.11
checksum: 0da397f8961313c3ef8f79fb63af9002cde5a8fb2aeb1a37351feff0dd6006129c790400c3f5c3b4e757bedcabb13d21ec0a5eaef5a593d59515d4f2c291e475
languageName: node
linkType: hard

"klaw@npm:^1.0.0":
version: 1.3.1
resolution: "klaw@npm:1.3.1"
Expand Down Expand Up @@ -12360,7 +12403,7 @@ __metadata:
languageName: node
linkType: hard

"micromatch@npm:^4.0.4, micromatch@npm:^4.0.5":
"micromatch@npm:^4.0.2, micromatch@npm:^4.0.4, micromatch@npm:^4.0.5":
version: 4.0.5
resolution: "micromatch@npm:4.0.5"
dependencies:
Expand Down Expand Up @@ -13704,6 +13747,30 @@ __metadata:
languageName: node
linkType: hard

"patch-package@npm:6.5.1":
version: 6.5.1
resolution: "patch-package@npm:6.5.1"
dependencies:
"@yarnpkg/lockfile": ^1.1.0
chalk: ^4.1.2
cross-spawn: ^6.0.5
find-yarn-workspace-root: ^2.0.0
fs-extra: ^9.0.0
is-ci: ^2.0.0
klaw-sync: ^6.0.0
minimist: ^1.2.6
open: ^7.4.2
rimraf: ^2.6.3
semver: ^5.6.0
slash: ^2.0.0
tmp: ^0.0.33
yaml: ^1.10.2
bin:
patch-package: index.js
checksum: 8530ffa30f11136b527c6eddf6da48fa12856ee510a47edb1f9cdf8a025636adb82968f5fae778b5e04ce8c87915ebdf5911422b54add59a5a42e372a8f30eb2
languageName: node
linkType: hard

"path-browserify@npm:1.0.1":
version: 1.0.1
resolution: "path-browserify@npm:1.0.1"
Expand Down Expand Up @@ -14914,6 +14981,15 @@ __metadata:
languageName: node
linkType: hard

"semver@npm:^5.6.0":
version: 5.7.2
resolution: "semver@npm:5.7.2"
bin:
semver: bin/semver
checksum: fb4ab5e0dd1c22ce0c937ea390b4a822147a9c53dbd2a9a0132f12fe382902beef4fbf12cf51bb955248d8d15874ce8cd89532569756384f994309825f10b686
languageName: node
linkType: hard

"semver@npm:^6.3.0, semver@npm:^6.3.1":
version: 6.3.1
resolution: "semver@npm:6.3.1"
Expand Down Expand Up @@ -15145,6 +15221,13 @@ __metadata:
languageName: node
linkType: hard

"slash@npm:^2.0.0":
version: 2.0.0
resolution: "slash@npm:2.0.0"
checksum: 512d4350735375bd11647233cb0e2f93beca6f53441015eea241fe784d8068281c3987fbaa93e7ef1c38df68d9c60013045c92837423c69115297d6169aa85e6
languageName: node
linkType: hard

"slash@npm:^3.0.0":
version: 3.0.0
resolution: "slash@npm:3.0.0"
Expand Down Expand Up @@ -15698,6 +15781,7 @@ __metadata:
matchstick-as: ^0.5.0
module-alias: ^2.2.2
mustache: ^4.2.0
patch-package: 6.5.1
prettier: ^2.5.1
prettier-airbnb-config: ^1.0.0
solidity-coverage: ^0.7.21
Expand Down Expand Up @@ -15981,7 +16065,7 @@ __metadata:
languageName: node
linkType: hard

"tmp@npm:0.0.33":
"tmp@npm:0.0.33, tmp@npm:^0.0.33":
version: 0.0.33
resolution: "tmp@npm:0.0.33"
dependencies:
Expand Down

0 comments on commit 507e7c9

Please sign in to comment.