@venusprotocol/liquidity-hub 2.1.0-dev.4 → 2.1.0-dev.6

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 (40) hide show
  1. package/README.md +111 -30
  2. package/contracts/Hub/Hub.sol +71 -63
  3. package/contracts/adapters/AdapterCentrifuge.sol +5 -0
  4. package/contracts/adapters/AdapterCoreV1.sol +6 -0
  5. package/contracts/adapters/AdapterFRV.sol +27 -7
  6. package/contracts/adapters/AdapterFlux.sol +6 -0
  7. package/contracts/adapters/AdapterSpokeV1.sol +428 -0
  8. package/contracts/interfaces/IHub.sol +6 -0
  9. package/contracts/interfaces/IHubLens.sol +71 -0
  10. package/contracts/interfaces/IResourceAdapter.sol +23 -7
  11. package/contracts/interfaces/IYieldGroupBase.sol +6 -1
  12. package/contracts/interfaces/external/ISpokeComptroller.sol +69 -0
  13. package/contracts/interfaces/external/IVTokenIsolated.sol +153 -0
  14. package/contracts/lens/HubCapacityMath.sol +610 -0
  15. package/contracts/lens/HubLens.sol +311 -0
  16. package/deployments/bscmainnet/AdapterCentrifuge.json +21 -2
  17. package/deployments/bscmainnet/AdapterCoreV1.json +21 -2
  18. package/deployments/bscmainnet/AdapterFRV.json +21 -2
  19. package/deployments/bscmainnet/AdapterFlux.json +21 -2
  20. package/deployments/bscmainnet/AdapterSpokeV1.json +339 -0
  21. package/deployments/bscmainnet/HubImpl.json +16 -3
  22. package/deployments/bscmainnet/HubLens.json +89 -0
  23. package/deployments/bscmainnet/SpokeBeacon.json +110 -0
  24. package/deployments/bscmainnet/SpokeSource_U.json +1083 -0
  25. package/deployments/bscmainnet/SpokeSource_USDC.json +1083 -0
  26. package/deployments/bscmainnet/SpokeSource_USDT.json +1083 -0
  27. package/deployments/bscmainnet/YieldGroupSpokeImpl.json +1083 -0
  28. package/deployments/bscmainnet_addresses.json +13 -6
  29. package/deployments/bsctestnet/AdapterCentrifuge.json +21 -2
  30. package/deployments/bsctestnet/AdapterCoreV1.json +21 -2
  31. package/deployments/bsctestnet/AdapterFRV.json +21 -2
  32. package/deployments/bsctestnet/AdapterFlux.json +21 -2
  33. package/deployments/bsctestnet/AdapterSpokeV1.json +339 -0
  34. package/deployments/bsctestnet/HubImpl.json +16 -3
  35. package/deployments/bsctestnet/HubLens.json +89 -0
  36. package/deployments/bsctestnet/SpokeBeacon.json +110 -0
  37. package/deployments/bsctestnet/SpokeSource_USDT.json +1083 -0
  38. package/deployments/bsctestnet/YieldGroupSpokeImpl.json +1083 -0
  39. package/deployments/bsctestnet_addresses.json +11 -6
  40. package/package.json +1 -1
@@ -0,0 +1,339 @@
1
+ {
2
+ "address": "0x231915FfE3e3A6Be09B0E5c73EFA2F1a4FF8Aa69",
3
+ "block": 127748551,
4
+ "chainId": 56,
5
+ "contract": "AdapterSpokeV1",
6
+ "abi": [
7
+ {
8
+ "type": "constructor",
9
+ "inputs": [],
10
+ "stateMutability": "nonpayable"
11
+ },
12
+ {
13
+ "type": "function",
14
+ "name": "EXP_SCALE",
15
+ "inputs": [],
16
+ "outputs": [
17
+ {
18
+ "name": "",
19
+ "type": "uint256",
20
+ "internalType": "uint256"
21
+ }
22
+ ],
23
+ "stateMutability": "view"
24
+ },
25
+ {
26
+ "type": "function",
27
+ "name": "UNCAPPED_DEPOSIT_ROOM",
28
+ "inputs": [],
29
+ "outputs": [
30
+ {
31
+ "name": "",
32
+ "type": "uint256",
33
+ "internalType": "uint256"
34
+ }
35
+ ],
36
+ "stateMutability": "view"
37
+ },
38
+ {
39
+ "type": "function",
40
+ "name": "accrue",
41
+ "inputs": [
42
+ {
43
+ "name": "resource",
44
+ "type": "address",
45
+ "internalType": "address"
46
+ }
47
+ ],
48
+ "outputs": [],
49
+ "stateMutability": "nonpayable"
50
+ },
51
+ {
52
+ "type": "function",
53
+ "name": "asset",
54
+ "inputs": [
55
+ {
56
+ "name": "resource",
57
+ "type": "address",
58
+ "internalType": "address"
59
+ }
60
+ ],
61
+ "outputs": [
62
+ {
63
+ "name": "",
64
+ "type": "address",
65
+ "internalType": "address"
66
+ }
67
+ ],
68
+ "stateMutability": "view"
69
+ },
70
+ {
71
+ "type": "function",
72
+ "name": "deposit",
73
+ "inputs": [
74
+ {
75
+ "name": "resource",
76
+ "type": "address",
77
+ "internalType": "address"
78
+ },
79
+ {
80
+ "name": "amount",
81
+ "type": "uint256",
82
+ "internalType": "uint256"
83
+ }
84
+ ],
85
+ "outputs": [
86
+ {
87
+ "name": "deposited",
88
+ "type": "uint256",
89
+ "internalType": "uint256"
90
+ }
91
+ ],
92
+ "stateMutability": "nonpayable"
93
+ },
94
+ {
95
+ "type": "function",
96
+ "name": "maxDeposit",
97
+ "inputs": [
98
+ {
99
+ "name": "resource",
100
+ "type": "address",
101
+ "internalType": "address"
102
+ }
103
+ ],
104
+ "outputs": [
105
+ {
106
+ "name": "",
107
+ "type": "uint256",
108
+ "internalType": "uint256"
109
+ }
110
+ ],
111
+ "stateMutability": "view"
112
+ },
113
+ {
114
+ "type": "function",
115
+ "name": "maxWithdraw",
116
+ "inputs": [
117
+ {
118
+ "name": "resource",
119
+ "type": "address",
120
+ "internalType": "address"
121
+ },
122
+ {
123
+ "name": "holder",
124
+ "type": "address",
125
+ "internalType": "address"
126
+ }
127
+ ],
128
+ "outputs": [
129
+ {
130
+ "name": "",
131
+ "type": "uint256",
132
+ "internalType": "uint256"
133
+ }
134
+ ],
135
+ "stateMutability": "view"
136
+ },
137
+ {
138
+ "type": "function",
139
+ "name": "receiptBalance",
140
+ "inputs": [
141
+ {
142
+ "name": "resource",
143
+ "type": "address",
144
+ "internalType": "address"
145
+ },
146
+ {
147
+ "name": "holder",
148
+ "type": "address",
149
+ "internalType": "address"
150
+ }
151
+ ],
152
+ "outputs": [
153
+ {
154
+ "name": "",
155
+ "type": "uint256",
156
+ "internalType": "uint256"
157
+ }
158
+ ],
159
+ "stateMutability": "view"
160
+ },
161
+ {
162
+ "type": "function",
163
+ "name": "resourceName",
164
+ "inputs": [
165
+ {
166
+ "name": "resource",
167
+ "type": "address",
168
+ "internalType": "address"
169
+ }
170
+ ],
171
+ "outputs": [
172
+ {
173
+ "name": "",
174
+ "type": "string",
175
+ "internalType": "string"
176
+ }
177
+ ],
178
+ "stateMutability": "view"
179
+ },
180
+ {
181
+ "type": "function",
182
+ "name": "spotAPYBps",
183
+ "inputs": [
184
+ {
185
+ "name": "resource",
186
+ "type": "address",
187
+ "internalType": "address"
188
+ },
189
+ {
190
+ "name": "",
191
+ "type": "uint256",
192
+ "internalType": "uint256"
193
+ }
194
+ ],
195
+ "outputs": [
196
+ {
197
+ "name": "",
198
+ "type": "uint64",
199
+ "internalType": "uint64"
200
+ }
201
+ ],
202
+ "stateMutability": "view"
203
+ },
204
+ {
205
+ "type": "function",
206
+ "name": "totalAssets",
207
+ "inputs": [
208
+ {
209
+ "name": "resource",
210
+ "type": "address",
211
+ "internalType": "address"
212
+ },
213
+ {
214
+ "name": "holder",
215
+ "type": "address",
216
+ "internalType": "address"
217
+ }
218
+ ],
219
+ "outputs": [
220
+ {
221
+ "name": "",
222
+ "type": "uint256",
223
+ "internalType": "uint256"
224
+ }
225
+ ],
226
+ "stateMutability": "view"
227
+ },
228
+ {
229
+ "type": "function",
230
+ "name": "validateRegistration",
231
+ "inputs": [
232
+ {
233
+ "name": "resource",
234
+ "type": "address",
235
+ "internalType": "address"
236
+ }
237
+ ],
238
+ "outputs": [],
239
+ "stateMutability": "view"
240
+ },
241
+ {
242
+ "type": "function",
243
+ "name": "withdraw",
244
+ "inputs": [
245
+ {
246
+ "name": "resource",
247
+ "type": "address",
248
+ "internalType": "address"
249
+ },
250
+ {
251
+ "name": "amount",
252
+ "type": "uint256",
253
+ "internalType": "uint256"
254
+ },
255
+ {
256
+ "name": "to",
257
+ "type": "address",
258
+ "internalType": "address"
259
+ }
260
+ ],
261
+ "outputs": [],
262
+ "stateMutability": "nonpayable"
263
+ },
264
+ {
265
+ "type": "error",
266
+ "name": "DepositBelowOneVToken",
267
+ "inputs": [
268
+ {
269
+ "name": "resource",
270
+ "type": "address",
271
+ "internalType": "address"
272
+ },
273
+ {
274
+ "name": "amount",
275
+ "type": "uint256",
276
+ "internalType": "uint256"
277
+ },
278
+ {
279
+ "name": "minimum",
280
+ "type": "uint256",
281
+ "internalType": "uint256"
282
+ }
283
+ ]
284
+ },
285
+ {
286
+ "type": "error",
287
+ "name": "MarketNotListed",
288
+ "inputs": [
289
+ {
290
+ "name": "resource",
291
+ "type": "address",
292
+ "internalType": "address"
293
+ }
294
+ ]
295
+ },
296
+ {
297
+ "type": "error",
298
+ "name": "NotDelegateCall",
299
+ "inputs": []
300
+ },
301
+ {
302
+ "type": "error",
303
+ "name": "SupplyNotAllowed",
304
+ "inputs": [
305
+ {
306
+ "name": "resource",
307
+ "type": "address",
308
+ "internalType": "address"
309
+ },
310
+ {
311
+ "name": "supplier",
312
+ "type": "address",
313
+ "internalType": "address"
314
+ }
315
+ ]
316
+ },
317
+ {
318
+ "type": "error",
319
+ "name": "VTokenUnderfilled",
320
+ "inputs": [
321
+ {
322
+ "name": "resource",
323
+ "type": "address",
324
+ "internalType": "address"
325
+ },
326
+ {
327
+ "name": "requested",
328
+ "type": "uint256",
329
+ "internalType": "uint256"
330
+ },
331
+ {
332
+ "name": "actual",
333
+ "type": "uint256",
334
+ "internalType": "uint256"
335
+ }
336
+ ]
337
+ }
338
+ ]
339
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
- "address": "0x44BCabAF2e63A7B883EDeA6A721d47b4bC081d02",
3
- "block": 112779180,
2
+ "address": "0xb94925bF8Cc70d0F00226fA1f07d895Cb5Fbef4f",
3
+ "block": 127748296,
4
4
  "chainId": 56,
5
5
  "contract": "Hub",
6
6
  "abi": [
@@ -594,7 +594,7 @@
594
594
  "name": "maxMint",
595
595
  "inputs": [
596
596
  {
597
- "name": "receiver",
597
+ "name": "",
598
598
  "type": "address",
599
599
  "internalType": "address"
600
600
  }
@@ -1832,6 +1832,19 @@
1832
1832
  ],
1833
1833
  "anonymous": false
1834
1834
  },
1835
+ {
1836
+ "type": "event",
1837
+ "name": "YieldGroupAccrualFailed",
1838
+ "inputs": [
1839
+ {
1840
+ "name": "yieldGroup",
1841
+ "type": "address",
1842
+ "indexed": true,
1843
+ "internalType": "address"
1844
+ }
1845
+ ],
1846
+ "anonymous": false
1847
+ },
1835
1848
  {
1836
1849
  "type": "event",
1837
1850
  "name": "YieldGroupAdded",
@@ -0,0 +1,89 @@
1
+ {
2
+ "address": "0xE5d8A002A794CcDba248ba774a359eF2B9E4Ba8B",
3
+ "block": 127748120,
4
+ "chainId": 56,
5
+ "contract": "HubLens",
6
+ "abi": [
7
+ {
8
+ "type": "function",
9
+ "name": "depositCapacityBreakdown",
10
+ "inputs": [
11
+ {
12
+ "name": "hub",
13
+ "type": "address",
14
+ "internalType": "address"
15
+ }
16
+ ],
17
+ "outputs": [
18
+ {
19
+ "name": "groups",
20
+ "type": "address[]",
21
+ "internalType": "address[]"
22
+ },
23
+ {
24
+ "name": "room",
25
+ "type": "uint256[]",
26
+ "internalType": "uint256[]"
27
+ }
28
+ ],
29
+ "stateMutability": "view"
30
+ },
31
+ {
32
+ "type": "function",
33
+ "name": "maxDeposit",
34
+ "inputs": [
35
+ {
36
+ "name": "hub",
37
+ "type": "address",
38
+ "internalType": "address"
39
+ }
40
+ ],
41
+ "outputs": [
42
+ {
43
+ "name": "assets",
44
+ "type": "uint256",
45
+ "internalType": "uint256"
46
+ }
47
+ ],
48
+ "stateMutability": "view"
49
+ },
50
+ {
51
+ "type": "function",
52
+ "name": "maxMint",
53
+ "inputs": [
54
+ {
55
+ "name": "hub",
56
+ "type": "address",
57
+ "internalType": "address"
58
+ }
59
+ ],
60
+ "outputs": [
61
+ {
62
+ "name": "shares",
63
+ "type": "uint256",
64
+ "internalType": "uint256"
65
+ }
66
+ ],
67
+ "stateMutability": "view"
68
+ },
69
+ {
70
+ "type": "function",
71
+ "name": "spotAPYBps",
72
+ "inputs": [
73
+ {
74
+ "name": "hub",
75
+ "type": "address",
76
+ "internalType": "address"
77
+ }
78
+ ],
79
+ "outputs": [
80
+ {
81
+ "name": "apyBps",
82
+ "type": "uint64",
83
+ "internalType": "uint64"
84
+ }
85
+ ],
86
+ "stateMutability": "view"
87
+ }
88
+ ]
89
+ }
@@ -0,0 +1,110 @@
1
+ {
2
+ "address": "0x652AAa1CD21f47a92D04680C1d9Bf99cC1Fb8975",
3
+ "block": 127748551,
4
+ "chainId": 56,
5
+ "contract": "UpgradeableBeacon",
6
+ "abi": [
7
+ {
8
+ "type": "constructor",
9
+ "inputs": [
10
+ {
11
+ "name": "implementation_",
12
+ "type": "address",
13
+ "internalType": "address"
14
+ }
15
+ ],
16
+ "stateMutability": "nonpayable"
17
+ },
18
+ {
19
+ "type": "function",
20
+ "name": "implementation",
21
+ "inputs": [],
22
+ "outputs": [
23
+ {
24
+ "name": "",
25
+ "type": "address",
26
+ "internalType": "address"
27
+ }
28
+ ],
29
+ "stateMutability": "view"
30
+ },
31
+ {
32
+ "type": "function",
33
+ "name": "owner",
34
+ "inputs": [],
35
+ "outputs": [
36
+ {
37
+ "name": "",
38
+ "type": "address",
39
+ "internalType": "address"
40
+ }
41
+ ],
42
+ "stateMutability": "view"
43
+ },
44
+ {
45
+ "type": "function",
46
+ "name": "renounceOwnership",
47
+ "inputs": [],
48
+ "outputs": [],
49
+ "stateMutability": "nonpayable"
50
+ },
51
+ {
52
+ "type": "function",
53
+ "name": "transferOwnership",
54
+ "inputs": [
55
+ {
56
+ "name": "newOwner",
57
+ "type": "address",
58
+ "internalType": "address"
59
+ }
60
+ ],
61
+ "outputs": [],
62
+ "stateMutability": "nonpayable"
63
+ },
64
+ {
65
+ "type": "function",
66
+ "name": "upgradeTo",
67
+ "inputs": [
68
+ {
69
+ "name": "newImplementation",
70
+ "type": "address",
71
+ "internalType": "address"
72
+ }
73
+ ],
74
+ "outputs": [],
75
+ "stateMutability": "nonpayable"
76
+ },
77
+ {
78
+ "type": "event",
79
+ "name": "OwnershipTransferred",
80
+ "inputs": [
81
+ {
82
+ "name": "previousOwner",
83
+ "type": "address",
84
+ "indexed": true,
85
+ "internalType": "address"
86
+ },
87
+ {
88
+ "name": "newOwner",
89
+ "type": "address",
90
+ "indexed": true,
91
+ "internalType": "address"
92
+ }
93
+ ],
94
+ "anonymous": false
95
+ },
96
+ {
97
+ "type": "event",
98
+ "name": "Upgraded",
99
+ "inputs": [
100
+ {
101
+ "name": "implementation",
102
+ "type": "address",
103
+ "indexed": true,
104
+ "internalType": "address"
105
+ }
106
+ ],
107
+ "anonymous": false
108
+ }
109
+ ]
110
+ }