@ensuro/core 2.6.2 → 2.8.0-beta1
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.
- package/README.md +11 -5
- package/contracts/AccessManager.sol +3 -13
- package/contracts/EToken.sol +29 -95
- package/contracts/LPManualWhitelist.sol +11 -26
- package/contracts/LiquidityThresholdAssetManager.sol +10 -21
- package/contracts/Policy.sol +6 -17
- package/contracts/PolicyPool.sol +39 -91
- package/contracts/PolicyPoolComponent.sol +9 -32
- package/contracts/PremiumsAccount.sol +16 -47
- package/contracts/Reserve.sol +10 -16
- package/contracts/RiskModule.sol +22 -80
- package/contracts/SignedBucketRiskModule.sol +18 -80
- package/contracts/SignedQuoteRiskModule.sol +13 -44
- package/contracts/TieredSignedQuoteRiskModule.sol +7 -13
- package/contracts/TimeScaled.sol +8 -39
- package/contracts/TrustfulRiskModule.sol +13 -48
- package/contracts/interfaces/IAccessManager.sol +2 -11
- package/contracts/interfaces/IEToken.sol +1 -5
- package/contracts/interfaces/ILPWhitelist.sol +2 -10
- package/contracts/interfaces/IPolicyHolder.sol +2 -11
- package/contracts/interfaces/IPremiumsAccount.sol +1 -5
- package/contracts/migration/LPManualWhitelistV20.sol +3 -15
- package/contracts/migration/LPManualWhitelistV20Upgraded.sol +1 -5
- package/contracts/mocks/FixedRateVault.sol +1 -6
- package/contracts/mocks/PolicyHolderMock.sol +73 -29
- package/contracts/mocks/PolicyPoolComponentMock.sol +1 -3
- package/contracts/mocks/PolicyPoolMock.sol +8 -28
- package/contracts/mocks/RiskModuleMock.sol +3 -16
- package/contracts/mocks/TestNFT.sol +1 -1
- package/js/constants.js +8 -2
- package/js/deploy.js +65 -62
- package/js/enums.js +26 -8
- package/js/test-utils.js +105 -23
- package/js/utils.js +78 -28
- package/package.json +1 -1
- package/scripts/utils.sh +23 -12
- package/build/contracts/AccessManager.sol/AccessManager.json +0 -618
- package/build/contracts/ERC4626AssetManager.sol/ERC4626AssetManager.json +0 -238
- package/build/contracts/EToken.sol/EToken.json +0 -1277
- package/build/contracts/LPManualWhitelist.sol/LPManualWhitelist.json +0 -647
- package/build/contracts/LiquidityThresholdAssetManager.sol/LiquidityThresholdAssetManager.json +0 -222
- package/build/contracts/Policy.sol/Policy.json +0 -10
- package/build/contracts/PolicyPool.sol/PolicyPool.json +0 -1416
- package/build/contracts/PolicyPoolComponent.sol/PolicyPoolComponent.json +0 -332
- package/build/contracts/PremiumsAccount.sol/PremiumsAccount.json +0 -970
- package/build/contracts/Reserve.sol/Reserve.json +0 -403
- package/build/contracts/RiskModule.sol/RiskModule.json +0 -559
- package/build/contracts/SignedBucketRiskModule.sol/SignedBucketRiskModule.json +0 -1262
- package/build/contracts/SignedQuoteRiskModule.sol/SignedQuoteRiskModule.json +0 -1110
- package/build/contracts/TieredSignedQuoteRiskModule.sol/TieredSignedQuoteRiskModule.json +0 -1316
- package/build/contracts/TimeScaled.sol/TimeScaled.json +0 -10
- package/build/contracts/TrustfulRiskModule.sol/TrustfulRiskModule.json +0 -984
- package/build/contracts/dependencies/ERC1967Proxy.sol/ERC1967Proxy.json +0 -64
- package/build/contracts/dependencies/IERC20Metadata.sol/IERC20Metadata.json +0 -233
- package/build/contracts/dependencies/WadRayMath.sol/WadRayMath.json +0 -10
- package/build/contracts/interfaces/IAccessManager.sol/IAccessManager.json +0 -343
- package/build/contracts/interfaces/IAssetManager.sol/IAssetManager.json +0 -128
- package/build/contracts/interfaces/IEToken.sol/IEToken.json +0 -460
- package/build/contracts/interfaces/ILPWhitelist.sol/ILPWhitelist.json +0 -103
- package/build/contracts/interfaces/IPolicyHolder.sol/IPolicyHolder.json +0 -108
- package/build/contracts/interfaces/IPolicyPool.sol/IPolicyPool.json +0 -501
- package/build/contracts/interfaces/IPolicyPoolComponent.sol/IPolicyPoolComponent.json +0 -43
- package/build/contracts/interfaces/IPremiumsAccount.sol/IPremiumsAccount.json +0 -315
- package/build/contracts/interfaces/IRiskModule.sol/IRiskModule.json +0 -165
- package/build/contracts/migration/LPManualWhitelistV20.sol/LPManualWhitelistV20.json +0 -481
- package/build/contracts/migration/LPManualWhitelistV20Upgraded.sol/LPManualWhitelistV20Upgraded.json +0 -492
- package/build/contracts/mocks/FixedRateVault.sol/FixedRateVault.json +0 -736
- package/build/contracts/mocks/ForwardProxy.sol/ForwardProxy.json +0 -43
- package/build/contracts/mocks/IMintableERC20.sol/IMintableERC20.json +0 -47
- package/build/contracts/mocks/InterfaceIdCalculator.sol/InterfaceIdCalculator.json +0 -180
- package/build/contracts/mocks/PolicyHolderMock.sol/PolicyHolderMock.json +0 -228
- package/build/contracts/mocks/PolicyPoolComponentMock.sol/PolicyPoolComponentMock.json +0 -54
- package/build/contracts/mocks/PolicyPoolMock.sol/PolicyPoolMock.json +0 -721
- package/build/contracts/mocks/PolicyPoolMock.sol/PolicyPoolMockForward.json +0 -92
- package/build/contracts/mocks/RiskModuleMock.sol/RiskModuleMock.json +0 -783
- package/build/contracts/mocks/TestCurrency.sol/TestCurrency.json +0 -343
- package/build/contracts/mocks/TestNFT.sol/TestNFT.json +0 -388
- package/contracts/dependencies/ERC1967Proxy.sol +0 -19
- package/contracts/dependencies/IERC20Metadata.sol +0 -19
package/build/contracts/LiquidityThresholdAssetManager.sol/LiquidityThresholdAssetManager.json
DELETED
|
@@ -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
|
-
}
|