@ensuro/core 2.7.0 → 2.8.0-beta2

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 (79) hide show
  1. package/README.md +13 -7
  2. package/contracts/AccessManager.sol +3 -13
  3. package/contracts/EToken.sol +29 -95
  4. package/contracts/LPManualWhitelist.sol +11 -26
  5. package/contracts/LiquidityThresholdAssetManager.sol +10 -21
  6. package/contracts/Policy.sol +10 -20
  7. package/contracts/PolicyPool.sol +110 -127
  8. package/contracts/PolicyPoolComponent.sol +9 -32
  9. package/contracts/PremiumsAccount.sol +41 -47
  10. package/contracts/Reserve.sol +10 -16
  11. package/contracts/RiskModule.sol +74 -83
  12. package/contracts/SignedBucketRiskModule.sol +18 -80
  13. package/contracts/SignedQuoteRiskModule.sol +13 -44
  14. package/contracts/TieredSignedQuoteRiskModule.sol +7 -13
  15. package/contracts/TimeScaled.sol +8 -39
  16. package/contracts/TrustfulRiskModule.sol +47 -42
  17. package/contracts/interfaces/IAccessManager.sol +2 -11
  18. package/contracts/interfaces/IEToken.sol +1 -5
  19. package/contracts/interfaces/ILPWhitelist.sol +2 -10
  20. package/contracts/interfaces/IPolicyHolder.sol +2 -11
  21. package/contracts/interfaces/IPolicyPool.sol +59 -3
  22. package/contracts/interfaces/IPremiumsAccount.sol +17 -5
  23. package/contracts/migration/LPManualWhitelistV20.sol +3 -15
  24. package/contracts/migration/LPManualWhitelistV20Upgraded.sol +1 -5
  25. package/contracts/mocks/FixedRateVault.sol +1 -6
  26. package/contracts/mocks/InterfaceIdCalculator.sol +2 -0
  27. package/contracts/mocks/PolicyHolderMock.sol +3 -13
  28. package/contracts/mocks/PolicyPoolComponentMock.sol +1 -3
  29. package/contracts/mocks/PolicyPoolMock.sol +25 -25
  30. package/contracts/mocks/RiskModuleMock.sol +39 -16
  31. package/contracts/mocks/TestNFT.sol +1 -1
  32. package/js/deploy.js +44 -39
  33. package/js/test-utils.js +30 -19
  34. package/js/utils.js +62 -29
  35. package/package.json +1 -1
  36. package/scripts/utils.sh +23 -12
  37. package/build/contracts/AccessManager.sol/AccessManager.json +0 -618
  38. package/build/contracts/ERC4626AssetManager.sol/ERC4626AssetManager.json +0 -238
  39. package/build/contracts/EToken.sol/EToken.json +0 -1277
  40. package/build/contracts/LPManualWhitelist.sol/LPManualWhitelist.json +0 -647
  41. package/build/contracts/LiquidityThresholdAssetManager.sol/LiquidityThresholdAssetManager.json +0 -222
  42. package/build/contracts/Policy.sol/Policy.json +0 -10
  43. package/build/contracts/PolicyPool.sol/PolicyPool.json +0 -1416
  44. package/build/contracts/PolicyPoolComponent.sol/PolicyPoolComponent.json +0 -332
  45. package/build/contracts/PremiumsAccount.sol/PremiumsAccount.json +0 -970
  46. package/build/contracts/Reserve.sol/Reserve.json +0 -403
  47. package/build/contracts/RiskModule.sol/RiskModule.json +0 -559
  48. package/build/contracts/SignedBucketRiskModule.sol/SignedBucketRiskModule.json +0 -1262
  49. package/build/contracts/SignedQuoteRiskModule.sol/SignedQuoteRiskModule.json +0 -1110
  50. package/build/contracts/TieredSignedQuoteRiskModule.sol/TieredSignedQuoteRiskModule.json +0 -1316
  51. package/build/contracts/TimeScaled.sol/TimeScaled.json +0 -10
  52. package/build/contracts/TrustfulRiskModule.sol/TrustfulRiskModule.json +0 -984
  53. package/build/contracts/dependencies/ERC1967Proxy.sol/ERC1967Proxy.json +0 -64
  54. package/build/contracts/dependencies/IERC20Metadata.sol/IERC20Metadata.json +0 -233
  55. package/build/contracts/dependencies/WadRayMath.sol/WadRayMath.json +0 -10
  56. package/build/contracts/interfaces/IAccessManager.sol/IAccessManager.json +0 -343
  57. package/build/contracts/interfaces/IAssetManager.sol/IAssetManager.json +0 -128
  58. package/build/contracts/interfaces/IEToken.sol/IEToken.json +0 -460
  59. package/build/contracts/interfaces/ILPWhitelist.sol/ILPWhitelist.json +0 -103
  60. package/build/contracts/interfaces/IPolicyHolder.sol/IPolicyHolder.json +0 -108
  61. package/build/contracts/interfaces/IPolicyPool.sol/IPolicyPool.json +0 -501
  62. package/build/contracts/interfaces/IPolicyPoolComponent.sol/IPolicyPoolComponent.json +0 -43
  63. package/build/contracts/interfaces/IPremiumsAccount.sol/IPremiumsAccount.json +0 -315
  64. package/build/contracts/interfaces/IRiskModule.sol/IRiskModule.json +0 -165
  65. package/build/contracts/migration/LPManualWhitelistV20.sol/LPManualWhitelistV20.json +0 -481
  66. package/build/contracts/migration/LPManualWhitelistV20Upgraded.sol/LPManualWhitelistV20Upgraded.json +0 -492
  67. package/build/contracts/mocks/FixedRateVault.sol/FixedRateVault.json +0 -736
  68. package/build/contracts/mocks/ForwardProxy.sol/ForwardProxy.json +0 -43
  69. package/build/contracts/mocks/IMintableERC20.sol/IMintableERC20.json +0 -47
  70. package/build/contracts/mocks/InterfaceIdCalculator.sol/InterfaceIdCalculator.json +0 -180
  71. package/build/contracts/mocks/PolicyHolderMock.sol/PolicyHolderMock.json +0 -319
  72. package/build/contracts/mocks/PolicyPoolComponentMock.sol/PolicyPoolComponentMock.json +0 -54
  73. package/build/contracts/mocks/PolicyPoolMock.sol/PolicyPoolMock.json +0 -721
  74. package/build/contracts/mocks/PolicyPoolMock.sol/PolicyPoolMockForward.json +0 -92
  75. package/build/contracts/mocks/RiskModuleMock.sol/RiskModuleMock.json +0 -783
  76. package/build/contracts/mocks/TestCurrency.sol/TestCurrency.json +0 -343
  77. package/build/contracts/mocks/TestNFT.sol/TestNFT.json +0 -388
  78. package/contracts/dependencies/ERC1967Proxy.sol +0 -19
  79. package/contracts/dependencies/IERC20Metadata.sol +0 -19
@@ -1,222 +0,0 @@
1
- {
2
- "_format": "hh-sol-artifact-1",
3
- "contractName": "LiquidityThresholdAssetManager",
4
- "sourceName": "contracts/LiquidityThresholdAssetManager.sol",
5
- "abi": [
6
- {
7
- "anonymous": false,
8
- "inputs": [
9
- {
10
- "indexed": false,
11
- "internalType": "int256",
12
- "name": "earnings",
13
- "type": "int256"
14
- }
15
- ],
16
- "name": "EarningsRecorded",
17
- "type": "event"
18
- },
19
- {
20
- "anonymous": false,
21
- "inputs": [
22
- {
23
- "indexed": true,
24
- "internalType": "enum IAccessManager.GovernanceActions",
25
- "name": "action",
26
- "type": "uint8"
27
- },
28
- {
29
- "indexed": false,
30
- "internalType": "uint256",
31
- "name": "value",
32
- "type": "uint256"
33
- }
34
- ],
35
- "name": "GovernanceAction",
36
- "type": "event"
37
- },
38
- {
39
- "anonymous": false,
40
- "inputs": [
41
- {
42
- "indexed": false,
43
- "internalType": "uint256",
44
- "name": "amount",
45
- "type": "uint256"
46
- }
47
- ],
48
- "name": "MoneyDeinvested",
49
- "type": "event"
50
- },
51
- {
52
- "anonymous": false,
53
- "inputs": [
54
- {
55
- "indexed": false,
56
- "internalType": "uint256",
57
- "name": "amount",
58
- "type": "uint256"
59
- }
60
- ],
61
- "name": "MoneyInvested",
62
- "type": "event"
63
- },
64
- {
65
- "inputs": [],
66
- "name": "connect",
67
- "outputs": [],
68
- "stateMutability": "nonpayable",
69
- "type": "function"
70
- },
71
- {
72
- "inputs": [],
73
- "name": "deinvestAll",
74
- "outputs": [
75
- {
76
- "internalType": "int256",
77
- "name": "",
78
- "type": "int256"
79
- }
80
- ],
81
- "stateMutability": "nonpayable",
82
- "type": "function"
83
- },
84
- {
85
- "inputs": [],
86
- "name": "getInvestmentValue",
87
- "outputs": [
88
- {
89
- "internalType": "uint256",
90
- "name": "",
91
- "type": "uint256"
92
- }
93
- ],
94
- "stateMutability": "view",
95
- "type": "function"
96
- },
97
- {
98
- "inputs": [],
99
- "name": "liquidityMax",
100
- "outputs": [
101
- {
102
- "internalType": "uint256",
103
- "name": "",
104
- "type": "uint256"
105
- }
106
- ],
107
- "stateMutability": "view",
108
- "type": "function"
109
- },
110
- {
111
- "inputs": [],
112
- "name": "liquidityMiddle",
113
- "outputs": [
114
- {
115
- "internalType": "uint256",
116
- "name": "",
117
- "type": "uint256"
118
- }
119
- ],
120
- "stateMutability": "view",
121
- "type": "function"
122
- },
123
- {
124
- "inputs": [],
125
- "name": "liquidityMin",
126
- "outputs": [
127
- {
128
- "internalType": "uint256",
129
- "name": "",
130
- "type": "uint256"
131
- }
132
- ],
133
- "stateMutability": "view",
134
- "type": "function"
135
- },
136
- {
137
- "inputs": [],
138
- "name": "rebalance",
139
- "outputs": [],
140
- "stateMutability": "nonpayable",
141
- "type": "function"
142
- },
143
- {
144
- "inputs": [],
145
- "name": "recordEarnings",
146
- "outputs": [
147
- {
148
- "internalType": "int256",
149
- "name": "",
150
- "type": "int256"
151
- }
152
- ],
153
- "stateMutability": "nonpayable",
154
- "type": "function"
155
- },
156
- {
157
- "inputs": [
158
- {
159
- "internalType": "uint256",
160
- "name": "paymentAmount",
161
- "type": "uint256"
162
- }
163
- ],
164
- "name": "refillWallet",
165
- "outputs": [
166
- {
167
- "internalType": "uint256",
168
- "name": "deinvest",
169
- "type": "uint256"
170
- }
171
- ],
172
- "stateMutability": "nonpayable",
173
- "type": "function"
174
- },
175
- {
176
- "inputs": [
177
- {
178
- "internalType": "uint256",
179
- "name": "min",
180
- "type": "uint256"
181
- },
182
- {
183
- "internalType": "uint256",
184
- "name": "middle",
185
- "type": "uint256"
186
- },
187
- {
188
- "internalType": "uint256",
189
- "name": "max",
190
- "type": "uint256"
191
- }
192
- ],
193
- "name": "setLiquidityThresholds",
194
- "outputs": [],
195
- "stateMutability": "nonpayable",
196
- "type": "function"
197
- },
198
- {
199
- "inputs": [
200
- {
201
- "internalType": "bytes4",
202
- "name": "interfaceId",
203
- "type": "bytes4"
204
- }
205
- ],
206
- "name": "supportsInterface",
207
- "outputs": [
208
- {
209
- "internalType": "bool",
210
- "name": "",
211
- "type": "bool"
212
- }
213
- ],
214
- "stateMutability": "view",
215
- "type": "function"
216
- }
217
- ],
218
- "bytecode": "0x",
219
- "deployedBytecode": "0x",
220
- "linkReferences": {},
221
- "deployedLinkReferences": {}
222
- }
@@ -1,10 +0,0 @@
1
- {
2
- "_format": "hh-sol-artifact-1",
3
- "contractName": "Policy",
4
- "sourceName": "contracts/Policy.sol",
5
- "abi": [],
6
- "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220dbbf9ee983fee5087628451d65b75c85889dd5fa33af89cedfeff8ca8de0e60a64736f6c63430008100033",
7
- "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220dbbf9ee983fee5087628451d65b75c85889dd5fa33af89cedfeff8ca8de0e60a64736f6c63430008100033",
8
- "linkReferences": {},
9
- "deployedLinkReferences": {}
10
- }