@ensuro/core 1.2.7 → 2.0.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 +44 -17
- package/build/contracts/EToken.sol/EToken.json +122 -177
- package/build/contracts/FlightDelayRiskModule.sol/FlightDelayRiskModule.json +101 -323
- package/build/contracts/LPManualWhitelist.sol/LPManualWhitelist.json +15 -2
- package/build/contracts/Policy.sol/Policy.json +2 -2
- package/build/contracts/PolicyNFT.sol/PolicyNFT.json +16 -3
- package/build/contracts/PolicyPool.sol/PolicyPool.json +105 -351
- package/build/contracts/PolicyPoolComponent.sol/PolicyPoolComponent.json +13 -0
- package/build/contracts/PolicyPoolConfig.sol/PolicyPoolConfig.json +77 -72
- package/build/contracts/PremiumsAccount.sol/PremiumsAccount.json +761 -0
- package/build/contracts/{BaseAssetManager.sol/BaseAssetManager.json → Reserve.sol/Reserve.json} +15 -202
- package/build/contracts/RiskModule.sol/RiskModule.json +83 -310
- package/build/contracts/TimeScaled.sol/TimeScaled.json +24 -0
- package/build/contracts/TrustfulRiskModule.sol/TrustfulRiskModule.json +131 -333
- package/build/contracts/dependencies/ChainlinkClientUpgradeable.sol/ChainlinkClientUpgradeable.json +15 -2
- package/build/contracts/dependencies/ERC1967Proxy.sol/ERC1967Proxy.json +64 -0
- package/build/{interfaces/IExchange.sol/IExchange.json → contracts/dependencies/IERC20Metadata.sol/IERC20Metadata.json} +83 -79
- package/build/{interfaces → contracts/interfaces}/IEToken.sol/IEToken.json +32 -97
- package/build/{interfaces → contracts/interfaces}/ILPWhitelist.sol/ILPWhitelist.json +1 -1
- package/build/{interfaces → contracts/interfaces}/IPolicyHolder.sol/IPolicyHolder.json +1 -1
- package/build/{interfaces → contracts/interfaces}/IPolicyNFT.sol/IPolicyNFT.json +1 -1
- package/build/{interfaces → contracts/interfaces}/IPolicyPool.sol/IPolicyPool.json +121 -108
- package/build/{interfaces → contracts/interfaces}/IPolicyPoolComponent.sol/IPolicyPoolComponent.json +1 -1
- package/build/{interfaces → contracts/interfaces}/IPolicyPoolConfig.sol/IPolicyPoolConfig.json +20 -36
- package/build/contracts/interfaces/IPremiumsAccount.sol/IPremiumsAccount.json +302 -0
- package/build/{interfaces → contracts/interfaces}/IRiskModule.sol/IRiskModule.json +58 -34
- package/build/contracts/mocks/ForwardProxy.sol/ForwardProxy.json +43 -0
- package/build/{interfaces/IInsolvencyHook.sol/IInsolvencyHook.json → contracts/mocks/IMintableERC20.sol/IMintableERC20.json} +13 -8
- package/build/contracts/mocks/LinkTokenMock.sol/LinkTokenMock.json +370 -0
- package/build/contracts/mocks/PolicyHolderMock.sol/PolicyHolderMock.json +202 -0
- package/build/contracts/mocks/PolicyPoolComponentMock.sol/PolicyPoolComponentMock.json +35 -0
- package/build/contracts/mocks/PolicyPoolMock.sol/PolicyPoolMock.json +603 -0
- package/build/contracts/mocks/PolicyPoolMock.sol/PolicyPoolMockForward.json +92 -0
- package/build/contracts/mocks/TestCurrency.sol/TestCurrency.json +343 -0
- package/build/contracts/mocks/TestCurrencyUUPS.sol/TestCurrencyUUPS.json +353 -0
- package/build/contracts/mocks/TestNFT.sol/TestNFT.json +388 -0
- package/build/contracts/upgraded/PolicyNFTv1.sol/PolicyNFTv1.json +16 -3
- package/build/contracts/upgraded/PolicyNFTv1.sol/PolicyNFTv1_Upgrade.json +16 -3
- package/contracts/EToken.sol +188 -269
- package/contracts/FlightDelayRiskModule.sol +30 -21
- package/contracts/LPManualWhitelist.sol +3 -3
- package/contracts/Policy.sol +48 -44
- package/contracts/PolicyNFT.sol +2 -2
- package/contracts/PolicyPool.sol +114 -467
- package/contracts/PolicyPoolComponent.sol +8 -3
- package/contracts/PolicyPoolConfig.sol +30 -73
- package/contracts/PremiumsAccount.sol +274 -0
- package/contracts/Reserve.sol +34 -0
- package/contracts/RiskModule.sol +216 -164
- package/contracts/TimeScaled.sol +134 -0
- package/contracts/TrustfulRiskModule.sol +23 -21
- package/contracts/dependencies/ERC1967Proxy.sol +19 -0
- package/contracts/dependencies/IERC20Metadata.sol +19 -0
- package/contracts/interfaces/IEToken.sol +172 -0
- package/{interfaces → contracts/interfaces}/ILPWhitelist.sol +0 -0
- package/{interfaces → contracts/interfaces}/IPolicyHolder.sol +0 -0
- package/{interfaces → contracts/interfaces}/IPolicyNFT.sol +0 -0
- package/contracts/interfaces/IPolicyPool.sol +138 -0
- package/{interfaces → contracts/interfaces}/IPolicyPoolComponent.sol +0 -0
- package/{interfaces → contracts/interfaces}/IPolicyPoolConfig.sol +29 -20
- package/contracts/interfaces/IPremiumsAccount.sol +71 -0
- package/contracts/interfaces/IRiskModule.sol +60 -0
- package/contracts/mocks/ForwardProxy.sol +66 -0
- package/contracts/mocks/IMintableERC20.sol +13 -0
- package/contracts/mocks/LinkTokenMock.sol +30 -0
- package/contracts/mocks/PolicyHolderMock.sol +68 -0
- package/contracts/mocks/PolicyPoolComponentMock.sol +17 -0
- package/contracts/mocks/PolicyPoolMock.sol +122 -0
- package/contracts/mocks/TestCurrency.sol +35 -0
- package/contracts/mocks/TestNFT.sol +23 -0
- package/contracts/upgraded/PolicyNFTv1.sol +1 -1
- package/js/test-utils.js +278 -0
- package/package.json +2 -2
- package/build/contracts/AaveAssetManager.sol/AaveAssetManager.json +0 -742
- package/build/contracts/DataTypes.sol/DataTypes.json +0 -10
- package/build/contracts/Exchange.sol/Exchange.json +0 -591
- package/build/contracts/extras/IPriceRiskModule.sol/IPriceRiskModule.json +0 -253
- package/build/contracts/extras/PriceRiskModule.sol/PriceRiskModule.json +0 -1055
- package/build/interfaces/IAssetManager.sol/IAssetManager.json +0 -31
- package/build/interfaces/IExchange.sol/IPriceOracle.json +0 -30
- package/contracts/AaveAssetManager.sol +0 -298
- package/contracts/BaseAssetManager.sol +0 -301
- package/contracts/DataTypes.sol +0 -287
- package/contracts/Exchange.sol +0 -189
- package/contracts/extras/IPriceRiskModule.sol +0 -41
- package/contracts/extras/PriceRiskModule.sol +0 -243
- package/interfaces/IAssetManager.sol +0 -23
- package/interfaces/IEToken.sol +0 -48
- package/interfaces/IExchange.sol +0 -59
- package/interfaces/IInsolvencyHook.sol +0 -27
- package/interfaces/IPolicyPool.sol +0 -44
- package/interfaces/IRiskModule.sol +0 -29
package/build/contracts/dependencies/ChainlinkClientUpgradeable.sol/ChainlinkClientUpgradeable.json
CHANGED
|
@@ -41,10 +41,23 @@
|
|
|
41
41
|
],
|
|
42
42
|
"name": "ChainlinkRequested",
|
|
43
43
|
"type": "event"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"anonymous": false,
|
|
47
|
+
"inputs": [
|
|
48
|
+
{
|
|
49
|
+
"indexed": false,
|
|
50
|
+
"internalType": "uint8",
|
|
51
|
+
"name": "version",
|
|
52
|
+
"type": "uint8"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"name": "Initialized",
|
|
56
|
+
"type": "event"
|
|
44
57
|
}
|
|
45
58
|
],
|
|
46
|
-
"bytecode": "
|
|
47
|
-
"deployedBytecode": "
|
|
59
|
+
"bytecode": "0x6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea2646970667358221220c41ba3f0c5e9a27cd6de6a0aaf3d2d1497b96ee9a464b52244b7fc2aeec4224c64736f6c63430008060033",
|
|
60
|
+
"deployedBytecode": "0x6080604052600080fdfea2646970667358221220c41ba3f0c5e9a27cd6de6a0aaf3d2d1497b96ee9a464b52244b7fc2aeec4224c64736f6c63430008060033",
|
|
48
61
|
"linkReferences": {},
|
|
49
62
|
"deployedLinkReferences": {}
|
|
50
63
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "ERC1967Proxy",
|
|
4
|
+
"sourceName": "contracts/dependencies/ERC1967Proxy.sol",
|
|
5
|
+
"abi": [
|
|
6
|
+
{
|
|
7
|
+
"anonymous": false,
|
|
8
|
+
"inputs": [
|
|
9
|
+
{
|
|
10
|
+
"indexed": false,
|
|
11
|
+
"internalType": "address",
|
|
12
|
+
"name": "previousAdmin",
|
|
13
|
+
"type": "address"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"indexed": false,
|
|
17
|
+
"internalType": "address",
|
|
18
|
+
"name": "newAdmin",
|
|
19
|
+
"type": "address"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"name": "AdminChanged",
|
|
23
|
+
"type": "event"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"anonymous": false,
|
|
27
|
+
"inputs": [
|
|
28
|
+
{
|
|
29
|
+
"indexed": true,
|
|
30
|
+
"internalType": "address",
|
|
31
|
+
"name": "beacon",
|
|
32
|
+
"type": "address"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"name": "BeaconUpgraded",
|
|
36
|
+
"type": "event"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"anonymous": false,
|
|
40
|
+
"inputs": [
|
|
41
|
+
{
|
|
42
|
+
"indexed": true,
|
|
43
|
+
"internalType": "address",
|
|
44
|
+
"name": "implementation",
|
|
45
|
+
"type": "address"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"name": "Upgraded",
|
|
49
|
+
"type": "event"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"stateMutability": "payable",
|
|
53
|
+
"type": "fallback"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"stateMutability": "payable",
|
|
57
|
+
"type": "receive"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"bytecode": "0x",
|
|
61
|
+
"deployedBytecode": "0x",
|
|
62
|
+
"linkReferences": {},
|
|
63
|
+
"deployedLinkReferences": {}
|
|
64
|
+
}
|
|
@@ -1,66 +1,72 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_format": "hh-sol-artifact-1",
|
|
3
|
-
"contractName": "
|
|
4
|
-
"sourceName": "
|
|
3
|
+
"contractName": "IERC20Metadata",
|
|
4
|
+
"sourceName": "contracts/dependencies/IERC20Metadata.sol",
|
|
5
5
|
"abi": [
|
|
6
6
|
{
|
|
7
|
+
"anonymous": false,
|
|
7
8
|
"inputs": [
|
|
8
9
|
{
|
|
10
|
+
"indexed": true,
|
|
9
11
|
"internalType": "address",
|
|
10
|
-
"name": "
|
|
12
|
+
"name": "owner",
|
|
11
13
|
"type": "address"
|
|
12
14
|
},
|
|
13
15
|
{
|
|
16
|
+
"indexed": true,
|
|
14
17
|
"internalType": "address",
|
|
15
|
-
"name": "
|
|
18
|
+
"name": "spender",
|
|
16
19
|
"type": "address"
|
|
17
20
|
},
|
|
18
21
|
{
|
|
22
|
+
"indexed": false,
|
|
19
23
|
"internalType": "uint256",
|
|
20
|
-
"name": "
|
|
24
|
+
"name": "value",
|
|
21
25
|
"type": "uint256"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"name": "Approval",
|
|
29
|
+
"type": "event"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"anonymous": false,
|
|
33
|
+
"inputs": [
|
|
34
|
+
{
|
|
35
|
+
"indexed": true,
|
|
36
|
+
"internalType": "address",
|
|
37
|
+
"name": "from",
|
|
38
|
+
"type": "address"
|
|
22
39
|
},
|
|
23
40
|
{
|
|
41
|
+
"indexed": true,
|
|
24
42
|
"internalType": "address",
|
|
25
|
-
"name": "
|
|
43
|
+
"name": "to",
|
|
26
44
|
"type": "address"
|
|
27
45
|
},
|
|
28
46
|
{
|
|
47
|
+
"indexed": false,
|
|
29
48
|
"internalType": "uint256",
|
|
30
|
-
"name": "
|
|
49
|
+
"name": "value",
|
|
31
50
|
"type": "uint256"
|
|
32
51
|
}
|
|
33
52
|
],
|
|
34
|
-
"name": "
|
|
35
|
-
"
|
|
36
|
-
{
|
|
37
|
-
"internalType": "bytes",
|
|
38
|
-
"name": "",
|
|
39
|
-
"type": "bytes"
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
"stateMutability": "view",
|
|
43
|
-
"type": "function"
|
|
53
|
+
"name": "Transfer",
|
|
54
|
+
"type": "event"
|
|
44
55
|
},
|
|
45
56
|
{
|
|
46
57
|
"inputs": [
|
|
47
58
|
{
|
|
48
59
|
"internalType": "address",
|
|
49
|
-
"name": "
|
|
60
|
+
"name": "owner",
|
|
50
61
|
"type": "address"
|
|
51
62
|
},
|
|
52
63
|
{
|
|
53
64
|
"internalType": "address",
|
|
54
|
-
"name": "
|
|
65
|
+
"name": "spender",
|
|
55
66
|
"type": "address"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"internalType": "uint256",
|
|
59
|
-
"name": "amount",
|
|
60
|
-
"type": "uint256"
|
|
61
67
|
}
|
|
62
68
|
],
|
|
63
|
-
"name": "
|
|
69
|
+
"name": "allowance",
|
|
64
70
|
"outputs": [
|
|
65
71
|
{
|
|
66
72
|
"internalType": "uint256",
|
|
@@ -74,41 +80,36 @@
|
|
|
74
80
|
{
|
|
75
81
|
"inputs": [
|
|
76
82
|
{
|
|
77
|
-
"internalType": "
|
|
78
|
-
"name": "
|
|
79
|
-
"type": "
|
|
83
|
+
"internalType": "address",
|
|
84
|
+
"name": "spender",
|
|
85
|
+
"type": "address"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"internalType": "uint256",
|
|
89
|
+
"name": "amount",
|
|
90
|
+
"type": "uint256"
|
|
80
91
|
}
|
|
81
92
|
],
|
|
82
|
-
"name": "
|
|
93
|
+
"name": "approve",
|
|
83
94
|
"outputs": [
|
|
84
95
|
{
|
|
85
|
-
"internalType": "
|
|
96
|
+
"internalType": "bool",
|
|
86
97
|
"name": "",
|
|
87
|
-
"type": "
|
|
98
|
+
"type": "bool"
|
|
88
99
|
}
|
|
89
100
|
],
|
|
90
|
-
"stateMutability": "
|
|
101
|
+
"stateMutability": "nonpayable",
|
|
91
102
|
"type": "function"
|
|
92
103
|
},
|
|
93
104
|
{
|
|
94
105
|
"inputs": [
|
|
95
106
|
{
|
|
96
107
|
"internalType": "address",
|
|
97
|
-
"name": "
|
|
98
|
-
"type": "address"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"internalType": "address",
|
|
102
|
-
"name": "assetOut",
|
|
108
|
+
"name": "account",
|
|
103
109
|
"type": "address"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"internalType": "uint256",
|
|
107
|
-
"name": "amountOut",
|
|
108
|
-
"type": "uint256"
|
|
109
110
|
}
|
|
110
111
|
],
|
|
111
|
-
"name": "
|
|
112
|
+
"name": "balanceOf",
|
|
112
113
|
"outputs": [
|
|
113
114
|
{
|
|
114
115
|
"internalType": "uint256",
|
|
@@ -120,24 +121,13 @@
|
|
|
120
121
|
"type": "function"
|
|
121
122
|
},
|
|
122
123
|
{
|
|
123
|
-
"inputs": [
|
|
124
|
-
|
|
125
|
-
"internalType": "address",
|
|
126
|
-
"name": "asset",
|
|
127
|
-
"type": "address"
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"internalType": "address",
|
|
131
|
-
"name": "expressedInAsset",
|
|
132
|
-
"type": "address"
|
|
133
|
-
}
|
|
134
|
-
],
|
|
135
|
-
"name": "getExchangeRate",
|
|
124
|
+
"inputs": [],
|
|
125
|
+
"name": "decimals",
|
|
136
126
|
"outputs": [
|
|
137
127
|
{
|
|
138
|
-
"internalType": "
|
|
128
|
+
"internalType": "uint8",
|
|
139
129
|
"name": "",
|
|
140
|
-
"type": "
|
|
130
|
+
"type": "uint8"
|
|
141
131
|
}
|
|
142
132
|
],
|
|
143
133
|
"stateMutability": "view",
|
|
@@ -145,12 +135,12 @@
|
|
|
145
135
|
},
|
|
146
136
|
{
|
|
147
137
|
"inputs": [],
|
|
148
|
-
"name": "
|
|
138
|
+
"name": "name",
|
|
149
139
|
"outputs": [
|
|
150
140
|
{
|
|
151
|
-
"internalType": "
|
|
141
|
+
"internalType": "string",
|
|
152
142
|
"name": "",
|
|
153
|
-
"type": "
|
|
143
|
+
"type": "string"
|
|
154
144
|
}
|
|
155
145
|
],
|
|
156
146
|
"stateMutability": "view",
|
|
@@ -158,12 +148,12 @@
|
|
|
158
148
|
},
|
|
159
149
|
{
|
|
160
150
|
"inputs": [],
|
|
161
|
-
"name": "
|
|
151
|
+
"name": "symbol",
|
|
162
152
|
"outputs": [
|
|
163
153
|
{
|
|
164
|
-
"internalType": "
|
|
154
|
+
"internalType": "string",
|
|
165
155
|
"name": "",
|
|
166
|
-
"type": "
|
|
156
|
+
"type": "string"
|
|
167
157
|
}
|
|
168
158
|
],
|
|
169
159
|
"stateMutability": "view",
|
|
@@ -171,7 +161,7 @@
|
|
|
171
161
|
},
|
|
172
162
|
{
|
|
173
163
|
"inputs": [],
|
|
174
|
-
"name": "
|
|
164
|
+
"name": "totalSupply",
|
|
175
165
|
"outputs": [
|
|
176
166
|
{
|
|
177
167
|
"internalType": "uint256",
|
|
@@ -186,39 +176,53 @@
|
|
|
186
176
|
"inputs": [
|
|
187
177
|
{
|
|
188
178
|
"internalType": "address",
|
|
189
|
-
"name": "
|
|
190
|
-
"type": "address"
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
"internalType": "address",
|
|
194
|
-
"name": "assetOut",
|
|
179
|
+
"name": "to",
|
|
195
180
|
"type": "address"
|
|
196
181
|
},
|
|
197
182
|
{
|
|
198
183
|
"internalType": "uint256",
|
|
199
|
-
"name": "
|
|
184
|
+
"name": "amount",
|
|
200
185
|
"type": "uint256"
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"name": "transfer",
|
|
189
|
+
"outputs": [
|
|
190
|
+
{
|
|
191
|
+
"internalType": "bool",
|
|
192
|
+
"name": "",
|
|
193
|
+
"type": "bool"
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
"stateMutability": "nonpayable",
|
|
197
|
+
"type": "function"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"inputs": [
|
|
201
|
+
{
|
|
202
|
+
"internalType": "address",
|
|
203
|
+
"name": "from",
|
|
204
|
+
"type": "address"
|
|
201
205
|
},
|
|
202
206
|
{
|
|
203
207
|
"internalType": "address",
|
|
204
|
-
"name": "
|
|
208
|
+
"name": "to",
|
|
205
209
|
"type": "address"
|
|
206
210
|
},
|
|
207
211
|
{
|
|
208
212
|
"internalType": "uint256",
|
|
209
|
-
"name": "
|
|
213
|
+
"name": "amount",
|
|
210
214
|
"type": "uint256"
|
|
211
215
|
}
|
|
212
216
|
],
|
|
213
|
-
"name": "
|
|
217
|
+
"name": "transferFrom",
|
|
214
218
|
"outputs": [
|
|
215
219
|
{
|
|
216
|
-
"internalType": "
|
|
220
|
+
"internalType": "bool",
|
|
217
221
|
"name": "",
|
|
218
|
-
"type": "
|
|
222
|
+
"type": "bool"
|
|
219
223
|
}
|
|
220
224
|
],
|
|
221
|
-
"stateMutability": "
|
|
225
|
+
"stateMutability": "nonpayable",
|
|
222
226
|
"type": "function"
|
|
223
227
|
}
|
|
224
228
|
],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_format": "hh-sol-artifact-1",
|
|
3
3
|
"contractName": "IEToken",
|
|
4
|
-
"sourceName": "interfaces/IEToken.sol",
|
|
4
|
+
"sourceName": "contracts/interfaces/IEToken.sol",
|
|
5
5
|
"abi": [
|
|
6
6
|
{
|
|
7
7
|
"anonymous": false,
|
|
@@ -95,24 +95,13 @@
|
|
|
95
95
|
"inputs": [
|
|
96
96
|
{
|
|
97
97
|
"internalType": "address",
|
|
98
|
-
"name": "
|
|
98
|
+
"name": "borrower",
|
|
99
99
|
"type": "address"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"internalType": "uint40",
|
|
103
|
-
"name": "policyExpiration",
|
|
104
|
-
"type": "uint40"
|
|
105
100
|
}
|
|
106
101
|
],
|
|
107
|
-
"name": "
|
|
108
|
-
"outputs": [
|
|
109
|
-
|
|
110
|
-
"internalType": "bool",
|
|
111
|
-
"name": "",
|
|
112
|
-
"type": "bool"
|
|
113
|
-
}
|
|
114
|
-
],
|
|
115
|
-
"stateMutability": "view",
|
|
102
|
+
"name": "addBorrower",
|
|
103
|
+
"outputs": [],
|
|
104
|
+
"stateMutability": "nonpayable",
|
|
116
105
|
"type": "function"
|
|
117
106
|
},
|
|
118
107
|
{
|
|
@@ -163,24 +152,6 @@
|
|
|
163
152
|
"stateMutability": "nonpayable",
|
|
164
153
|
"type": "function"
|
|
165
154
|
},
|
|
166
|
-
{
|
|
167
|
-
"inputs": [
|
|
168
|
-
{
|
|
169
|
-
"internalType": "uint256",
|
|
170
|
-
"name": "amount",
|
|
171
|
-
"type": "uint256"
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"internalType": "bool",
|
|
175
|
-
"name": "positive",
|
|
176
|
-
"type": "bool"
|
|
177
|
-
}
|
|
178
|
-
],
|
|
179
|
-
"name": "assetEarnings",
|
|
180
|
-
"outputs": [],
|
|
181
|
-
"stateMutability": "nonpayable",
|
|
182
|
-
"type": "function"
|
|
183
|
-
},
|
|
184
155
|
{
|
|
185
156
|
"inputs": [
|
|
186
157
|
{
|
|
@@ -227,37 +198,12 @@
|
|
|
227
198
|
{
|
|
228
199
|
"inputs": [
|
|
229
200
|
{
|
|
230
|
-
"internalType": "
|
|
231
|
-
"name": "
|
|
232
|
-
"type": "
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
"internalType": "bool",
|
|
236
|
-
"name": "positive",
|
|
237
|
-
"type": "bool"
|
|
238
|
-
}
|
|
239
|
-
],
|
|
240
|
-
"name": "discreteEarning",
|
|
241
|
-
"outputs": [],
|
|
242
|
-
"stateMutability": "nonpayable",
|
|
243
|
-
"type": "function"
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
"inputs": [],
|
|
247
|
-
"name": "getInvestable",
|
|
248
|
-
"outputs": [
|
|
249
|
-
{
|
|
250
|
-
"internalType": "uint256",
|
|
251
|
-
"name": "",
|
|
252
|
-
"type": "uint256"
|
|
201
|
+
"internalType": "address",
|
|
202
|
+
"name": "borrower",
|
|
203
|
+
"type": "address"
|
|
253
204
|
}
|
|
254
205
|
],
|
|
255
|
-
"
|
|
256
|
-
"type": "function"
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
"inputs": [],
|
|
260
|
-
"name": "getPoolLoan",
|
|
206
|
+
"name": "getLoan",
|
|
261
207
|
"outputs": [
|
|
262
208
|
{
|
|
263
209
|
"internalType": "uint256",
|
|
@@ -275,13 +221,18 @@
|
|
|
275
221
|
"name": "amount",
|
|
276
222
|
"type": "uint256"
|
|
277
223
|
},
|
|
224
|
+
{
|
|
225
|
+
"internalType": "address",
|
|
226
|
+
"name": "receiver",
|
|
227
|
+
"type": "address"
|
|
228
|
+
},
|
|
278
229
|
{
|
|
279
230
|
"internalType": "bool",
|
|
280
|
-
"name": "
|
|
231
|
+
"name": "fromAvailable",
|
|
281
232
|
"type": "bool"
|
|
282
233
|
}
|
|
283
234
|
],
|
|
284
|
-
"name": "
|
|
235
|
+
"name": "internalLoan",
|
|
285
236
|
"outputs": [
|
|
286
237
|
{
|
|
287
238
|
"internalType": "uint256",
|
|
@@ -296,12 +247,12 @@
|
|
|
296
247
|
"inputs": [
|
|
297
248
|
{
|
|
298
249
|
"internalType": "uint256",
|
|
299
|
-
"name": "
|
|
250
|
+
"name": "scrAmount",
|
|
300
251
|
"type": "uint256"
|
|
301
252
|
},
|
|
302
253
|
{
|
|
303
254
|
"internalType": "uint256",
|
|
304
|
-
"name": "
|
|
255
|
+
"name": "policyInterestRate",
|
|
305
256
|
"type": "uint256"
|
|
306
257
|
}
|
|
307
258
|
],
|
|
@@ -310,41 +261,20 @@
|
|
|
310
261
|
"stateMutability": "nonpayable",
|
|
311
262
|
"type": "function"
|
|
312
263
|
},
|
|
313
|
-
{
|
|
314
|
-
"inputs": [],
|
|
315
|
-
"name": "ocean",
|
|
316
|
-
"outputs": [
|
|
317
|
-
{
|
|
318
|
-
"internalType": "uint256",
|
|
319
|
-
"name": "",
|
|
320
|
-
"type": "uint256"
|
|
321
|
-
}
|
|
322
|
-
],
|
|
323
|
-
"stateMutability": "view",
|
|
324
|
-
"type": "function"
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
"inputs": [],
|
|
328
|
-
"name": "oceanForNewScr",
|
|
329
|
-
"outputs": [
|
|
330
|
-
{
|
|
331
|
-
"internalType": "uint256",
|
|
332
|
-
"name": "",
|
|
333
|
-
"type": "uint256"
|
|
334
|
-
}
|
|
335
|
-
],
|
|
336
|
-
"stateMutability": "view",
|
|
337
|
-
"type": "function"
|
|
338
|
-
},
|
|
339
264
|
{
|
|
340
265
|
"inputs": [
|
|
341
266
|
{
|
|
342
267
|
"internalType": "uint256",
|
|
343
268
|
"name": "amount",
|
|
344
269
|
"type": "uint256"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"internalType": "address",
|
|
273
|
+
"name": "onBehalfOf",
|
|
274
|
+
"type": "address"
|
|
345
275
|
}
|
|
346
276
|
],
|
|
347
|
-
"name": "
|
|
277
|
+
"name": "repayLoan",
|
|
348
278
|
"outputs": [],
|
|
349
279
|
"stateMutability": "nonpayable",
|
|
350
280
|
"type": "function"
|
|
@@ -471,13 +401,18 @@
|
|
|
471
401
|
"inputs": [
|
|
472
402
|
{
|
|
473
403
|
"internalType": "uint256",
|
|
474
|
-
"name": "
|
|
404
|
+
"name": "scrAmount",
|
|
475
405
|
"type": "uint256"
|
|
476
406
|
},
|
|
477
407
|
{
|
|
478
408
|
"internalType": "uint256",
|
|
479
|
-
"name": "
|
|
409
|
+
"name": "policyInterestRate",
|
|
480
410
|
"type": "uint256"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"internalType": "int256",
|
|
414
|
+
"name": "adjustment",
|
|
415
|
+
"type": "int256"
|
|
481
416
|
}
|
|
482
417
|
],
|
|
483
418
|
"name": "unlockScr",
|
|
@@ -502,7 +437,7 @@
|
|
|
502
437
|
"outputs": [
|
|
503
438
|
{
|
|
504
439
|
"internalType": "uint256",
|
|
505
|
-
"name": "",
|
|
440
|
+
"name": "withdrawn",
|
|
506
441
|
"type": "uint256"
|
|
507
442
|
}
|
|
508
443
|
],
|