@defisaver/positions-sdk 0.0.198 → 0.0.199-dev-2

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 (133) hide show
  1. package/.mocharc.json +4 -4
  2. package/.nvmrc +1 -1
  3. package/README.md +69 -69
  4. package/cjs/config/contracts.d.ts +126 -4
  5. package/cjs/config/contracts.js +14 -0
  6. package/cjs/contracts.d.ts +1 -0
  7. package/cjs/contracts.js +2 -1
  8. package/cjs/helpers/index.d.ts +1 -0
  9. package/cjs/helpers/index.js +2 -1
  10. package/cjs/helpers/liquityV2Helpers/index.d.ts +12 -0
  11. package/cjs/helpers/liquityV2Helpers/index.js +63 -0
  12. package/cjs/helpers/morphoBlueHelpers/index.js +66 -66
  13. package/cjs/index.d.ts +2 -1
  14. package/cjs/index.js +3 -1
  15. package/cjs/liquityV2/index.d.ts +18 -0
  16. package/cjs/liquityV2/index.js +184 -0
  17. package/cjs/markets/aave/marketAssets.js +2 -4
  18. package/cjs/markets/index.d.ts +1 -0
  19. package/cjs/markets/index.js +3 -1
  20. package/cjs/markets/liquityV2/index.d.ts +10 -0
  21. package/cjs/markets/liquityV2/index.js +47 -0
  22. package/cjs/moneymarket/moneymarketCommonService.js +1 -1
  23. package/cjs/types/contracts/generated/LiquityV2CollSurplusPool.d.ts +64 -0
  24. package/cjs/types/contracts/generated/LiquityV2CollSurplusPool.js +5 -0
  25. package/cjs/types/contracts/generated/LiquityV2TroveNFT.d.ts +73 -0
  26. package/cjs/types/contracts/generated/LiquityV2TroveNFT.js +5 -0
  27. package/cjs/types/contracts/generated/LiquityV2View.d.ts +244 -0
  28. package/cjs/types/contracts/generated/LiquityV2View.js +5 -0
  29. package/cjs/types/contracts/generated/index.d.ts +3 -0
  30. package/cjs/types/index.d.ts +1 -0
  31. package/cjs/types/index.js +1 -0
  32. package/cjs/types/liquityV2.d.ts +111 -0
  33. package/cjs/types/liquityV2.js +24 -0
  34. package/esm/config/contracts.d.ts +126 -4
  35. package/esm/config/contracts.js +14 -0
  36. package/esm/contracts.d.ts +1 -0
  37. package/esm/contracts.js +1 -0
  38. package/esm/helpers/index.d.ts +1 -0
  39. package/esm/helpers/index.js +1 -0
  40. package/esm/helpers/liquityV2Helpers/index.d.ts +12 -0
  41. package/esm/helpers/liquityV2Helpers/index.js +55 -0
  42. package/esm/helpers/morphoBlueHelpers/index.js +66 -66
  43. package/esm/index.d.ts +2 -1
  44. package/esm/index.js +2 -1
  45. package/esm/liquityV2/index.d.ts +18 -0
  46. package/esm/liquityV2/index.js +173 -0
  47. package/esm/markets/aave/marketAssets.js +2 -4
  48. package/esm/markets/index.d.ts +1 -0
  49. package/esm/markets/index.js +1 -0
  50. package/esm/markets/liquityV2/index.d.ts +10 -0
  51. package/esm/markets/liquityV2/index.js +40 -0
  52. package/esm/moneymarket/moneymarketCommonService.js +1 -1
  53. package/esm/types/contracts/generated/LiquityV2CollSurplusPool.d.ts +64 -0
  54. package/esm/types/contracts/generated/LiquityV2CollSurplusPool.js +4 -0
  55. package/esm/types/contracts/generated/LiquityV2TroveNFT.d.ts +73 -0
  56. package/esm/types/contracts/generated/LiquityV2TroveNFT.js +4 -0
  57. package/esm/types/contracts/generated/LiquityV2View.d.ts +244 -0
  58. package/esm/types/contracts/generated/LiquityV2View.js +4 -0
  59. package/esm/types/contracts/generated/index.d.ts +3 -0
  60. package/esm/types/index.d.ts +1 -0
  61. package/esm/types/index.js +1 -0
  62. package/esm/types/liquityV2.d.ts +111 -0
  63. package/esm/types/liquityV2.js +21 -0
  64. package/package.json +49 -49
  65. package/src/aaveV2/index.ts +227 -227
  66. package/src/aaveV3/index.ts +625 -625
  67. package/src/assets/index.ts +60 -60
  68. package/src/chickenBonds/index.ts +123 -123
  69. package/src/compoundV2/index.ts +220 -220
  70. package/src/compoundV3/index.ts +291 -291
  71. package/src/config/contracts.js +1109 -1095
  72. package/src/constants/index.ts +6 -6
  73. package/src/contracts.ts +133 -132
  74. package/src/curveUsd/index.ts +229 -229
  75. package/src/eulerV2/index.ts +303 -303
  76. package/src/exchange/index.ts +17 -17
  77. package/src/helpers/aaveHelpers/index.ts +198 -198
  78. package/src/helpers/chickenBondsHelpers/index.ts +23 -23
  79. package/src/helpers/compoundHelpers/index.ts +246 -246
  80. package/src/helpers/curveUsdHelpers/index.ts +40 -40
  81. package/src/helpers/eulerHelpers/index.ts +232 -232
  82. package/src/helpers/index.ts +10 -9
  83. package/src/helpers/liquityV2Helpers/index.ts +80 -0
  84. package/src/helpers/llamaLendHelpers/index.ts +53 -53
  85. package/src/helpers/makerHelpers/index.ts +94 -94
  86. package/src/helpers/morphoBlueHelpers/index.ts +365 -365
  87. package/src/helpers/sparkHelpers/index.ts +150 -150
  88. package/src/index.ts +50 -48
  89. package/src/liquity/index.ts +116 -116
  90. package/src/liquityV2/index.ts +220 -0
  91. package/src/llamaLend/index.ts +275 -275
  92. package/src/maker/index.ts +117 -117
  93. package/src/markets/aave/index.ts +152 -152
  94. package/src/markets/aave/marketAssets.ts +44 -46
  95. package/src/markets/compound/index.ts +213 -213
  96. package/src/markets/compound/marketsAssets.ts +82 -82
  97. package/src/markets/curveUsd/index.ts +69 -69
  98. package/src/markets/euler/index.ts +26 -26
  99. package/src/markets/index.ts +24 -24
  100. package/src/markets/liquityV2/index.ts +44 -0
  101. package/src/markets/llamaLend/contractAddresses.ts +141 -141
  102. package/src/markets/llamaLend/index.ts +235 -235
  103. package/src/markets/morphoBlue/index.ts +895 -895
  104. package/src/markets/spark/index.ts +29 -29
  105. package/src/markets/spark/marketAssets.ts +10 -10
  106. package/src/moneymarket/moneymarketCommonService.ts +80 -80
  107. package/src/morphoAaveV2/index.ts +256 -256
  108. package/src/morphoAaveV3/index.ts +631 -631
  109. package/src/morphoBlue/index.ts +204 -204
  110. package/src/multicall/index.ts +22 -22
  111. package/src/services/dsrService.ts +15 -15
  112. package/src/services/priceService.ts +62 -62
  113. package/src/services/utils.ts +56 -56
  114. package/src/setup.ts +8 -8
  115. package/src/spark/index.ts +461 -461
  116. package/src/staking/staking.ts +220 -220
  117. package/src/types/aave.ts +271 -271
  118. package/src/types/chickenBonds.ts +45 -45
  119. package/src/types/common.ts +84 -84
  120. package/src/types/compound.ts +131 -131
  121. package/src/types/contracts/generated/LiquityV2CollSurplusPool.ts +130 -0
  122. package/src/types/contracts/generated/LiquityV2TroveNFT.ts +150 -0
  123. package/src/types/contracts/generated/LiquityV2View.ts +315 -0
  124. package/src/types/contracts/generated/index.ts +3 -0
  125. package/src/types/curveUsd.ts +118 -118
  126. package/src/types/euler.ts +171 -171
  127. package/src/types/index.ts +10 -9
  128. package/src/types/liquity.ts +30 -30
  129. package/src/types/liquityV2.ts +119 -0
  130. package/src/types/llamaLend.ts +155 -155
  131. package/src/types/maker.ts +50 -50
  132. package/src/types/morphoBlue.ts +192 -192
  133. package/src/types/spark.ts +131 -131
package/.mocharc.json CHANGED
@@ -1,4 +1,4 @@
1
- {
2
- "require": "ts-node/register",
3
- "extension": ["ts"]
4
- }
1
+ {
2
+ "require": "ts-node/register",
3
+ "extension": ["ts"]
4
+ }
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- v20.17.0
1
+ v20.17.0
package/README.md CHANGED
@@ -1,69 +1,69 @@
1
- # DeFi Saver Positions SDK
2
-
3
- Supported protocols:
4
- - [Maker](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/maker)
5
- - [Spark](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/spark)
6
- - [CrvUSD](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/curveUsd)
7
- - [Aave V2](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/aaveV2)
8
- - [Aave V3](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/aaveV3)
9
- - [Morpho Aave V2](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/morphoAaveV2)
10
- - [Morpho Aave V3](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/morphoAaveV3)
11
- - [Compound V2](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/compoundV2)
12
- - [Compound V3](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/compoundV3)
13
- - [Liquity](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/liquity)
14
- - [Chicken Bonds](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/chickenBonds)
15
-
16
- ## Setup
17
- Supported Node version is v10.
18
-
19
- - run `npm install` (first time)
20
- - run `npm run build`
21
-
22
- `build` command will generate contracts and build ejs and esm folders
23
-
24
- ## How to use
25
- [All available imports](https://github.com/defisaver/defisaver-positions-sdk/blob/main/src/index.ts)
26
-
27
- This is a Compound V3 example, and every other protocol is similar
28
- ```js
29
- import Web3 from 'web3';
30
- import { compoundV3 } from '@defisaver/positions-sdk';
31
-
32
-
33
- // every protocol has market data and user data getters
34
- const {
35
- getCompoundV3MarketsData,
36
- getCompoundV3AccountData,
37
- } = compoundV3;
38
-
39
- const provider = 'Your RPC provider';
40
- const web3 = new Web3(provider);
41
-
42
- const user = '0x123...';
43
-
44
- const { assetsData } = await getCompoundV3MarketsData(
45
- web3, // rpc for the network you are using (note: can be tenderly or any other testnet rpc)
46
- 1, // network
47
- selectedMarket, // market object like in /src/markets/compound/index.ts
48
- web3, // this must be mainnet rpc - used for getting prices onchain and calculating apys
49
- );
50
-
51
- const userData = await getCompoundV3AccountData(
52
- web3,
53
- 1, // network
54
- userAddress, // EOA or DSProxy
55
- '', // proxy address of the user, or just empty string if checking for EOA
56
- {
57
- selectedMarket, // market object as in /src/markets/compound/index.ts
58
- assetsData,
59
- }
60
- );
61
- ```
62
-
63
- More examples found [here](https://github.com/defisaver/defisaver-positions-sdk/tree/main/tests)
64
-
65
- ## Testing
66
-
67
- `npm run test` - Run all tests
68
-
69
- `npm run test-single --name=your_test_name` - Run single test for specified name e.g. for MyTest.js test name is MyTest
1
+ # DeFi Saver Positions SDK
2
+
3
+ Supported protocols:
4
+ - [Maker](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/maker)
5
+ - [Spark](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/spark)
6
+ - [CrvUSD](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/curveUsd)
7
+ - [Aave V2](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/aaveV2)
8
+ - [Aave V3](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/aaveV3)
9
+ - [Morpho Aave V2](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/morphoAaveV2)
10
+ - [Morpho Aave V3](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/morphoAaveV3)
11
+ - [Compound V2](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/compoundV2)
12
+ - [Compound V3](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/compoundV3)
13
+ - [Liquity](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/liquity)
14
+ - [Chicken Bonds](https://github.com/defisaver/defisaver-positions-sdk/tree/main/src/chickenBonds)
15
+
16
+ ## Setup
17
+ Supported Node version is v10.
18
+
19
+ - run `npm install` (first time)
20
+ - run `npm run build`
21
+
22
+ `build` command will generate contracts and build ejs and esm folders
23
+
24
+ ## How to use
25
+ [All available imports](https://github.com/defisaver/defisaver-positions-sdk/blob/main/src/index.ts)
26
+
27
+ This is a Compound V3 example, and every other protocol is similar
28
+ ```js
29
+ import Web3 from 'web3';
30
+ import { compoundV3 } from '@defisaver/positions-sdk';
31
+
32
+
33
+ // every protocol has market data and user data getters
34
+ const {
35
+ getCompoundV3MarketsData,
36
+ getCompoundV3AccountData,
37
+ } = compoundV3;
38
+
39
+ const provider = 'Your RPC provider';
40
+ const web3 = new Web3(provider);
41
+
42
+ const user = '0x123...';
43
+
44
+ const { assetsData } = await getCompoundV3MarketsData(
45
+ web3, // rpc for the network you are using (note: can be tenderly or any other testnet rpc)
46
+ 1, // network
47
+ selectedMarket, // market object like in /src/markets/compound/index.ts
48
+ web3, // this must be mainnet rpc - used for getting prices onchain and calculating apys
49
+ );
50
+
51
+ const userData = await getCompoundV3AccountData(
52
+ web3,
53
+ 1, // network
54
+ userAddress, // EOA or DSProxy
55
+ '', // proxy address of the user, or just empty string if checking for EOA
56
+ {
57
+ selectedMarket, // market object as in /src/markets/compound/index.ts
58
+ assetsData,
59
+ }
60
+ );
61
+ ```
62
+
63
+ More examples found [here](https://github.com/defisaver/defisaver-positions-sdk/tree/main/tests)
64
+
65
+ ## Testing
66
+
67
+ `npm run test` - Run all tests
68
+
69
+ `npm run test-single --name=your_test_name` - Run single test for specified name e.g. for MyTest.js test name is MyTest
@@ -7405,8 +7405,130 @@ export namespace LlamaLendControllerAbi {
7405
7405
  let networks_80: {};
7406
7406
  export { networks_80 as networks };
7407
7407
  }
7408
+ export namespace LiquityV2View {
7409
+ let abi_81: {
7410
+ inputs: {
7411
+ internalType: string;
7412
+ name: string;
7413
+ type: string;
7414
+ }[];
7415
+ name: string;
7416
+ outputs: ({
7417
+ components: {
7418
+ internalType: string;
7419
+ name: string;
7420
+ type: string;
7421
+ }[];
7422
+ internalType: string;
7423
+ name: string;
7424
+ type: string;
7425
+ } | {
7426
+ internalType: string;
7427
+ name: string;
7428
+ type: string;
7429
+ components?: undefined;
7430
+ })[];
7431
+ stateMutability: string;
7432
+ type: string;
7433
+ }[];
7434
+ export { abi_81 as abi };
7435
+ let networks_81: {
7436
+ "1": {
7437
+ address: string;
7438
+ };
7439
+ };
7440
+ export { networks_81 as networks };
7441
+ }
7442
+ export namespace LiquityV2CollSurplusPool {
7443
+ let abi_82: ({
7444
+ inputs: {
7445
+ internalType: string;
7446
+ name: string;
7447
+ type: string;
7448
+ }[];
7449
+ stateMutability: string;
7450
+ type: string;
7451
+ anonymous?: undefined;
7452
+ name?: undefined;
7453
+ outputs?: undefined;
7454
+ } | {
7455
+ anonymous: boolean;
7456
+ inputs: {
7457
+ indexed: boolean;
7458
+ internalType: string;
7459
+ name: string;
7460
+ type: string;
7461
+ }[];
7462
+ name: string;
7463
+ type: string;
7464
+ stateMutability?: undefined;
7465
+ outputs?: undefined;
7466
+ } | {
7467
+ inputs: {
7468
+ internalType: string;
7469
+ name: string;
7470
+ type: string;
7471
+ }[];
7472
+ name: string;
7473
+ outputs: {
7474
+ internalType: string;
7475
+ name: string;
7476
+ type: string;
7477
+ }[];
7478
+ stateMutability: string;
7479
+ type: string;
7480
+ anonymous?: undefined;
7481
+ })[];
7482
+ export { abi_82 as abi };
7483
+ let networks_82: {};
7484
+ export { networks_82 as networks };
7485
+ }
7486
+ export namespace LiquityV2TroveNFT {
7487
+ let abi_83: ({
7488
+ inputs: {
7489
+ internalType: string;
7490
+ name: string;
7491
+ type: string;
7492
+ }[];
7493
+ stateMutability: string;
7494
+ type: string;
7495
+ anonymous?: undefined;
7496
+ name?: undefined;
7497
+ outputs?: undefined;
7498
+ } | {
7499
+ anonymous: boolean;
7500
+ inputs: {
7501
+ indexed: boolean;
7502
+ internalType: string;
7503
+ name: string;
7504
+ type: string;
7505
+ }[];
7506
+ name: string;
7507
+ type: string;
7508
+ stateMutability?: undefined;
7509
+ outputs?: undefined;
7510
+ } | {
7511
+ inputs: {
7512
+ internalType: string;
7513
+ name: string;
7514
+ type: string;
7515
+ }[];
7516
+ name: string;
7517
+ outputs: {
7518
+ internalType: string;
7519
+ name: string;
7520
+ type: string;
7521
+ }[];
7522
+ stateMutability: string;
7523
+ type: string;
7524
+ anonymous?: undefined;
7525
+ })[];
7526
+ export { abi_83 as abi };
7527
+ let networks_83: {};
7528
+ export { networks_83 as networks };
7529
+ }
7408
7530
  export namespace EulerV2View {
7409
- let abi_81: ({
7531
+ let abi_84: ({
7410
7532
  inputs: {
7411
7533
  internalType: string;
7412
7534
  name: string;
@@ -7469,11 +7591,11 @@ export namespace EulerV2View {
7469
7591
  stateMutability: string;
7470
7592
  type: string;
7471
7593
  })[];
7472
- export { abi_81 as abi };
7473
- let networks_81: {
7594
+ export { abi_84 as abi };
7595
+ let networks_84: {
7474
7596
  "1": {
7475
7597
  address: string;
7476
7598
  };
7477
7599
  };
7478
- export { networks_81 as networks };
7600
+ export { networks_84 as networks };
7479
7601
  }
@@ -1086,6 +1086,20 @@ module.exports = {
1086
1086
  "abi": [{ "name": "UserState", "inputs": [{ "name": "user", "type": "address", "indexed": true }, { "name": "collateral", "type": "uint256", "indexed": false }, { "name": "debt", "type": "uint256", "indexed": false }, { "name": "n1", "type": "int256", "indexed": false }, { "name": "n2", "type": "int256", "indexed": false }, { "name": "liquidation_discount", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "Borrow", "inputs": [{ "name": "user", "type": "address", "indexed": true }, { "name": "collateral_increase", "type": "uint256", "indexed": false }, { "name": "loan_increase", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "Repay", "inputs": [{ "name": "user", "type": "address", "indexed": true }, { "name": "collateral_decrease", "type": "uint256", "indexed": false }, { "name": "loan_decrease", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "RemoveCollateral", "inputs": [{ "name": "user", "type": "address", "indexed": true }, { "name": "collateral_decrease", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "Liquidate", "inputs": [{ "name": "liquidator", "type": "address", "indexed": true }, { "name": "user", "type": "address", "indexed": true }, { "name": "collateral_received", "type": "uint256", "indexed": false }, { "name": "stablecoin_received", "type": "uint256", "indexed": false }, { "name": "debt", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "SetMonetaryPolicy", "inputs": [{ "name": "monetary_policy", "type": "address", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "SetBorrowingDiscounts", "inputs": [{ "name": "loan_discount", "type": "uint256", "indexed": false }, { "name": "liquidation_discount", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "CollectFees", "inputs": [{ "name": "amount", "type": "uint256", "indexed": false }, { "name": "new_supply", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "stateMutability": "nonpayable", "type": "constructor", "inputs": [{ "name": "collateral_token", "type": "address" }, { "name": "monetary_policy", "type": "address" }, { "name": "loan_discount", "type": "uint256" }, { "name": "liquidation_discount", "type": "uint256" }, { "name": "amm", "type": "address" }], "outputs": [] }, { "stateMutability": "pure", "type": "function", "name": "factory", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "pure", "type": "function", "name": "amm", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "pure", "type": "function", "name": "collateral_token", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "pure", "type": "function", "name": "borrowed_token", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "save_rate", "inputs": [], "outputs": [] }, { "stateMutability": "view", "type": "function", "name": "debt", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "loan_exists", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "bool" }] }, { "stateMutability": "view", "type": "function", "name": "total_debt", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "max_borrowable", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "N", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "max_borrowable", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "N", "type": "uint256" }, { "name": "current_debt", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "min_collateral", "inputs": [{ "name": "debt", "type": "uint256" }, { "name": "N", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "calculate_debt_n1", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "debt", "type": "uint256" }, { "name": "N", "type": "uint256" }], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "create_loan", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "debt", "type": "uint256" }, { "name": "N", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "create_loan_extended", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "debt", "type": "uint256" }, { "name": "N", "type": "uint256" }, { "name": "callbacker", "type": "address" }, { "name": "callback_args", "type": "uint256[]" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "add_collateral", "inputs": [{ "name": "collateral", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "add_collateral", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "_for", "type": "address" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "remove_collateral", "inputs": [{ "name": "collateral", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "remove_collateral", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "use_eth", "type": "bool" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "borrow_more", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "debt", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "borrow_more_extended", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "debt", "type": "uint256" }, { "name": "callbacker", "type": "address" }, { "name": "callback_args", "type": "uint256[]" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "repay", "inputs": [{ "name": "_d_debt", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "repay", "inputs": [{ "name": "_d_debt", "type": "uint256" }, { "name": "_for", "type": "address" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "repay", "inputs": [{ "name": "_d_debt", "type": "uint256" }, { "name": "_for", "type": "address" }, { "name": "max_active_band", "type": "int256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "repay", "inputs": [{ "name": "_d_debt", "type": "uint256" }, { "name": "_for", "type": "address" }, { "name": "max_active_band", "type": "int256" }, { "name": "use_eth", "type": "bool" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "repay_extended", "inputs": [{ "name": "callbacker", "type": "address" }, { "name": "callback_args", "type": "uint256[]" }], "outputs": [] }, { "stateMutability": "view", "type": "function", "name": "health_calculator", "inputs": [{ "name": "user", "type": "address" }, { "name": "d_collateral", "type": "int256" }, { "name": "d_debt", "type": "int256" }, { "name": "full", "type": "bool" }], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "view", "type": "function", "name": "health_calculator", "inputs": [{ "name": "user", "type": "address" }, { "name": "d_collateral", "type": "int256" }, { "name": "d_debt", "type": "int256" }, { "name": "full", "type": "bool" }, { "name": "N", "type": "uint256" }], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "liquidate", "inputs": [{ "name": "user", "type": "address" }, { "name": "min_x", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "liquidate", "inputs": [{ "name": "user", "type": "address" }, { "name": "min_x", "type": "uint256" }, { "name": "use_eth", "type": "bool" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "liquidate_extended", "inputs": [{ "name": "user", "type": "address" }, { "name": "min_x", "type": "uint256" }, { "name": "frac", "type": "uint256" }, { "name": "use_eth", "type": "bool" }, { "name": "callbacker", "type": "address" }, { "name": "callback_args", "type": "uint256[]" }], "outputs": [] }, { "stateMutability": "view", "type": "function", "name": "tokens_to_liquidate", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "tokens_to_liquidate", "inputs": [{ "name": "user", "type": "address" }, { "name": "frac", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "health", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "view", "type": "function", "name": "health", "inputs": [{ "name": "user", "type": "address" }, { "name": "full", "type": "bool" }], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "view", "type": "function", "name": "users_to_liquidate", "inputs": [], "outputs": [{ "name": "", "type": "tuple[]", "components": [{ "name": "user", "type": "address" }, { "name": "x", "type": "uint256" }, { "name": "y", "type": "uint256" }, { "name": "debt", "type": "uint256" }, { "name": "health", "type": "int256" }] }] }, { "stateMutability": "view", "type": "function", "name": "users_to_liquidate", "inputs": [{ "name": "_from", "type": "uint256" }], "outputs": [{ "name": "", "type": "tuple[]", "components": [{ "name": "user", "type": "address" }, { "name": "x", "type": "uint256" }, { "name": "y", "type": "uint256" }, { "name": "debt", "type": "uint256" }, { "name": "health", "type": "int256" }] }] }, { "stateMutability": "view", "type": "function", "name": "users_to_liquidate", "inputs": [{ "name": "_from", "type": "uint256" }, { "name": "_limit", "type": "uint256" }], "outputs": [{ "name": "", "type": "tuple[]", "components": [{ "name": "user", "type": "address" }, { "name": "x", "type": "uint256" }, { "name": "y", "type": "uint256" }, { "name": "debt", "type": "uint256" }, { "name": "health", "type": "int256" }] }] }, { "stateMutability": "view", "type": "function", "name": "amm_price", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "user_prices", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "uint256[2]" }] }, { "stateMutability": "view", "type": "function", "name": "user_state", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "uint256[4]" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_amm_fee", "inputs": [{ "name": "fee", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_amm_admin_fee", "inputs": [{ "name": "fee", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_monetary_policy", "inputs": [{ "name": "monetary_policy", "type": "address" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_borrowing_discounts", "inputs": [{ "name": "loan_discount", "type": "uint256" }, { "name": "liquidation_discount", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_callback", "inputs": [{ "name": "cb", "type": "address" }], "outputs": [] }, { "stateMutability": "view", "type": "function", "name": "admin_fees", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "collect_fees", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "check_lock", "inputs": [], "outputs": [{ "name": "", "type": "bool" }] }, { "stateMutability": "view", "type": "function", "name": "liquidation_discounts", "inputs": [{ "name": "arg0", "type": "address" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "loans", "inputs": [{ "name": "arg0", "type": "uint256" }], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "view", "type": "function", "name": "loan_ix", "inputs": [{ "name": "arg0", "type": "address" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "n_loans", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "minted", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "redeemed", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "monetary_policy", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "view", "type": "function", "name": "liquidation_discount", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "loan_discount", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }],
1087
1087
  "networks": {}
1088
1088
  },
1089
+ "LiquityV2View": {
1090
+ "abi": [{ "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "uint256", "name": "_interestRate", "type": "uint256" }, { "internalType": "uint256", "name": "_prevId", "type": "uint256" }, { "internalType": "uint256", "name": "_nextId", "type": "uint256" }], "name": "findInsertPosition", "outputs": [{ "internalType": "uint256", "name": "prevId", "type": "uint256" }, { "internalType": "uint256", "name": "nextId", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "uint256", "name": "_collIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_interestRate", "type": "uint256" }, { "internalType": "uint256", "name": "_numTrials", "type": "uint256" }, { "internalType": "uint256", "name": "_inputRandomSeed", "type": "uint256" }], "name": "getApproxHint", "outputs": [{ "internalType": "uint256", "name": "hintId", "type": "uint256" }, { "internalType": "uint256", "name": "diff", "type": "uint256" }, { "internalType": "uint256", "name": "latestRandomSeed", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "uint256", "name": "_troveId", "type": "uint256" }, { "internalType": "uint256", "name": "_acc", "type": "uint256" }, { "internalType": "uint256", "name": "_iterations", "type": "uint256" }], "name": "getDebtInFront", "outputs": [{ "internalType": "uint256", "name": "next", "type": "uint256" }, { "internalType": "uint256", "name": "debt", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "uint256", "name": "_troveId", "type": "uint256" }, { "internalType": "uint256", "name": "_acc", "type": "uint256" }, { "internalType": "uint256", "name": "_iterations", "type": "uint256" }, { "internalType": "uint256", "name": "_targetIR", "type": "uint256" }], "name": "getDebtInFrontByInterestRate", "outputs": [{ "internalType": "uint256", "name": "next", "type": "uint256" }, { "internalType": "uint256", "name": "debt", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "uint256", "name": "_numTroves", "type": "uint256" }], "name": "getDebtInFrontByTroveNum", "outputs": [{ "internalType": "uint256", "name": "debt", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address", "name": "_depositor", "type": "address" }], "name": "getDepositorInfo", "outputs": [{ "internalType": "uint256", "name": "compoundedBOLD", "type": "uint256" }, { "internalType": "uint256", "name": "collGain", "type": "uint256" }, { "internalType": "uint256", "name": "boldGain", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "uint256", "name": "_collIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_interestRate", "type": "uint256" }, { "internalType": "uint256", "name": "_numTrials", "type": "uint256" }, { "internalType": "uint256", "name": "_inputRandomSeed", "type": "uint256" }], "name": "getInsertPosition", "outputs": [{ "internalType": "uint256", "name": "prevId", "type": "uint256" }, { "internalType": "uint256", "name": "nextId", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }], "name": "getMarketData", "outputs": [{ "components": [{ "internalType": "address", "name": "market", "type": "address" }, { "internalType": "uint256", "name": "CCR", "type": "uint256" }, { "internalType": "uint256", "name": "MCR", "type": "uint256" }, { "internalType": "uint256", "name": "SCR", "type": "uint256" }, { "internalType": "uint256", "name": "LIQUIDATION_PENALTY_SP", "type": "uint256" }, { "internalType": "uint256", "name": "LIQUIDATION_PENALTY_REDISTRIBUTION", "type": "uint256" }, { "internalType": "uint256", "name": "entireSystemColl", "type": "uint256" }, { "internalType": "uint256", "name": "entireSystemDebt", "type": "uint256" }, { "internalType": "address", "name": "collToken", "type": "address" }, { "internalType": "address", "name": "troveNFT", "type": "address" }, { "internalType": "address", "name": "borrowerOperations", "type": "address" }, { "internalType": "address", "name": "troveManager", "type": "address" }, { "internalType": "address", "name": "stabilityPool", "type": "address" }, { "internalType": "address", "name": "sortedTroves", "type": "address" }, { "internalType": "address", "name": "collSurplusPool", "type": "address" }, { "internalType": "address", "name": "activePool", "type": "address" }, { "internalType": "address", "name": "hintHelpers", "type": "address" }, { "internalType": "address", "name": "priceFeed", "type": "address" }, { "internalType": "uint256", "name": "collPrice", "type": "uint256" }, { "internalType": "bool", "name": "isShutDown", "type": "bool" }], "internalType": "struct LiquityV2View.MarketData", "name": "data", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "uint256", "name": "_troveId", "type": "uint256" }, { "internalType": "uint256", "name": "_iterations", "type": "uint256" }], "name": "getNumOfTrovesInFrontOfTrove", "outputs": [{ "internalType": "uint256", "name": "next", "type": "uint256" }, { "internalType": "uint256", "name": "numTroves", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "uint256", "name": "_troveId", "type": "uint256" }], "name": "getTroveInfo", "outputs": [{ "components": [{ "internalType": "uint256", "name": "troveId", "type": "uint256" }, { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "collToken", "type": "address" }, { "internalType": "enum ITroveManager.Status", "name": "status", "type": "uint8" }, { "internalType": "uint256", "name": "collAmount", "type": "uint256" }, { "internalType": "uint256", "name": "debtAmount", "type": "uint256" }, { "internalType": "uint256", "name": "collPrice", "type": "uint256" }, { "internalType": "uint256", "name": "TCRatio", "type": "uint256" }, { "internalType": "uint256", "name": "annualInterestRate", "type": "uint256" }, { "internalType": "address", "name": "interestBatchManager", "type": "address" }, { "internalType": "uint256", "name": "batchDebtShares", "type": "uint256" }], "internalType": "struct LiquityV2View.TroveData", "name": "trove", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "uint256", "name": "_collIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_troveId", "type": "uint256" }, { "internalType": "uint256", "name": "_numTrials", "type": "uint256" }, { "internalType": "uint256", "name": "_inputRandomSeed", "type": "uint256" }], "name": "getTrovePosition", "outputs": [{ "internalType": "uint256", "name": "prevId", "type": "uint256" }, { "internalType": "uint256", "name": "nextId", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }, { "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "uint256", "name": "_startIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_endIndex", "type": "uint256" }], "name": "getUserTroves", "outputs": [{ "components": [{ "internalType": "uint256", "name": "troveId", "type": "uint256" }, { "internalType": "bool", "name": "ownedByUser", "type": "bool" }], "internalType": "struct LiquityV2View.ExistingTrove[]", "name": "troves", "type": "tuple[]" }, { "internalType": "int256", "name": "nextFreeTroveIndex", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }], "name": "isShutDown", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "uint256", "name": "_collIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_troveId", "type": "uint256" }, { "internalType": "uint256", "name": "_debtIncrease", "type": "uint256" }], "name": "predictAdjustTroveUpfrontFee", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }],
1091
+ "networks": {
1092
+ "1": { "address": "0x10B748Dc504C2515Bb6A9e23CB2F686090b6c584" },
1093
+ },
1094
+ },
1095
+ "LiquityV2CollSurplusPool": {
1096
+ "abi": [{ "inputs": [{ "internalType": "contract IAddressesRegistry", "name": "_addressesRegistry", "type": "address" }], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "address", "name": "_newBorrowerOperationsAddress", "type": "address" }], "name": "BorrowerOperationsAddressChanged", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "_account", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "_newBalance", "type": "uint256" }], "name": "CollBalanceUpdated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "_to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "_amount", "type": "uint256" }], "name": "CollSent", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "address", "name": "_newTroveManagerAddress", "type": "address" }], "name": "TroveManagerAddressChanged", "type": "event" }, { "inputs": [], "name": "NAME", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_account", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }], "name": "accountSurplus", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "borrowerOperationsAddress", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_account", "type": "address" }], "name": "claimColl", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "collToken", "outputs": [{ "internalType": "contract IERC20", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getCollBalance", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_account", "type": "address" }], "name": "getCollateral", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "troveManagerAddress", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }],
1097
+ "networks": {}
1098
+ },
1099
+ "LiquityV2TroveNFT": {
1100
+ "abi": [{ "inputs": [{ "internalType": "contract IAddressesRegistry", "name": "_addressesRegistry", "type": "address" }], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "approved", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "tokenId", "type": "uint256" }], "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "operator", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "approved", "type": "bool" }], "name": "ApprovalForAll", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "tokenId", "type": "uint256" }], "name": "Transfer", "type": "event" }, { "inputs": [{ "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" }], "name": "approve", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], "name": "balanceOf", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_troveId", "type": "uint256" }], "name": "burn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "tokenId", "type": "uint256" }], "name": "getApproved", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "operator", "type": "address" }], "name": "isApprovedForAll", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "metadataNFT", "outputs": [{ "internalType": "contract IMetadataNFT", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_owner", "type": "address" }, { "internalType": "uint256", "name": "_troveId", "type": "uint256" }], "name": "mint", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "name", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "tokenId", "type": "uint256" }], "name": "ownerOf", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" }], "name": "safeTransferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" }], "name": "safeTransferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "operator", "type": "address" }, { "internalType": "bool", "name": "approved", "type": "bool" }], "name": "setApprovalForAll", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" }], "name": "supportsInterface", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "symbol", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_tokenId", "type": "uint256" }], "name": "tokenURI", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" }], "name": "transferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "troveManager", "outputs": [{ "internalType": "contract ITroveManager", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }],
1101
+ "networks": {}
1102
+ },
1089
1103
  "EulerV2View": {
1090
1104
  "abi": [{ "inputs": [], "name": "USD", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "feedRegistry", "outputs": [{ "internalType": "contract IFeedRegistry", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_account", "type": "address" }, { "internalType": "uint256", "name": "_page", "type": "uint256" }, { "internalType": "uint256", "name": "_perPage", "type": "uint256" }], "name": "fetchUsedAccounts", "outputs": [{ "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address[]", "name": "accounts", "type": "address[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getAaveTokenPriceInETH", "outputs": [{ "internalType": "uint256", "name": "price", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getAaveTokenPriceInUSD", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getAaveV3TokenPriceInETH", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getAaveV3TokenPriceInUSD", "outputs": [{ "internalType": "uint256", "name": "price", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }], "name": "getAddrForChainlinkOracle", "outputs": [{ "internalType": "address", "name": "tokenAddrForChainlinkUsage", "type": "address" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "address", "name": "vault", "type": "address" }, { "internalType": "bool", "name": "isBorrowOperation", "type": "bool" }, { "internalType": "uint256", "name": "liquidityAdded", "type": "uint256" }, { "internalType": "uint256", "name": "liquidityRemoved", "type": "uint256" }], "internalType": "struct EulerV2View.LiquidityChangeParams[]", "name": "params", "type": "tuple[]" }], "name": "getApyAfterValuesEstimation", "outputs": [{ "internalType": "uint256[]", "name": "estimatedBorrowRates", "type": "uint256[]" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }], "name": "getChainlinkPriceInETH", "outputs": [{ "internalType": "int256", "name": "chainlinkPriceInETH", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }, { "internalType": "bool", "name": "_useFallback", "type": "bool" }], "name": "getChainlinkPriceInUSD", "outputs": [{ "internalType": "int256", "name": "chainlinkPriceInUSD", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }], "name": "getPriceInETH", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }], "name": "getPriceInUSD", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }, { "internalType": "uint80", "name": "_roundId", "type": "uint80" }, { "internalType": "contract IAggregatorV3", "name": "aggregator", "type": "address" }], "name": "getRoundInfo", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "updateTimestamp", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }, { "internalType": "uint80", "name": "_roundId", "type": "uint80" }], "name": "getRoundInfo", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "updateTimestamp", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getSparkTokenPriceInETH", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getSparkTokenPriceInUSD", "outputs": [{ "internalType": "uint256", "name": "price", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }], "name": "getUserData", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "bool", "name": "inLockDownMode", "type": "bool" }, { "internalType": "bool", "name": "inPermitDisabledMode", "type": "bool" }, { "internalType": "address", "name": "borrowVault", "type": "address" }, { "internalType": "uint256", "name": "borrowAmountInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowAmountInAsset", "type": "uint256" }, { "components": [{ "internalType": "address", "name": "collateralVault", "type": "address" }, { "internalType": "bool", "name": "usedInBorrow", "type": "bool" }, { "internalType": "uint256", "name": "collateralAmountInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "collateralAmountInAsset", "type": "uint256" }, { "internalType": "uint256", "name": "collateralAmountInUSD", "type": "uint256" }], "internalType": "struct EulerV2View.UserCollateralInfo[]", "name": "collaterals", "type": "tuple[]" }], "internalType": "struct EulerV2View.UserData", "name": "data", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address[]", "name": "_users", "type": "address[]" }], "name": "getUsersData", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "bool", "name": "inLockDownMode", "type": "bool" }, { "internalType": "bool", "name": "inPermitDisabledMode", "type": "bool" }, { "internalType": "address", "name": "borrowVault", "type": "address" }, { "internalType": "uint256", "name": "borrowAmountInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowAmountInAsset", "type": "uint256" }, { "components": [{ "internalType": "address", "name": "collateralVault", "type": "address" }, { "internalType": "bool", "name": "usedInBorrow", "type": "bool" }, { "internalType": "uint256", "name": "collateralAmountInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "collateralAmountInAsset", "type": "uint256" }, { "internalType": "uint256", "name": "collateralAmountInUSD", "type": "uint256" }], "internalType": "struct EulerV2View.UserCollateralInfo[]", "name": "collaterals", "type": "tuple[]" }], "internalType": "struct EulerV2View.UserData[]", "name": "data", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_vault", "type": "address" }], "name": "getVaultCollaterals", "outputs": [{ "components": [{ "internalType": "address", "name": "vaultAddr", "type": "address" }, { "internalType": "address", "name": "assetAddr", "type": "address" }, { "internalType": "string", "name": "vaultSymbol", "type": "string" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "address", "name": "governorAdmin", "type": "address" }, { "internalType": "bool", "name": "isEscrowed", "type": "bool" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "uint256", "name": "sharePriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "assetPriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "cash", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrows", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint16", "name": "borrowLTV", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationLTV", "type": "uint16" }, { "internalType": "uint16", "name": "initialLiquidationLTV", "type": "uint16" }, { "internalType": "uint48", "name": "targetTimestamp", "type": "uint48" }, { "internalType": "uint32", "name": "rampDuration", "type": "uint32" }, { "internalType": "uint256", "name": "interestFee", "type": "uint256" }, { "internalType": "uint256", "name": "interestRate", "type": "uint256" }], "internalType": "struct EulerV2View.CollateralInfo[]", "name": "collateralsInfo", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_vault", "type": "address" }], "name": "getVaultInfoFull", "outputs": [{ "components": [{ "internalType": "address", "name": "vaultAddr", "type": "address" }, { "internalType": "address", "name": "assetAddr", "type": "address" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "symbol", "type": "string" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplyShares", "type": "uint256" }, { "internalType": "uint256", "name": "cash", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrows", "type": "uint256" }, { "internalType": "uint256", "name": "totalAssets", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint256", "name": "borrowCap", "type": "uint256" }, { "components": [{ "internalType": "address", "name": "vaultAddr", "type": "address" }, { "internalType": "address", "name": "assetAddr", "type": "address" }, { "internalType": "string", "name": "vaultSymbol", "type": "string" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "address", "name": "governorAdmin", "type": "address" }, { "internalType": "bool", "name": "isEscrowed", "type": "bool" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "uint256", "name": "sharePriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "assetPriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "cash", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrows", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint16", "name": "borrowLTV", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationLTV", "type": "uint16" }, { "internalType": "uint16", "name": "initialLiquidationLTV", "type": "uint16" }, { "internalType": "uint48", "name": "targetTimestamp", "type": "uint48" }, { "internalType": "uint32", "name": "rampDuration", "type": "uint32" }, { "internalType": "uint256", "name": "interestFee", "type": "uint256" }, { "internalType": "uint256", "name": "interestRate", "type": "uint256" }], "internalType": "struct EulerV2View.CollateralInfo[]", "name": "collaterals", "type": "tuple[]" }, { "internalType": "uint16", "name": "maxLiquidationDiscount", "type": "uint16" }, { "internalType": "uint256", "name": "liquidationCoolOffTime", "type": "uint256" }, { "internalType": "bool", "name": "badDebtSocializationEnabled", "type": "bool" }, { "internalType": "address", "name": "unitOfAccount", "type": "address" }, { "internalType": "uint256", "name": "unitOfAccountInUsd", "type": "uint256" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "uint256", "name": "assetPriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "sharePriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "interestRate", "type": "uint256" }, { "internalType": "address", "name": "irm", "type": "address" }, { "internalType": "address", "name": "balanceTrackerAddress", "type": "address" }, { "internalType": "address", "name": "creator", "type": "address" }, { "internalType": "address", "name": "governorAdmin", "type": "address" }, { "internalType": "uint256", "name": "interestFee", "type": "uint256" }], "internalType": "struct EulerV2View.VaultInfoFull", "name": "data", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address[]", "name": "_vaults", "type": "address[]" }], "name": "getVaultsInfosFull", "outputs": [{ "components": [{ "internalType": "address", "name": "vaultAddr", "type": "address" }, { "internalType": "address", "name": "assetAddr", "type": "address" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "symbol", "type": "string" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplyShares", "type": "uint256" }, { "internalType": "uint256", "name": "cash", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrows", "type": "uint256" }, { "internalType": "uint256", "name": "totalAssets", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint256", "name": "borrowCap", "type": "uint256" }, { "components": [{ "internalType": "address", "name": "vaultAddr", "type": "address" }, { "internalType": "address", "name": "assetAddr", "type": "address" }, { "internalType": "string", "name": "vaultSymbol", "type": "string" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "address", "name": "governorAdmin", "type": "address" }, { "internalType": "bool", "name": "isEscrowed", "type": "bool" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "uint256", "name": "sharePriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "assetPriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "cash", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrows", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint16", "name": "borrowLTV", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationLTV", "type": "uint16" }, { "internalType": "uint16", "name": "initialLiquidationLTV", "type": "uint16" }, { "internalType": "uint48", "name": "targetTimestamp", "type": "uint48" }, { "internalType": "uint32", "name": "rampDuration", "type": "uint32" }, { "internalType": "uint256", "name": "interestFee", "type": "uint256" }, { "internalType": "uint256", "name": "interestRate", "type": "uint256" }], "internalType": "struct EulerV2View.CollateralInfo[]", "name": "collaterals", "type": "tuple[]" }, { "internalType": "uint16", "name": "maxLiquidationDiscount", "type": "uint16" }, { "internalType": "uint256", "name": "liquidationCoolOffTime", "type": "uint256" }, { "internalType": "bool", "name": "badDebtSocializationEnabled", "type": "bool" }, { "internalType": "address", "name": "unitOfAccount", "type": "address" }, { "internalType": "uint256", "name": "unitOfAccountInUsd", "type": "uint256" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "uint256", "name": "assetPriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "sharePriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "interestRate", "type": "uint256" }, { "internalType": "address", "name": "irm", "type": "address" }, { "internalType": "address", "name": "balanceTrackerAddress", "type": "address" }, { "internalType": "address", "name": "creator", "type": "address" }, { "internalType": "address", "name": "governorAdmin", "type": "address" }, { "internalType": "uint256", "name": "interestFee", "type": "uint256" }], "internalType": "struct EulerV2View.VaultInfoFull[]", "name": "data", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "int256", "name": "_btcPrice", "type": "int256" }], "name": "getWBtcPrice", "outputs": [{ "internalType": "int256", "name": "wBtcPrice", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "int256", "name": "_stEthPrice", "type": "int256" }], "name": "getWStEthPrice", "outputs": [{ "internalType": "int256", "name": "wStEthPrice", "type": "int256" }], "stateMutability": "view", "type": "function" }],
1091
1105
  "networks": {
@@ -47,4 +47,5 @@ export declare const FeedRegistryContract: (web3: Web3, network: NetworkNumber,
47
47
  export declare const DFSFeedRegistryContract: (web3: Web3, network: NetworkNumber, block?: Blockish) => ContractTypes.DFSFeedRegistry;
48
48
  export declare const MorphoBlueViewContract: (web3: Web3, network: NetworkNumber, block?: Blockish) => ContractTypes.MorphoBlueView;
49
49
  export declare const LlamaLendViewContract: (web3: Web3, network: NetworkNumber, block?: Blockish) => ContractTypes.LlamaLendView;
50
+ export declare const LiquityV2ViewContract: (web3: Web3, network: NetworkNumber, block?: Blockish) => ContractTypes.LiquityV2View;
50
51
  export declare const EulerV2ViewContract: (web3: Web3, network: NetworkNumber, block?: Blockish) => ContractTypes.EulerV2View;
package/cjs/contracts.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.EulerV2ViewContract = exports.LlamaLendViewContract = exports.MorphoBlueViewContract = exports.DFSFeedRegistryContract = exports.FeedRegistryContract = exports.WstETHPriceFeedContract = exports.USDCPriceFeedContract = exports.COMPPriceFeedContract = exports.ETHPriceFeedContract = exports.ChickenBondsManagerContract = exports.ChickenBondsViewContract = exports.McdVatContract = exports.McdJugContract = exports.McdDogContract = exports.McdSpotterContract = exports.McdViewContract = exports.LiquityActivePoolContract = exports.LiquityPriceFeedContract = exports.LiquityTroveManagerContract = exports.LiquityCollSurplusPoolContract = exports.LiquityViewContract = exports.CrvUSDFactoryContract = exports.CrvUSDViewContract = exports.SparkViewContract = exports.SparkIncentiveDataProviderContract = exports.MorphoAaveV2ViewContract = exports.PotContract = exports.ComptrollerContract = exports.CompoundLoanInfoContract = exports.AaveLoanInfoV2Contract = exports.wstETHContract = exports.CompV3ViewContract = exports.BalanceScannerContract = exports.REthContract = exports.CbEthContract = exports.LidoContract = exports.GhoTokenContract = exports.AaveIncentiveDataProviderV3Contract = exports.AaveV3ViewContract = exports.UniMulticallContract = exports.createContractWrapper = exports.getErc20Contract = exports.getConfigContractAbi = exports.getConfigContractAddress = void 0;
6
+ exports.EulerV2ViewContract = exports.LiquityV2ViewContract = exports.LlamaLendViewContract = exports.MorphoBlueViewContract = exports.DFSFeedRegistryContract = exports.FeedRegistryContract = exports.WstETHPriceFeedContract = exports.USDCPriceFeedContract = exports.COMPPriceFeedContract = exports.ETHPriceFeedContract = exports.ChickenBondsManagerContract = exports.ChickenBondsViewContract = exports.McdVatContract = exports.McdJugContract = exports.McdDogContract = exports.McdSpotterContract = exports.McdViewContract = exports.LiquityActivePoolContract = exports.LiquityPriceFeedContract = exports.LiquityTroveManagerContract = exports.LiquityCollSurplusPoolContract = exports.LiquityViewContract = exports.CrvUSDFactoryContract = exports.CrvUSDViewContract = exports.SparkViewContract = exports.SparkIncentiveDataProviderContract = exports.MorphoAaveV2ViewContract = exports.PotContract = exports.ComptrollerContract = exports.CompoundLoanInfoContract = exports.AaveLoanInfoV2Contract = exports.wstETHContract = exports.CompV3ViewContract = exports.BalanceScannerContract = exports.REthContract = exports.CbEthContract = exports.LidoContract = exports.GhoTokenContract = exports.AaveIncentiveDataProviderV3Contract = exports.AaveV3ViewContract = exports.UniMulticallContract = exports.createContractWrapper = exports.getErc20Contract = exports.getConfigContractAbi = exports.getConfigContractAddress = void 0;
7
7
  const contracts_1 = __importDefault(require("./config/contracts"));
8
8
  const contractConfig = contracts_1.default;
9
9
  const getConfigContractAddress = (name, network, block) => {
@@ -89,4 +89,5 @@ exports.FeedRegistryContract = createContractFromConfigFunc('FeedRegistry');
89
89
  exports.DFSFeedRegistryContract = createContractFromConfigFunc('DFSFeedRegistry');
90
90
  exports.MorphoBlueViewContract = createContractFromConfigFunc('MorphoBlueView');
91
91
  exports.LlamaLendViewContract = createContractFromConfigFunc('LlamaLendView');
92
+ exports.LiquityV2ViewContract = createContractFromConfigFunc('LiquityV2View');
92
93
  exports.EulerV2ViewContract = createContractFromConfigFunc('EulerV2View');
@@ -6,4 +6,5 @@ export * as makerHelpers from './makerHelpers';
6
6
  export * as chickenBondsHelpers from './chickenBondsHelpers';
7
7
  export * as morphoBlueHelpers from './morphoBlueHelpers';
8
8
  export * as llamaLendHelpers from './llamaLendHelpers';
9
+ export * as liquityV2Helpers from './liquityV2Helpers';
9
10
  export * as eulerV2Helpers from './eulerHelpers';
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.eulerV2Helpers = exports.llamaLendHelpers = exports.morphoBlueHelpers = exports.chickenBondsHelpers = exports.makerHelpers = exports.curveUsdHelpers = exports.sparkHelpers = exports.compoundHelpers = exports.aaveHelpers = void 0;
26
+ exports.eulerV2Helpers = exports.liquityV2Helpers = exports.llamaLendHelpers = exports.morphoBlueHelpers = exports.chickenBondsHelpers = exports.makerHelpers = exports.curveUsdHelpers = exports.sparkHelpers = exports.compoundHelpers = exports.aaveHelpers = void 0;
27
27
  exports.aaveHelpers = __importStar(require("./aaveHelpers"));
28
28
  exports.compoundHelpers = __importStar(require("./compoundHelpers"));
29
29
  exports.sparkHelpers = __importStar(require("./sparkHelpers"));
@@ -32,4 +32,5 @@ exports.makerHelpers = __importStar(require("./makerHelpers"));
32
32
  exports.chickenBondsHelpers = __importStar(require("./chickenBondsHelpers"));
33
33
  exports.morphoBlueHelpers = __importStar(require("./morphoBlueHelpers"));
34
34
  exports.llamaLendHelpers = __importStar(require("./llamaLendHelpers"));
35
+ exports.liquityV2Helpers = __importStar(require("./liquityV2Helpers"));
35
36
  exports.eulerV2Helpers = __importStar(require("./eulerHelpers"));
@@ -0,0 +1,12 @@
1
+ import { LiquityV2AggregatedTroveData, LiquityV2AssetsData, LiquityV2UsedAssets } from '../../types';
2
+ export declare const calculateNetApyLiquityV2: (usedAssets: LiquityV2UsedAssets, assetsData: LiquityV2AssetsData, interestRate: string) => {
3
+ netApy: string;
4
+ totalInterestUsd: string;
5
+ incentiveUsd: string;
6
+ };
7
+ export declare const getLiquityV2AggregatedPositionData: ({ usedAssets, assetsData, minCollRatio, interestRate, }: {
8
+ usedAssets: LiquityV2UsedAssets;
9
+ assetsData: LiquityV2AssetsData;
10
+ minCollRatio: string;
11
+ interestRate: string;
12
+ }) => LiquityV2AggregatedTroveData;