@venusprotocol/venus-protocol 6.1.0-dev.7 → 6.1.0-dev.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol/AccessControlledV8.dbg.json +1 -1
  2. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol/IAccessControlManagerV8.dbg.json +1 -1
  3. package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/BoundValidatorInterface.dbg.json +1 -1
  4. package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/OracleInterface.dbg.json +1 -1
  5. package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/ResilientOracleInterface.dbg.json +1 -1
  6. package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/TwapInterface.dbg.json +1 -1
  7. package/artifacts/@venusprotocol/solidity-utilities/contracts/MaxLoopsLimitHelper.sol/MaxLoopsLimitHelper.dbg.json +1 -1
  8. package/artifacts/build-info/{eeb502cfa65684cfcd3f593c290d1e44.json → ca9cec918639b6d02d5466619a4c008d.json} +1 -1
  9. package/artifacts/contracts/Admin/VBNBAdmin.sol/VBNBAdmin.dbg.json +1 -1
  10. package/artifacts/contracts/Admin/VBNBAdminStorage.sol/IProtocolShareReserve.dbg.json +1 -1
  11. package/artifacts/contracts/Admin/VBNBAdminStorage.sol/IWBNB.dbg.json +1 -1
  12. package/artifacts/contracts/Admin/VBNBAdminStorage.sol/VBNBAdminStorage.dbg.json +1 -1
  13. package/artifacts/contracts/Admin/VBNBAdminStorage.sol/VTokenInterface.dbg.json +1 -1
  14. package/artifacts/contracts/DelegateBorrowers/MoveDebtDelegate.sol/MoveDebtDelegate.dbg.json +4 -0
  15. package/artifacts/contracts/DelegateBorrowers/MoveDebtDelegate.sol/MoveDebtDelegate.json +361 -0
  16. package/artifacts/contracts/DelegateBorrowers/SwapDebtDelegate.sol/SwapDebtDelegate.dbg.json +1 -1
  17. package/artifacts/contracts/DelegateBorrowers/SwapDebtDelegate.sol/SwapDebtDelegate.json +4 -4
  18. package/artifacts/contracts/InterfacesV8.sol/IComptroller.dbg.json +4 -0
  19. package/artifacts/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IComptroller.json +14 -1
  20. package/artifacts/contracts/InterfacesV8.sol/ILiquidator.dbg.json +4 -0
  21. package/artifacts/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/ILiquidator.json +1 -1
  22. package/artifacts/contracts/InterfacesV8.sol/IVAIController.dbg.json +4 -0
  23. package/artifacts/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IVAIController.json +1 -1
  24. package/artifacts/contracts/InterfacesV8.sol/IVBNB.dbg.json +4 -0
  25. package/artifacts/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IVBNB.json +15 -2
  26. package/artifacts/contracts/InterfacesV8.sol/IVBep20.dbg.json +4 -0
  27. package/artifacts/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IVBep20.json +63 -2
  28. package/artifacts/contracts/InterfacesV8.sol/IVToken.dbg.json +4 -0
  29. package/artifacts/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IVToken.json +15 -2
  30. package/artifacts/contracts/Liquidator/BUSDLiquidator.sol/BUSDLiquidator.dbg.json +1 -1
  31. package/artifacts/contracts/Liquidator/BUSDLiquidator.sol/BUSDLiquidator.json +3 -3
  32. package/artifacts/contracts/Liquidator/Liquidator.sol/Liquidator.dbg.json +1 -1
  33. package/artifacts/contracts/Liquidator/Liquidator.sol/Liquidator.json +7 -7
  34. package/artifacts/contracts/PegStability/IVAI.sol/IVAI.dbg.json +1 -1
  35. package/artifacts/contracts/PegStability/PegStability.sol/PegStability.dbg.json +1 -1
  36. package/artifacts/contracts/Swap/IRouterHelper.sol/IRouterHelper.dbg.json +1 -1
  37. package/artifacts/contracts/Swap/RouterHelper.sol/RouterHelper.dbg.json +1 -1
  38. package/artifacts/contracts/Swap/SwapRouter.sol/SwapRouter.dbg.json +1 -1
  39. package/artifacts/contracts/Swap/interfaces/IPancakePair.sol/IPancakePair.dbg.json +1 -1
  40. package/artifacts/contracts/Swap/interfaces/IPancakeSwapV2Factory.sol/IPancakeSwapV2Factory.dbg.json +1 -1
  41. package/artifacts/contracts/Swap/interfaces/IPancakeSwapV2Router.sol/IPancakeSwapV2Router.dbg.json +1 -1
  42. package/artifacts/contracts/Swap/interfaces/IVBNB.sol/IVBNB.dbg.json +1 -1
  43. package/artifacts/contracts/Swap/interfaces/IVtoken.sol/IVToken.dbg.json +1 -1
  44. package/artifacts/contracts/Swap/interfaces/IWBNB.sol/IWBNB.dbg.json +1 -1
  45. package/artifacts/contracts/Swap/interfaces/InterfaceComptroller.sol/InterfaceComptroller.dbg.json +1 -1
  46. package/artifacts/contracts/Swap/lib/PancakeLibrary.sol/PancakeLibrary.dbg.json +1 -1
  47. package/artifacts/contracts/Swap/lib/TransferHelper.sol/TransferHelper.dbg.json +1 -1
  48. package/artifacts/contracts/Tokens/Prime/Interfaces/IPrime.sol/IPrime.dbg.json +1 -1
  49. package/artifacts/contracts/Tokens/Prime/Interfaces/IPrimeLiquidityProvider.sol/IPrimeLiquidityProvider.dbg.json +1 -1
  50. package/artifacts/contracts/Tokens/Prime/Interfaces/IVToken.sol/IVToken.dbg.json +1 -1
  51. package/artifacts/contracts/Tokens/Prime/Interfaces/IXVSVault.sol/IXVSVault.dbg.json +1 -1
  52. package/artifacts/contracts/Tokens/Prime/Interfaces/InterfaceComptroller.sol/InterfaceComptroller.dbg.json +1 -1
  53. package/artifacts/contracts/Tokens/Prime/Prime.sol/Prime.dbg.json +1 -1
  54. package/artifacts/contracts/Tokens/Prime/PrimeLiquidityProvider.sol/PrimeLiquidityProvider.dbg.json +1 -1
  55. package/artifacts/contracts/Tokens/Prime/PrimeStorage.sol/PrimeStorageV1.dbg.json +1 -1
  56. package/artifacts/contracts/Tokens/Prime/libs/FixedMath.sol/FixedMath.dbg.json +1 -1
  57. package/artifacts/contracts/Tokens/Prime/libs/FixedMath0x.sol/FixedMath0x.dbg.json +1 -1
  58. package/artifacts/contracts/Tokens/Prime/libs/Scores.sol/Scores.dbg.json +1 -1
  59. package/artifacts/contracts/test/AccessControlManagerMock.sol/AccessControlManagerMock.dbg.json +1 -1
  60. package/artifacts/contracts/test/LiquidatorHarness.sol/LiquidatorHarness.dbg.json +1 -1
  61. package/artifacts/contracts/test/LiquidatorHarness.sol/LiquidatorHarness.json +7 -7
  62. package/artifacts/contracts/test/MockProtocolShareReserve.sol/IComptroller.dbg.json +1 -1
  63. package/artifacts/contracts/test/MockProtocolShareReserve.sol/IIncomeDestination.dbg.json +1 -1
  64. package/artifacts/contracts/test/MockProtocolShareReserve.sol/IMockProtocolShareReserve.dbg.json +1 -1
  65. package/artifacts/contracts/test/MockProtocolShareReserve.sol/IPoolRegistry.dbg.json +1 -1
  66. package/artifacts/contracts/test/MockProtocolShareReserve.sol/IPrime.dbg.json +1 -1
  67. package/artifacts/contracts/test/MockProtocolShareReserve.sol/IVToken.dbg.json +1 -1
  68. package/artifacts/contracts/test/MockProtocolShareReserve.sol/MaxLoopsLimitHelper.dbg.json +1 -1
  69. package/artifacts/contracts/test/MockProtocolShareReserve.sol/MockProtocolShareReserve.dbg.json +1 -1
  70. package/artifacts/contracts/test/PrimeScenario.sol/PrimeScenario.dbg.json +1 -1
  71. package/contracts/DelegateBorrowers/MoveDebtDelegate.sol +179 -0
  72. package/contracts/DelegateBorrowers/SwapDebtDelegate.sol +15 -31
  73. package/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol} +10 -3
  74. package/contracts/Liquidator/BUSDLiquidator.sol +6 -5
  75. package/contracts/Liquidator/Liquidator.sol +6 -5
  76. package/dist/typechain/contracts/DelegateBorrowers/MoveDebtDelegate.d.ts +274 -0
  77. package/dist/typechain/contracts/DelegateBorrowers/{SwapDebtDelegate.sol/SwapDebtDelegate.d.ts → SwapDebtDelegate.d.ts} +1 -1
  78. package/dist/typechain/contracts/DelegateBorrowers/index.d.ts +2 -2
  79. package/dist/typechain/contracts/DelegateBorrowers/index.js +0 -1
  80. package/dist/typechain/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IComptroller.d.ts +10 -2
  81. package/dist/typechain/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/ILiquidator.d.ts +1 -1
  82. package/dist/typechain/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IVAIController.d.ts +1 -1
  83. package/dist/typechain/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IVBNB.d.ts +15 -7
  84. package/dist/typechain/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IVBep20.d.ts +47 -7
  85. package/dist/typechain/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IVToken.d.ts +15 -7
  86. package/dist/typechain/contracts/Liquidator/index.d.ts +0 -2
  87. package/dist/typechain/contracts/Liquidator/index.js +0 -1
  88. package/dist/typechain/contracts/index.d.ts +2 -0
  89. package/dist/typechain/factories/contracts/DelegateBorrowers/MoveDebtDelegate__factory.d.ts +294 -0
  90. package/dist/typechain/factories/contracts/DelegateBorrowers/MoveDebtDelegate__factory.js +390 -0
  91. package/dist/typechain/factories/contracts/DelegateBorrowers/{SwapDebtDelegate.sol/SwapDebtDelegate__factory.d.ts → SwapDebtDelegate__factory.d.ts} +5 -5
  92. package/dist/typechain/factories/contracts/DelegateBorrowers/{SwapDebtDelegate.sol/SwapDebtDelegate__factory.js → SwapDebtDelegate__factory.js} +3 -3
  93. package/dist/typechain/factories/contracts/DelegateBorrowers/index.d.ts +2 -1
  94. package/dist/typechain/factories/contracts/DelegateBorrowers/index.js +5 -25
  95. package/dist/typechain/factories/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IComptroller__factory.d.ts +11 -1
  96. package/dist/typechain/factories/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IComptroller__factory.js +13 -0
  97. package/dist/typechain/factories/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/ILiquidator__factory.d.ts +1 -1
  98. package/dist/typechain/factories/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IVAIController__factory.d.ts +1 -1
  99. package/dist/typechain/factories/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IVBNB__factory.d.ts +12 -2
  100. package/dist/typechain/factories/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IVBNB__factory.js +14 -1
  101. package/dist/typechain/factories/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IVBep20__factory.d.ts +48 -2
  102. package/dist/typechain/factories/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IVBep20__factory.js +62 -1
  103. package/dist/typechain/factories/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IVToken__factory.d.ts +12 -2
  104. package/dist/typechain/factories/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IVToken__factory.js +14 -1
  105. package/dist/typechain/factories/contracts/Liquidator/BUSDLiquidator__factory.d.ts +2 -2
  106. package/dist/typechain/factories/contracts/Liquidator/BUSDLiquidator__factory.js +2 -2
  107. package/dist/typechain/factories/contracts/Liquidator/Liquidator__factory.d.ts +5 -5
  108. package/dist/typechain/factories/contracts/Liquidator/Liquidator__factory.js +6 -6
  109. package/dist/typechain/factories/contracts/Liquidator/index.d.ts +0 -1
  110. package/dist/typechain/factories/contracts/Liquidator/index.js +1 -25
  111. package/dist/typechain/factories/contracts/index.d.ts +1 -0
  112. package/dist/typechain/factories/contracts/index.js +2 -1
  113. package/dist/typechain/factories/contracts/test/LiquidatorHarness__factory.d.ts +5 -5
  114. package/dist/typechain/factories/contracts/test/LiquidatorHarness__factory.js +6 -6
  115. package/dist/typechain/index.d.ts +14 -14
  116. package/dist/typechain/index.js +14 -14
  117. package/package.json +1 -1
  118. package/artifacts/contracts/DelegateBorrowers/SwapDebtDelegate.sol/IComptroller.dbg.json +0 -4
  119. package/artifacts/contracts/DelegateBorrowers/SwapDebtDelegate.sol/IComptroller.json +0 -24
  120. package/artifacts/contracts/DelegateBorrowers/SwapDebtDelegate.sol/IPriceOracle.dbg.json +0 -4
  121. package/artifacts/contracts/DelegateBorrowers/SwapDebtDelegate.sol/IPriceOracle.json +0 -30
  122. package/artifacts/contracts/DelegateBorrowers/SwapDebtDelegate.sol/IVToken.dbg.json +0 -4
  123. package/artifacts/contracts/DelegateBorrowers/SwapDebtDelegate.sol/IVToken.json +0 -104
  124. package/artifacts/contracts/Liquidator/Interfaces.sol/IComptroller.dbg.json +0 -4
  125. package/artifacts/contracts/Liquidator/Interfaces.sol/ILiquidator.dbg.json +0 -4
  126. package/artifacts/contracts/Liquidator/Interfaces.sol/IVAIController.dbg.json +0 -4
  127. package/artifacts/contracts/Liquidator/Interfaces.sol/IVBNB.dbg.json +0 -4
  128. package/artifacts/contracts/Liquidator/Interfaces.sol/IVBep20.dbg.json +0 -4
  129. package/artifacts/contracts/Liquidator/Interfaces.sol/IVToken.dbg.json +0 -4
  130. package/contracts/Liquidator/constants.sol +0 -5
  131. package/contracts/Liquidator/zeroAddress.sol +0 -11
  132. package/dist/typechain/contracts/DelegateBorrowers/SwapDebtDelegate.sol/IComptroller.d.ts +0 -42
  133. package/dist/typechain/contracts/DelegateBorrowers/SwapDebtDelegate.sol/IPriceOracle.d.ts +0 -42
  134. package/dist/typechain/contracts/DelegateBorrowers/SwapDebtDelegate.sol/IPriceOracle.js +0 -3
  135. package/dist/typechain/contracts/DelegateBorrowers/SwapDebtDelegate.sol/IVToken.d.ts +0 -98
  136. package/dist/typechain/contracts/DelegateBorrowers/SwapDebtDelegate.sol/index.d.ts +0 -4
  137. package/dist/typechain/contracts/Liquidator/Interfaces.sol/IVToken.js +0 -3
  138. package/dist/typechain/contracts/Liquidator/Interfaces.sol/index.js +0 -2
  139. package/dist/typechain/factories/contracts/DelegateBorrowers/SwapDebtDelegate.sol/IComptroller__factory.d.ts +0 -18
  140. package/dist/typechain/factories/contracts/DelegateBorrowers/SwapDebtDelegate.sol/IComptroller__factory.js +0 -30
  141. package/dist/typechain/factories/contracts/DelegateBorrowers/SwapDebtDelegate.sol/IPriceOracle__factory.d.ts +0 -22
  142. package/dist/typechain/factories/contracts/DelegateBorrowers/SwapDebtDelegate.sol/IPriceOracle__factory.js +0 -36
  143. package/dist/typechain/factories/contracts/DelegateBorrowers/SwapDebtDelegate.sol/IVToken__factory.d.ts +0 -78
  144. package/dist/typechain/factories/contracts/DelegateBorrowers/SwapDebtDelegate.sol/IVToken__factory.js +0 -110
  145. package/dist/typechain/factories/contracts/DelegateBorrowers/SwapDebtDelegate.sol/index.d.ts +0 -4
  146. package/dist/typechain/factories/contracts/DelegateBorrowers/SwapDebtDelegate.sol/index.js +0 -14
  147. /package/contracts/{Liquidator → lib}/approveOrRevert.sol +0 -0
  148. /package/dist/typechain/contracts/DelegateBorrowers/{SwapDebtDelegate.sol/IComptroller.js → MoveDebtDelegate.js} +0 -0
  149. /package/dist/typechain/contracts/DelegateBorrowers/{SwapDebtDelegate.sol/SwapDebtDelegate.js → SwapDebtDelegate.js} +0 -0
  150. /package/dist/typechain/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IComptroller.js +0 -0
  151. /package/dist/typechain/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/ILiquidator.js +0 -0
  152. /package/dist/typechain/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IVAIController.js +0 -0
  153. /package/dist/typechain/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IVBNB.js +0 -0
  154. /package/dist/typechain/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IVBep20.js +0 -0
  155. /package/dist/typechain/contracts/{DelegateBorrowers/SwapDebtDelegate.sol → InterfacesV8.sol}/IVToken.js +0 -0
  156. /package/dist/typechain/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/index.d.ts +0 -0
  157. /package/dist/typechain/contracts/{DelegateBorrowers/SwapDebtDelegate.sol → InterfacesV8.sol}/index.js +0 -0
  158. /package/dist/typechain/factories/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/ILiquidator__factory.js +0 -0
  159. /package/dist/typechain/factories/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/IVAIController__factory.js +0 -0
  160. /package/dist/typechain/factories/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/index.d.ts +0 -0
  161. /package/dist/typechain/factories/contracts/{Liquidator/Interfaces.sol → InterfacesV8.sol}/index.js +0 -0
@@ -1,104 +0,0 @@
1
- {
2
- "_format": "hh-sol-artifact-1",
3
- "contractName": "IVToken",
4
- "sourceName": "contracts/DelegateBorrowers/SwapDebtDelegate.sol",
5
- "abi": [
6
- {
7
- "inputs": [
8
- {
9
- "internalType": "address",
10
- "name": "account",
11
- "type": "address"
12
- }
13
- ],
14
- "name": "borrowBalanceCurrent",
15
- "outputs": [
16
- {
17
- "internalType": "uint256",
18
- "name": "",
19
- "type": "uint256"
20
- }
21
- ],
22
- "stateMutability": "nonpayable",
23
- "type": "function"
24
- },
25
- {
26
- "inputs": [
27
- {
28
- "internalType": "address",
29
- "name": "borrower",
30
- "type": "address"
31
- },
32
- {
33
- "internalType": "uint256",
34
- "name": "borrowAmount",
35
- "type": "uint256"
36
- }
37
- ],
38
- "name": "borrowBehalf",
39
- "outputs": [
40
- {
41
- "internalType": "uint256",
42
- "name": "",
43
- "type": "uint256"
44
- }
45
- ],
46
- "stateMutability": "nonpayable",
47
- "type": "function"
48
- },
49
- {
50
- "inputs": [],
51
- "name": "comptroller",
52
- "outputs": [
53
- {
54
- "internalType": "contract IComptroller",
55
- "name": "",
56
- "type": "address"
57
- }
58
- ],
59
- "stateMutability": "view",
60
- "type": "function"
61
- },
62
- {
63
- "inputs": [
64
- {
65
- "internalType": "address",
66
- "name": "borrower",
67
- "type": "address"
68
- },
69
- {
70
- "internalType": "uint256",
71
- "name": "repayAmount",
72
- "type": "uint256"
73
- }
74
- ],
75
- "name": "repayBorrowBehalf",
76
- "outputs": [
77
- {
78
- "internalType": "uint256",
79
- "name": "",
80
- "type": "uint256"
81
- }
82
- ],
83
- "stateMutability": "nonpayable",
84
- "type": "function"
85
- },
86
- {
87
- "inputs": [],
88
- "name": "underlying",
89
- "outputs": [
90
- {
91
- "internalType": "address",
92
- "name": "",
93
- "type": "address"
94
- }
95
- ],
96
- "stateMutability": "view",
97
- "type": "function"
98
- }
99
- ],
100
- "bytecode": "0x",
101
- "deployedBytecode": "0x",
102
- "linkReferences": {},
103
- "deployedLinkReferences": {}
104
- }
@@ -1,4 +0,0 @@
1
- {
2
- "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/eeb502cfa65684cfcd3f593c290d1e44.json"
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/eeb502cfa65684cfcd3f593c290d1e44.json"
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/eeb502cfa65684cfcd3f593c290d1e44.json"
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/eeb502cfa65684cfcd3f593c290d1e44.json"
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/eeb502cfa65684cfcd3f593c290d1e44.json"
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/eeb502cfa65684cfcd3f593c290d1e44.json"
4
- }
@@ -1,5 +0,0 @@
1
- // SPDX-License-Identifier: MIT
2
-
3
- pragma solidity 0.8.13;
4
-
5
- uint256 constant MANTISSA_ONE = 1e18;
@@ -1,11 +0,0 @@
1
- // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.13;
3
-
4
- /// @notice Thrown if the argument is a zero address because probably it is a mistake
5
- error UnexpectedZeroAddress();
6
-
7
- function ensureNonzeroAddress(address address_) pure {
8
- if (address_ == address(0)) {
9
- revert UnexpectedZeroAddress();
10
- }
11
- }
@@ -1,42 +0,0 @@
1
- import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "../../../common";
2
- import type { FunctionFragment, Result } from "@ethersproject/abi";
3
- import type { Listener, Provider } from "@ethersproject/providers";
4
- import type { BaseContract, BigNumber, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from "ethers";
5
- export interface IComptrollerInterface extends utils.Interface {
6
- functions: {
7
- "oracle()": FunctionFragment;
8
- };
9
- getFunction(nameOrSignatureOrTopic: "oracle"): FunctionFragment;
10
- encodeFunctionData(functionFragment: "oracle", values?: undefined): string;
11
- decodeFunctionResult(functionFragment: "oracle", data: BytesLike): Result;
12
- events: {};
13
- }
14
- export interface IComptroller extends BaseContract {
15
- connect(signerOrProvider: Signer | Provider | string): this;
16
- attach(addressOrName: string): this;
17
- deployed(): Promise<this>;
18
- interface: IComptrollerInterface;
19
- queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
20
- listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
21
- listeners(eventName?: string): Array<Listener>;
22
- removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
23
- removeAllListeners(eventName?: string): this;
24
- off: OnEvent<this>;
25
- on: OnEvent<this>;
26
- once: OnEvent<this>;
27
- removeListener: OnEvent<this>;
28
- functions: {
29
- oracle(overrides?: CallOverrides): Promise<[string]>;
30
- };
31
- oracle(overrides?: CallOverrides): Promise<string>;
32
- callStatic: {
33
- oracle(overrides?: CallOverrides): Promise<string>;
34
- };
35
- filters: {};
36
- estimateGas: {
37
- oracle(overrides?: CallOverrides): Promise<BigNumber>;
38
- };
39
- populateTransaction: {
40
- oracle(overrides?: CallOverrides): Promise<PopulatedTransaction>;
41
- };
42
- }
@@ -1,42 +0,0 @@
1
- import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from "../../../common";
2
- import type { FunctionFragment, Result } from "@ethersproject/abi";
3
- import type { Listener, Provider } from "@ethersproject/providers";
4
- import type { BaseContract, BigNumber, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from "ethers";
5
- export interface IPriceOracleInterface extends utils.Interface {
6
- functions: {
7
- "getUnderlyingPrice(address)": FunctionFragment;
8
- };
9
- getFunction(nameOrSignatureOrTopic: "getUnderlyingPrice"): FunctionFragment;
10
- encodeFunctionData(functionFragment: "getUnderlyingPrice", values: [PromiseOrValue<string>]): string;
11
- decodeFunctionResult(functionFragment: "getUnderlyingPrice", data: BytesLike): Result;
12
- events: {};
13
- }
14
- export interface IPriceOracle extends BaseContract {
15
- connect(signerOrProvider: Signer | Provider | string): this;
16
- attach(addressOrName: string): this;
17
- deployed(): Promise<this>;
18
- interface: IPriceOracleInterface;
19
- queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
20
- listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
21
- listeners(eventName?: string): Array<Listener>;
22
- removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
23
- removeAllListeners(eventName?: string): this;
24
- off: OnEvent<this>;
25
- on: OnEvent<this>;
26
- once: OnEvent<this>;
27
- removeListener: OnEvent<this>;
28
- functions: {
29
- getUnderlyingPrice(vToken: PromiseOrValue<string>, overrides?: CallOverrides): Promise<[BigNumber]>;
30
- };
31
- getUnderlyingPrice(vToken: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
32
- callStatic: {
33
- getUnderlyingPrice(vToken: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
34
- };
35
- filters: {};
36
- estimateGas: {
37
- getUnderlyingPrice(vToken: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
38
- };
39
- populateTransaction: {
40
- getUnderlyingPrice(vToken: PromiseOrValue<string>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
41
- };
42
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- /* Autogenerated file. Do not edit manually. */
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,98 +0,0 @@
1
- import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from "../../../common";
2
- import type { FunctionFragment, Result } from "@ethersproject/abi";
3
- import type { Listener, Provider } from "@ethersproject/providers";
4
- import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers";
5
- export interface IVTokenInterface extends utils.Interface {
6
- functions: {
7
- "borrowBalanceCurrent(address)": FunctionFragment;
8
- "borrowBehalf(address,uint256)": FunctionFragment;
9
- "comptroller()": FunctionFragment;
10
- "repayBorrowBehalf(address,uint256)": FunctionFragment;
11
- "underlying()": FunctionFragment;
12
- };
13
- getFunction(nameOrSignatureOrTopic: "borrowBalanceCurrent" | "borrowBehalf" | "comptroller" | "repayBorrowBehalf" | "underlying"): FunctionFragment;
14
- encodeFunctionData(functionFragment: "borrowBalanceCurrent", values: [PromiseOrValue<string>]): string;
15
- encodeFunctionData(functionFragment: "borrowBehalf", values: [PromiseOrValue<string>, PromiseOrValue<BigNumberish>]): string;
16
- encodeFunctionData(functionFragment: "comptroller", values?: undefined): string;
17
- encodeFunctionData(functionFragment: "repayBorrowBehalf", values: [PromiseOrValue<string>, PromiseOrValue<BigNumberish>]): string;
18
- encodeFunctionData(functionFragment: "underlying", values?: undefined): string;
19
- decodeFunctionResult(functionFragment: "borrowBalanceCurrent", data: BytesLike): Result;
20
- decodeFunctionResult(functionFragment: "borrowBehalf", data: BytesLike): Result;
21
- decodeFunctionResult(functionFragment: "comptroller", data: BytesLike): Result;
22
- decodeFunctionResult(functionFragment: "repayBorrowBehalf", data: BytesLike): Result;
23
- decodeFunctionResult(functionFragment: "underlying", data: BytesLike): Result;
24
- events: {};
25
- }
26
- export interface IVToken extends BaseContract {
27
- connect(signerOrProvider: Signer | Provider | string): this;
28
- attach(addressOrName: string): this;
29
- deployed(): Promise<this>;
30
- interface: IVTokenInterface;
31
- queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
32
- listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
33
- listeners(eventName?: string): Array<Listener>;
34
- removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
35
- removeAllListeners(eventName?: string): this;
36
- off: OnEvent<this>;
37
- on: OnEvent<this>;
38
- once: OnEvent<this>;
39
- removeListener: OnEvent<this>;
40
- functions: {
41
- borrowBalanceCurrent(account: PromiseOrValue<string>, overrides?: Overrides & {
42
- from?: PromiseOrValue<string>;
43
- }): Promise<ContractTransaction>;
44
- borrowBehalf(borrower: PromiseOrValue<string>, borrowAmount: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
45
- from?: PromiseOrValue<string>;
46
- }): Promise<ContractTransaction>;
47
- comptroller(overrides?: CallOverrides): Promise<[string]>;
48
- repayBorrowBehalf(borrower: PromiseOrValue<string>, repayAmount: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
49
- from?: PromiseOrValue<string>;
50
- }): Promise<ContractTransaction>;
51
- underlying(overrides?: CallOverrides): Promise<[string]>;
52
- };
53
- borrowBalanceCurrent(account: PromiseOrValue<string>, overrides?: Overrides & {
54
- from?: PromiseOrValue<string>;
55
- }): Promise<ContractTransaction>;
56
- borrowBehalf(borrower: PromiseOrValue<string>, borrowAmount: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
57
- from?: PromiseOrValue<string>;
58
- }): Promise<ContractTransaction>;
59
- comptroller(overrides?: CallOverrides): Promise<string>;
60
- repayBorrowBehalf(borrower: PromiseOrValue<string>, repayAmount: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
61
- from?: PromiseOrValue<string>;
62
- }): Promise<ContractTransaction>;
63
- underlying(overrides?: CallOverrides): Promise<string>;
64
- callStatic: {
65
- borrowBalanceCurrent(account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
66
- borrowBehalf(borrower: PromiseOrValue<string>, borrowAmount: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<BigNumber>;
67
- comptroller(overrides?: CallOverrides): Promise<string>;
68
- repayBorrowBehalf(borrower: PromiseOrValue<string>, repayAmount: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<BigNumber>;
69
- underlying(overrides?: CallOverrides): Promise<string>;
70
- };
71
- filters: {};
72
- estimateGas: {
73
- borrowBalanceCurrent(account: PromiseOrValue<string>, overrides?: Overrides & {
74
- from?: PromiseOrValue<string>;
75
- }): Promise<BigNumber>;
76
- borrowBehalf(borrower: PromiseOrValue<string>, borrowAmount: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
77
- from?: PromiseOrValue<string>;
78
- }): Promise<BigNumber>;
79
- comptroller(overrides?: CallOverrides): Promise<BigNumber>;
80
- repayBorrowBehalf(borrower: PromiseOrValue<string>, repayAmount: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
81
- from?: PromiseOrValue<string>;
82
- }): Promise<BigNumber>;
83
- underlying(overrides?: CallOverrides): Promise<BigNumber>;
84
- };
85
- populateTransaction: {
86
- borrowBalanceCurrent(account: PromiseOrValue<string>, overrides?: Overrides & {
87
- from?: PromiseOrValue<string>;
88
- }): Promise<PopulatedTransaction>;
89
- borrowBehalf(borrower: PromiseOrValue<string>, borrowAmount: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
90
- from?: PromiseOrValue<string>;
91
- }): Promise<PopulatedTransaction>;
92
- comptroller(overrides?: CallOverrides): Promise<PopulatedTransaction>;
93
- repayBorrowBehalf(borrower: PromiseOrValue<string>, repayAmount: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
94
- from?: PromiseOrValue<string>;
95
- }): Promise<PopulatedTransaction>;
96
- underlying(overrides?: CallOverrides): Promise<PopulatedTransaction>;
97
- };
98
- }
@@ -1,4 +0,0 @@
1
- export type { IComptroller } from "./IComptroller";
2
- export type { IPriceOracle } from "./IPriceOracle";
3
- export type { IVToken } from "./IVToken";
4
- export type { SwapDebtDelegate } from "./SwapDebtDelegate";
@@ -1,3 +0,0 @@
1
- "use strict";
2
- /* Autogenerated file. Do not edit manually. */
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,18 +0,0 @@
1
- import type { IComptroller, IComptrollerInterface } from "../../../../contracts/DelegateBorrowers/SwapDebtDelegate.sol/IComptroller";
2
- import type { Provider } from "@ethersproject/providers";
3
- import { Signer } from "ethers";
4
- export declare class IComptroller__factory {
5
- static readonly abi: readonly [{
6
- readonly inputs: readonly [];
7
- readonly name: "oracle";
8
- readonly outputs: readonly [{
9
- readonly internalType: "contract IPriceOracle";
10
- readonly name: "";
11
- readonly type: "address";
12
- }];
13
- readonly stateMutability: "view";
14
- readonly type: "function";
15
- }];
16
- static createInterface(): IComptrollerInterface;
17
- static connect(address: string, signerOrProvider: Signer | Provider): IComptroller;
18
- }
@@ -1,30 +0,0 @@
1
- "use strict";
2
- /* Autogenerated file. Do not edit manually. */
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.IComptroller__factory = void 0;
5
- const ethers_1 = require("ethers");
6
- const _abi = [
7
- {
8
- inputs: [],
9
- name: "oracle",
10
- outputs: [
11
- {
12
- internalType: "contract IPriceOracle",
13
- name: "",
14
- type: "address",
15
- },
16
- ],
17
- stateMutability: "view",
18
- type: "function",
19
- },
20
- ];
21
- class IComptroller__factory {
22
- static createInterface() {
23
- return new ethers_1.utils.Interface(_abi);
24
- }
25
- static connect(address, signerOrProvider) {
26
- return new ethers_1.Contract(address, _abi, signerOrProvider);
27
- }
28
- }
29
- exports.IComptroller__factory = IComptroller__factory;
30
- IComptroller__factory.abi = _abi;
@@ -1,22 +0,0 @@
1
- import type { IPriceOracle, IPriceOracleInterface } from "../../../../contracts/DelegateBorrowers/SwapDebtDelegate.sol/IPriceOracle";
2
- import type { Provider } from "@ethersproject/providers";
3
- import { Signer } from "ethers";
4
- export declare class IPriceOracle__factory {
5
- static readonly abi: readonly [{
6
- readonly inputs: readonly [{
7
- readonly internalType: "contract IVToken";
8
- readonly name: "vToken";
9
- readonly type: "address";
10
- }];
11
- readonly name: "getUnderlyingPrice";
12
- readonly outputs: readonly [{
13
- readonly internalType: "uint256";
14
- readonly name: "";
15
- readonly type: "uint256";
16
- }];
17
- readonly stateMutability: "view";
18
- readonly type: "function";
19
- }];
20
- static createInterface(): IPriceOracleInterface;
21
- static connect(address: string, signerOrProvider: Signer | Provider): IPriceOracle;
22
- }
@@ -1,36 +0,0 @@
1
- "use strict";
2
- /* Autogenerated file. Do not edit manually. */
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.IPriceOracle__factory = void 0;
5
- const ethers_1 = require("ethers");
6
- const _abi = [
7
- {
8
- inputs: [
9
- {
10
- internalType: "contract IVToken",
11
- name: "vToken",
12
- type: "address",
13
- },
14
- ],
15
- name: "getUnderlyingPrice",
16
- outputs: [
17
- {
18
- internalType: "uint256",
19
- name: "",
20
- type: "uint256",
21
- },
22
- ],
23
- stateMutability: "view",
24
- type: "function",
25
- },
26
- ];
27
- class IPriceOracle__factory {
28
- static createInterface() {
29
- return new ethers_1.utils.Interface(_abi);
30
- }
31
- static connect(address, signerOrProvider) {
32
- return new ethers_1.Contract(address, _abi, signerOrProvider);
33
- }
34
- }
35
- exports.IPriceOracle__factory = IPriceOracle__factory;
36
- IPriceOracle__factory.abi = _abi;
@@ -1,78 +0,0 @@
1
- import type { IVToken, IVTokenInterface } from "../../../../contracts/DelegateBorrowers/SwapDebtDelegate.sol/IVToken";
2
- import type { Provider } from "@ethersproject/providers";
3
- import { Signer } from "ethers";
4
- export declare class IVToken__factory {
5
- static readonly abi: readonly [{
6
- readonly inputs: readonly [{
7
- readonly internalType: "address";
8
- readonly name: "account";
9
- readonly type: "address";
10
- }];
11
- readonly name: "borrowBalanceCurrent";
12
- readonly outputs: readonly [{
13
- readonly internalType: "uint256";
14
- readonly name: "";
15
- readonly type: "uint256";
16
- }];
17
- readonly stateMutability: "nonpayable";
18
- readonly type: "function";
19
- }, {
20
- readonly inputs: readonly [{
21
- readonly internalType: "address";
22
- readonly name: "borrower";
23
- readonly type: "address";
24
- }, {
25
- readonly internalType: "uint256";
26
- readonly name: "borrowAmount";
27
- readonly type: "uint256";
28
- }];
29
- readonly name: "borrowBehalf";
30
- readonly outputs: readonly [{
31
- readonly internalType: "uint256";
32
- readonly name: "";
33
- readonly type: "uint256";
34
- }];
35
- readonly stateMutability: "nonpayable";
36
- readonly type: "function";
37
- }, {
38
- readonly inputs: readonly [];
39
- readonly name: "comptroller";
40
- readonly outputs: readonly [{
41
- readonly internalType: "contract IComptroller";
42
- readonly name: "";
43
- readonly type: "address";
44
- }];
45
- readonly stateMutability: "view";
46
- readonly type: "function";
47
- }, {
48
- readonly inputs: readonly [{
49
- readonly internalType: "address";
50
- readonly name: "borrower";
51
- readonly type: "address";
52
- }, {
53
- readonly internalType: "uint256";
54
- readonly name: "repayAmount";
55
- readonly type: "uint256";
56
- }];
57
- readonly name: "repayBorrowBehalf";
58
- readonly outputs: readonly [{
59
- readonly internalType: "uint256";
60
- readonly name: "";
61
- readonly type: "uint256";
62
- }];
63
- readonly stateMutability: "nonpayable";
64
- readonly type: "function";
65
- }, {
66
- readonly inputs: readonly [];
67
- readonly name: "underlying";
68
- readonly outputs: readonly [{
69
- readonly internalType: "address";
70
- readonly name: "";
71
- readonly type: "address";
72
- }];
73
- readonly stateMutability: "view";
74
- readonly type: "function";
75
- }];
76
- static createInterface(): IVTokenInterface;
77
- static connect(address: string, signerOrProvider: Signer | Provider): IVToken;
78
- }
@@ -1,110 +0,0 @@
1
- "use strict";
2
- /* Autogenerated file. Do not edit manually. */
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.IVToken__factory = void 0;
5
- const ethers_1 = require("ethers");
6
- const _abi = [
7
- {
8
- inputs: [
9
- {
10
- internalType: "address",
11
- name: "account",
12
- type: "address",
13
- },
14
- ],
15
- name: "borrowBalanceCurrent",
16
- outputs: [
17
- {
18
- internalType: "uint256",
19
- name: "",
20
- type: "uint256",
21
- },
22
- ],
23
- stateMutability: "nonpayable",
24
- type: "function",
25
- },
26
- {
27
- inputs: [
28
- {
29
- internalType: "address",
30
- name: "borrower",
31
- type: "address",
32
- },
33
- {
34
- internalType: "uint256",
35
- name: "borrowAmount",
36
- type: "uint256",
37
- },
38
- ],
39
- name: "borrowBehalf",
40
- outputs: [
41
- {
42
- internalType: "uint256",
43
- name: "",
44
- type: "uint256",
45
- },
46
- ],
47
- stateMutability: "nonpayable",
48
- type: "function",
49
- },
50
- {
51
- inputs: [],
52
- name: "comptroller",
53
- outputs: [
54
- {
55
- internalType: "contract IComptroller",
56
- name: "",
57
- type: "address",
58
- },
59
- ],
60
- stateMutability: "view",
61
- type: "function",
62
- },
63
- {
64
- inputs: [
65
- {
66
- internalType: "address",
67
- name: "borrower",
68
- type: "address",
69
- },
70
- {
71
- internalType: "uint256",
72
- name: "repayAmount",
73
- type: "uint256",
74
- },
75
- ],
76
- name: "repayBorrowBehalf",
77
- outputs: [
78
- {
79
- internalType: "uint256",
80
- name: "",
81
- type: "uint256",
82
- },
83
- ],
84
- stateMutability: "nonpayable",
85
- type: "function",
86
- },
87
- {
88
- inputs: [],
89
- name: "underlying",
90
- outputs: [
91
- {
92
- internalType: "address",
93
- name: "",
94
- type: "address",
95
- },
96
- ],
97
- stateMutability: "view",
98
- type: "function",
99
- },
100
- ];
101
- class IVToken__factory {
102
- static createInterface() {
103
- return new ethers_1.utils.Interface(_abi);
104
- }
105
- static connect(address, signerOrProvider) {
106
- return new ethers_1.Contract(address, _abi, signerOrProvider);
107
- }
108
- }
109
- exports.IVToken__factory = IVToken__factory;
110
- IVToken__factory.abi = _abi;