@ubk-labs/ubk-oracle 0.1.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.
- package/LICENSE +21 -0
- package/README.md +34 -0
- package/artifacts/contracts/constants/Constants.sol/Constants.dbg.json +4 -0
- package/artifacts/contracts/constants/Constants.sol/Constants.json +141 -0
- package/artifacts/contracts/core/UBKOracle.sol/UBKOracle.dbg.json +4 -0
- package/artifacts/contracts/core/UBKOracle.sol/UBKOracle.json +1028 -0
- package/artifacts/contracts/mocks/MockAggregatorV3.sol/MockAggregatorV3.dbg.json +4 -0
- package/artifacts/contracts/mocks/MockAggregatorV3.sol/MockAggregatorV3.json +177 -0
- package/artifacts/contracts/mocks/MockERC20.sol/MockERC20.dbg.json +4 -0
- package/artifacts/contracts/mocks/MockERC20.sol/MockERC20.json +381 -0
- package/artifacts/contracts/mocks/MockERC4626.sol/Mock4626.dbg.json +4 -0
- package/artifacts/contracts/mocks/MockERC4626.sol/Mock4626.json +500 -0
- package/artifacts/contracts/mocks/MockIERC4626.sol/MockIERC4626.dbg.json +4 -0
- package/artifacts/contracts/mocks/MockIERC4626.sol/MockIERC4626.json +99 -0
- package/artifacts/interfaces/IUBKOracle.sol/IUBKOracle.dbg.json +4 -0
- package/artifacts/interfaces/IUBKOracle.sol/IUBKOracle.json +264 -0
- package/contracts/constants/Constants.sol +34 -0
- package/contracts/core/UBKOracle.sol +560 -0
- package/contracts/errors/Errors.sol +17 -0
- package/contracts/mocks/MockAggregatorV3.sol +56 -0
- package/contracts/mocks/MockERC20.sol +28 -0
- package/contracts/mocks/MockERC4626.sol +74 -0
- package/contracts/mocks/MockIERC4626.sol +13 -0
- package/interfaces/IUBKOracle.sol +54 -0
- package/package.json +41 -0
|
@@ -0,0 +1,500 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "Mock4626",
|
|
4
|
+
"sourceName": "contracts/mocks/MockERC4626.sol",
|
|
5
|
+
"abi": [
|
|
6
|
+
{
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"internalType": "string",
|
|
10
|
+
"name": "name_",
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"internalType": "string",
|
|
15
|
+
"name": "symbol_",
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"internalType": "uint8",
|
|
20
|
+
"name": "decimals_",
|
|
21
|
+
"type": "uint8"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"internalType": "uint256",
|
|
25
|
+
"name": "initialSupply",
|
|
26
|
+
"type": "uint256"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"internalType": "address",
|
|
30
|
+
"name": "asset_",
|
|
31
|
+
"type": "address"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"stateMutability": "nonpayable",
|
|
35
|
+
"type": "constructor"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"inputs": [
|
|
39
|
+
{
|
|
40
|
+
"internalType": "address",
|
|
41
|
+
"name": "spender",
|
|
42
|
+
"type": "address"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"internalType": "uint256",
|
|
46
|
+
"name": "allowance",
|
|
47
|
+
"type": "uint256"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"internalType": "uint256",
|
|
51
|
+
"name": "needed",
|
|
52
|
+
"type": "uint256"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"name": "ERC20InsufficientAllowance",
|
|
56
|
+
"type": "error"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"inputs": [
|
|
60
|
+
{
|
|
61
|
+
"internalType": "address",
|
|
62
|
+
"name": "sender",
|
|
63
|
+
"type": "address"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"internalType": "uint256",
|
|
67
|
+
"name": "balance",
|
|
68
|
+
"type": "uint256"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"internalType": "uint256",
|
|
72
|
+
"name": "needed",
|
|
73
|
+
"type": "uint256"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"name": "ERC20InsufficientBalance",
|
|
77
|
+
"type": "error"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"inputs": [
|
|
81
|
+
{
|
|
82
|
+
"internalType": "address",
|
|
83
|
+
"name": "approver",
|
|
84
|
+
"type": "address"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"name": "ERC20InvalidApprover",
|
|
88
|
+
"type": "error"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"inputs": [
|
|
92
|
+
{
|
|
93
|
+
"internalType": "address",
|
|
94
|
+
"name": "receiver",
|
|
95
|
+
"type": "address"
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"name": "ERC20InvalidReceiver",
|
|
99
|
+
"type": "error"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"inputs": [
|
|
103
|
+
{
|
|
104
|
+
"internalType": "address",
|
|
105
|
+
"name": "sender",
|
|
106
|
+
"type": "address"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"name": "ERC20InvalidSender",
|
|
110
|
+
"type": "error"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"inputs": [
|
|
114
|
+
{
|
|
115
|
+
"internalType": "address",
|
|
116
|
+
"name": "spender",
|
|
117
|
+
"type": "address"
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"name": "ERC20InvalidSpender",
|
|
121
|
+
"type": "error"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"anonymous": false,
|
|
125
|
+
"inputs": [
|
|
126
|
+
{
|
|
127
|
+
"indexed": true,
|
|
128
|
+
"internalType": "address",
|
|
129
|
+
"name": "owner",
|
|
130
|
+
"type": "address"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"indexed": true,
|
|
134
|
+
"internalType": "address",
|
|
135
|
+
"name": "spender",
|
|
136
|
+
"type": "address"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"indexed": false,
|
|
140
|
+
"internalType": "uint256",
|
|
141
|
+
"name": "value",
|
|
142
|
+
"type": "uint256"
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"name": "Approval",
|
|
146
|
+
"type": "event"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"anonymous": false,
|
|
150
|
+
"inputs": [
|
|
151
|
+
{
|
|
152
|
+
"indexed": true,
|
|
153
|
+
"internalType": "address",
|
|
154
|
+
"name": "from",
|
|
155
|
+
"type": "address"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"indexed": true,
|
|
159
|
+
"internalType": "address",
|
|
160
|
+
"name": "to",
|
|
161
|
+
"type": "address"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"indexed": false,
|
|
165
|
+
"internalType": "uint256",
|
|
166
|
+
"name": "value",
|
|
167
|
+
"type": "uint256"
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
"name": "Transfer",
|
|
171
|
+
"type": "event"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"inputs": [
|
|
175
|
+
{
|
|
176
|
+
"internalType": "address",
|
|
177
|
+
"name": "owner",
|
|
178
|
+
"type": "address"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"internalType": "address",
|
|
182
|
+
"name": "spender",
|
|
183
|
+
"type": "address"
|
|
184
|
+
}
|
|
185
|
+
],
|
|
186
|
+
"name": "allowance",
|
|
187
|
+
"outputs": [
|
|
188
|
+
{
|
|
189
|
+
"internalType": "uint256",
|
|
190
|
+
"name": "",
|
|
191
|
+
"type": "uint256"
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
"stateMutability": "view",
|
|
195
|
+
"type": "function"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"inputs": [
|
|
199
|
+
{
|
|
200
|
+
"internalType": "address",
|
|
201
|
+
"name": "spender",
|
|
202
|
+
"type": "address"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"internalType": "uint256",
|
|
206
|
+
"name": "value",
|
|
207
|
+
"type": "uint256"
|
|
208
|
+
}
|
|
209
|
+
],
|
|
210
|
+
"name": "approve",
|
|
211
|
+
"outputs": [
|
|
212
|
+
{
|
|
213
|
+
"internalType": "bool",
|
|
214
|
+
"name": "",
|
|
215
|
+
"type": "bool"
|
|
216
|
+
}
|
|
217
|
+
],
|
|
218
|
+
"stateMutability": "nonpayable",
|
|
219
|
+
"type": "function"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"inputs": [],
|
|
223
|
+
"name": "asset",
|
|
224
|
+
"outputs": [
|
|
225
|
+
{
|
|
226
|
+
"internalType": "address",
|
|
227
|
+
"name": "",
|
|
228
|
+
"type": "address"
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
"stateMutability": "view",
|
|
232
|
+
"type": "function"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"inputs": [
|
|
236
|
+
{
|
|
237
|
+
"internalType": "address",
|
|
238
|
+
"name": "account",
|
|
239
|
+
"type": "address"
|
|
240
|
+
}
|
|
241
|
+
],
|
|
242
|
+
"name": "balanceOf",
|
|
243
|
+
"outputs": [
|
|
244
|
+
{
|
|
245
|
+
"internalType": "uint256",
|
|
246
|
+
"name": "",
|
|
247
|
+
"type": "uint256"
|
|
248
|
+
}
|
|
249
|
+
],
|
|
250
|
+
"stateMutability": "view",
|
|
251
|
+
"type": "function"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"inputs": [
|
|
255
|
+
{
|
|
256
|
+
"internalType": "address",
|
|
257
|
+
"name": "from",
|
|
258
|
+
"type": "address"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"internalType": "uint256",
|
|
262
|
+
"name": "amount",
|
|
263
|
+
"type": "uint256"
|
|
264
|
+
}
|
|
265
|
+
],
|
|
266
|
+
"name": "burn",
|
|
267
|
+
"outputs": [],
|
|
268
|
+
"stateMutability": "nonpayable",
|
|
269
|
+
"type": "function"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"inputs": [
|
|
273
|
+
{
|
|
274
|
+
"internalType": "uint256",
|
|
275
|
+
"name": "shares",
|
|
276
|
+
"type": "uint256"
|
|
277
|
+
}
|
|
278
|
+
],
|
|
279
|
+
"name": "convertToAssets",
|
|
280
|
+
"outputs": [
|
|
281
|
+
{
|
|
282
|
+
"internalType": "uint256",
|
|
283
|
+
"name": "",
|
|
284
|
+
"type": "uint256"
|
|
285
|
+
}
|
|
286
|
+
],
|
|
287
|
+
"stateMutability": "view",
|
|
288
|
+
"type": "function"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"inputs": [
|
|
292
|
+
{
|
|
293
|
+
"internalType": "uint256",
|
|
294
|
+
"name": "assets",
|
|
295
|
+
"type": "uint256"
|
|
296
|
+
}
|
|
297
|
+
],
|
|
298
|
+
"name": "convertToShares",
|
|
299
|
+
"outputs": [
|
|
300
|
+
{
|
|
301
|
+
"internalType": "uint256",
|
|
302
|
+
"name": "",
|
|
303
|
+
"type": "uint256"
|
|
304
|
+
}
|
|
305
|
+
],
|
|
306
|
+
"stateMutability": "view",
|
|
307
|
+
"type": "function"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"inputs": [],
|
|
311
|
+
"name": "decimals",
|
|
312
|
+
"outputs": [
|
|
313
|
+
{
|
|
314
|
+
"internalType": "uint8",
|
|
315
|
+
"name": "",
|
|
316
|
+
"type": "uint8"
|
|
317
|
+
}
|
|
318
|
+
],
|
|
319
|
+
"stateMutability": "view",
|
|
320
|
+
"type": "function"
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"inputs": [
|
|
324
|
+
{
|
|
325
|
+
"internalType": "uint256",
|
|
326
|
+
"name": "assets",
|
|
327
|
+
"type": "uint256"
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"internalType": "address",
|
|
331
|
+
"name": "receiver",
|
|
332
|
+
"type": "address"
|
|
333
|
+
}
|
|
334
|
+
],
|
|
335
|
+
"name": "deposit",
|
|
336
|
+
"outputs": [
|
|
337
|
+
{
|
|
338
|
+
"internalType": "uint256",
|
|
339
|
+
"name": "shares",
|
|
340
|
+
"type": "uint256"
|
|
341
|
+
}
|
|
342
|
+
],
|
|
343
|
+
"stateMutability": "nonpayable",
|
|
344
|
+
"type": "function"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"inputs": [],
|
|
348
|
+
"name": "exchangeRate",
|
|
349
|
+
"outputs": [
|
|
350
|
+
{
|
|
351
|
+
"internalType": "uint256",
|
|
352
|
+
"name": "",
|
|
353
|
+
"type": "uint256"
|
|
354
|
+
}
|
|
355
|
+
],
|
|
356
|
+
"stateMutability": "view",
|
|
357
|
+
"type": "function"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"inputs": [],
|
|
361
|
+
"name": "getExchangeRate",
|
|
362
|
+
"outputs": [
|
|
363
|
+
{
|
|
364
|
+
"internalType": "uint256",
|
|
365
|
+
"name": "",
|
|
366
|
+
"type": "uint256"
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
"stateMutability": "view",
|
|
370
|
+
"type": "function"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"inputs": [
|
|
374
|
+
{
|
|
375
|
+
"internalType": "address",
|
|
376
|
+
"name": "to",
|
|
377
|
+
"type": "address"
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"internalType": "uint256",
|
|
381
|
+
"name": "amount",
|
|
382
|
+
"type": "uint256"
|
|
383
|
+
}
|
|
384
|
+
],
|
|
385
|
+
"name": "mint",
|
|
386
|
+
"outputs": [],
|
|
387
|
+
"stateMutability": "nonpayable",
|
|
388
|
+
"type": "function"
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"inputs": [],
|
|
392
|
+
"name": "name",
|
|
393
|
+
"outputs": [
|
|
394
|
+
{
|
|
395
|
+
"internalType": "string",
|
|
396
|
+
"name": "",
|
|
397
|
+
"type": "string"
|
|
398
|
+
}
|
|
399
|
+
],
|
|
400
|
+
"stateMutability": "view",
|
|
401
|
+
"type": "function"
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"inputs": [
|
|
405
|
+
{
|
|
406
|
+
"internalType": "uint256",
|
|
407
|
+
"name": "newRate",
|
|
408
|
+
"type": "uint256"
|
|
409
|
+
}
|
|
410
|
+
],
|
|
411
|
+
"name": "setExchangeRate",
|
|
412
|
+
"outputs": [],
|
|
413
|
+
"stateMutability": "nonpayable",
|
|
414
|
+
"type": "function"
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"inputs": [],
|
|
418
|
+
"name": "symbol",
|
|
419
|
+
"outputs": [
|
|
420
|
+
{
|
|
421
|
+
"internalType": "string",
|
|
422
|
+
"name": "",
|
|
423
|
+
"type": "string"
|
|
424
|
+
}
|
|
425
|
+
],
|
|
426
|
+
"stateMutability": "view",
|
|
427
|
+
"type": "function"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"inputs": [],
|
|
431
|
+
"name": "totalSupply",
|
|
432
|
+
"outputs": [
|
|
433
|
+
{
|
|
434
|
+
"internalType": "uint256",
|
|
435
|
+
"name": "",
|
|
436
|
+
"type": "uint256"
|
|
437
|
+
}
|
|
438
|
+
],
|
|
439
|
+
"stateMutability": "view",
|
|
440
|
+
"type": "function"
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"inputs": [
|
|
444
|
+
{
|
|
445
|
+
"internalType": "address",
|
|
446
|
+
"name": "to",
|
|
447
|
+
"type": "address"
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"internalType": "uint256",
|
|
451
|
+
"name": "value",
|
|
452
|
+
"type": "uint256"
|
|
453
|
+
}
|
|
454
|
+
],
|
|
455
|
+
"name": "transfer",
|
|
456
|
+
"outputs": [
|
|
457
|
+
{
|
|
458
|
+
"internalType": "bool",
|
|
459
|
+
"name": "",
|
|
460
|
+
"type": "bool"
|
|
461
|
+
}
|
|
462
|
+
],
|
|
463
|
+
"stateMutability": "nonpayable",
|
|
464
|
+
"type": "function"
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"inputs": [
|
|
468
|
+
{
|
|
469
|
+
"internalType": "address",
|
|
470
|
+
"name": "from",
|
|
471
|
+
"type": "address"
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"internalType": "address",
|
|
475
|
+
"name": "to",
|
|
476
|
+
"type": "address"
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"internalType": "uint256",
|
|
480
|
+
"name": "value",
|
|
481
|
+
"type": "uint256"
|
|
482
|
+
}
|
|
483
|
+
],
|
|
484
|
+
"name": "transferFrom",
|
|
485
|
+
"outputs": [
|
|
486
|
+
{
|
|
487
|
+
"internalType": "bool",
|
|
488
|
+
"name": "",
|
|
489
|
+
"type": "bool"
|
|
490
|
+
}
|
|
491
|
+
],
|
|
492
|
+
"stateMutability": "nonpayable",
|
|
493
|
+
"type": "function"
|
|
494
|
+
}
|
|
495
|
+
],
|
|
496
|
+
"bytecode": "0x60c0604052670de0b6b3a76400006005553480156200001d57600080fd5b50604051620012cd380380620012cd833981016040819052620000409162000362565b84848484838360036200005483826200049a565b5060046200006382826200049a565b50505060ff821660805262000079338262000111565b5050600680546001600160a01b0319166001600160a01b0385169081179091556040805163313ce56760e01b8152905191935063313ce56792506004808201926020929091908290030181865afa158015620000d9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000ff919062000566565b60ff1660a05250620005b39350505050565b6001600160a01b038216620001415760405163ec442f0560e01b8152600060048201526024015b60405180910390fd5b6200014f6000838362000153565b5050565b6001600160a01b038316620001825780600260008282546200017691906200058b565b90915550620001f69050565b6001600160a01b03831660009081526020819052604090205481811015620001d75760405163391434e360e21b81526001600160a01b0385166004820152602481018290526044810183905260640162000138565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216620002145760028054829003905562000233565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200027991815260200190565b60405180910390a3505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620002ae57600080fd5b81516001600160401b0380821115620002cb57620002cb62000286565b604051601f8301601f19908116603f01168101908282118183101715620002f657620002f662000286565b816040528381526020925086838588010111156200031357600080fd5b600091505b8382101562000337578582018301518183018401529082019062000318565b600093810190920192909252949350505050565b805160ff811681146200035d57600080fd5b919050565b600080600080600060a086880312156200037b57600080fd5b85516001600160401b03808211156200039357600080fd5b620003a189838a016200029c565b96506020880151915080821115620003b857600080fd5b50620003c7888289016200029c565b945050620003d8604087016200034b565b6060870151608088015191945092506001600160a01b0381168114620003fd57600080fd5b809150509295509295909350565b600181811c908216806200042057607f821691505b6020821081036200044157634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200049557600081815260208120601f850160051c81016020861015620004705750805b601f850160051c820191505b8181101562000491578281556001016200047c565b5050505b505050565b81516001600160401b03811115620004b657620004b662000286565b620004ce81620004c784546200040b565b8462000447565b602080601f831160018114620005065760008415620004ed5750858301515b600019600386901b1c1916600185901b17855562000491565b600085815260208120601f198616915b82811015620005375788860151825594840194600190910190840162000516565b5085821015620005565787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156200057957600080fd5b62000584826200034b565b9392505050565b80820180821115620005ad57634e487b7160e01b600052601160045260246000fd5b92915050565b60805160a051610cdf620005ee6000396000818161039901526105c601526000818161019f0152818161036901526105a10152610cdf6000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c80636e553f65116100a2578063a9059cbb11610071578063a9059cbb14610259578063c6e6f5921461026c578063db068e0e1461027f578063dd62ed3e14610292578063e6aa216c146102cb57600080fd5b80636e553f651461020257806370a082311461021557806395d89b411461023e5780639dc29fac1461024657600080fd5b806323b872dd116100e957806323b872dd14610185578063313ce5671461019857806338d52e0f146101c95780633ba0b9a9146101e457806340c10f19146101ed57600080fd5b806306fdde031461011b57806307a2d13a14610139578063095ea7b31461015a57806318160ddd1461017d575b600080fd5b6101236102d3565b604051610130919061097e565b60405180910390f35b61014c6101473660046109cc565b610365565b604051908152602001610130565b61016d610168366004610a01565b6103fe565b6040519015158152602001610130565b60025461014c565b61016d610193366004610a2b565b610418565b60405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610130565b6006546040516001600160a01b039091168152602001610130565b61014c60055481565b6102006101fb366004610a01565b61043c565b005b61014c610210366004610a67565b61044a565b61014c610223366004610a93565b6001600160a01b031660009081526020819052604090205490565b610123610576565b610200610254366004610a01565b610585565b61016d610267366004610a01565b61058f565b61014c61027a3660046109cc565b61059d565b61020061028d3660046109cc565b600555565b61014c6102a0366004610ab5565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60055461014c565b6060600380546102e290610adf565b80601f016020809104026020016040519081016040528092919081815260200182805461030e90610adf565b801561035b5780601f106103305761010080835404028352916020019161035b565b820191906000526020600020905b81548152906001019060200180831161033e57829003601f168201915b5050505050905090565b60007f00000000000000000000000000000000000000000000000000000000000000008161039482600a610c13565b6103bf7f0000000000000000000000000000000000000000000000000000000000000000600a610c13565b6103c99086610c22565b6103d39190610c39565b9050670de0b6b3a7640000600554826103ec9190610c22565b6103f69190610c39565b949350505050565b60003361040c818585610623565b60019150505b92915050565b600033610426858285610635565b6104318585856106b4565b506001949350505050565b6104468282610713565b5050565b600080831161048f5760405162461bcd60e51b815260206004820152600c60248201526b16995c9bc819195c1bdcda5d60a21b60448201526064015b60405180910390fd5b6040516363737ac960e11b815260048101849052309063c6e6f59290602401602060405180830381865afa1580156104cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ef9190610c5b565b6006546040516323b872dd60e01b8152336004820152306024820152604481018690529192506001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610547573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061056b9190610c74565b506104128282610713565b6060600480546102e290610adf565b6104468282610749565b60003361040c8185856106b4565b60007f0000000000000000000000000000000000000000000000000000000000000000816105ec7f0000000000000000000000000000000000000000000000000000000000000000600a610c13565b6105f783600a610c13565b6106019086610c22565b61060b9190610c39565b6005549091506103ec82670de0b6b3a7640000610c22565b610630838383600161077f565b505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198110156106ae578181101561069f57604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610486565b6106ae8484848403600061077f565b50505050565b6001600160a01b0383166106de57604051634b637e8f60e11b815260006004820152602401610486565b6001600160a01b0382166107085760405163ec442f0560e01b815260006004820152602401610486565b610630838383610854565b6001600160a01b03821661073d5760405163ec442f0560e01b815260006004820152602401610486565b61044660008383610854565b6001600160a01b03821661077357604051634b637e8f60e11b815260006004820152602401610486565b61044682600083610854565b6001600160a01b0384166107a95760405163e602df0560e01b815260006004820152602401610486565b6001600160a01b0383166107d357604051634a1406b160e11b815260006004820152602401610486565b6001600160a01b03808516600090815260016020908152604080832093871683529290522082905580156106ae57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161084691815260200190565b60405180910390a350505050565b6001600160a01b03831661087f5780600260008282546108749190610c96565b909155506108f19050565b6001600160a01b038316600090815260208190526040902054818110156108d25760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610486565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661090d5760028054829003905561092c565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161097191815260200190565b60405180910390a3505050565b600060208083528351808285015260005b818110156109ab5785810183015185820160400152820161098f565b506000604082860101526040601f19601f8301168501019250505092915050565b6000602082840312156109de57600080fd5b5035919050565b80356001600160a01b03811681146109fc57600080fd5b919050565b60008060408385031215610a1457600080fd5b610a1d836109e5565b946020939093013593505050565b600080600060608486031215610a4057600080fd5b610a49846109e5565b9250610a57602085016109e5565b9150604084013590509250925092565b60008060408385031215610a7a57600080fd5b82359150610a8a602084016109e5565b90509250929050565b600060208284031215610aa557600080fd5b610aae826109e5565b9392505050565b60008060408385031215610ac857600080fd5b610ad1836109e5565b9150610a8a602084016109e5565b600181811c90821680610af357607f821691505b602082108103610b1357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115610b6a578160001904821115610b5057610b50610b19565b80851615610b5d57918102915b93841c9390800290610b34565b509250929050565b600082610b8157506001610412565b81610b8e57506000610412565b8160018114610ba45760028114610bae57610bca565b6001915050610412565b60ff841115610bbf57610bbf610b19565b50506001821b610412565b5060208310610133831016604e8410600b8410161715610bed575081810a610412565b610bf78383610b2f565b8060001904821115610c0b57610c0b610b19565b029392505050565b6000610aae60ff841683610b72565b808202811582820484141761041257610412610b19565b600082610c5657634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215610c6d57600080fd5b5051919050565b600060208284031215610c8657600080fd5b81518015158114610aae57600080fd5b8082018082111561041257610412610b1956fea264697066735822122085b69e84a8fdceba323a53974779fea0ba99eb5374b9411ac6837f0701ceb5be64736f6c63430008150033",
|
|
497
|
+
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101165760003560e01c80636e553f65116100a2578063a9059cbb11610071578063a9059cbb14610259578063c6e6f5921461026c578063db068e0e1461027f578063dd62ed3e14610292578063e6aa216c146102cb57600080fd5b80636e553f651461020257806370a082311461021557806395d89b411461023e5780639dc29fac1461024657600080fd5b806323b872dd116100e957806323b872dd14610185578063313ce5671461019857806338d52e0f146101c95780633ba0b9a9146101e457806340c10f19146101ed57600080fd5b806306fdde031461011b57806307a2d13a14610139578063095ea7b31461015a57806318160ddd1461017d575b600080fd5b6101236102d3565b604051610130919061097e565b60405180910390f35b61014c6101473660046109cc565b610365565b604051908152602001610130565b61016d610168366004610a01565b6103fe565b6040519015158152602001610130565b60025461014c565b61016d610193366004610a2b565b610418565b60405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610130565b6006546040516001600160a01b039091168152602001610130565b61014c60055481565b6102006101fb366004610a01565b61043c565b005b61014c610210366004610a67565b61044a565b61014c610223366004610a93565b6001600160a01b031660009081526020819052604090205490565b610123610576565b610200610254366004610a01565b610585565b61016d610267366004610a01565b61058f565b61014c61027a3660046109cc565b61059d565b61020061028d3660046109cc565b600555565b61014c6102a0366004610ab5565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60055461014c565b6060600380546102e290610adf565b80601f016020809104026020016040519081016040528092919081815260200182805461030e90610adf565b801561035b5780601f106103305761010080835404028352916020019161035b565b820191906000526020600020905b81548152906001019060200180831161033e57829003601f168201915b5050505050905090565b60007f00000000000000000000000000000000000000000000000000000000000000008161039482600a610c13565b6103bf7f0000000000000000000000000000000000000000000000000000000000000000600a610c13565b6103c99086610c22565b6103d39190610c39565b9050670de0b6b3a7640000600554826103ec9190610c22565b6103f69190610c39565b949350505050565b60003361040c818585610623565b60019150505b92915050565b600033610426858285610635565b6104318585856106b4565b506001949350505050565b6104468282610713565b5050565b600080831161048f5760405162461bcd60e51b815260206004820152600c60248201526b16995c9bc819195c1bdcda5d60a21b60448201526064015b60405180910390fd5b6040516363737ac960e11b815260048101849052309063c6e6f59290602401602060405180830381865afa1580156104cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ef9190610c5b565b6006546040516323b872dd60e01b8152336004820152306024820152604481018690529192506001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610547573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061056b9190610c74565b506104128282610713565b6060600480546102e290610adf565b6104468282610749565b60003361040c8185856106b4565b60007f0000000000000000000000000000000000000000000000000000000000000000816105ec7f0000000000000000000000000000000000000000000000000000000000000000600a610c13565b6105f783600a610c13565b6106019086610c22565b61060b9190610c39565b6005549091506103ec82670de0b6b3a7640000610c22565b610630838383600161077f565b505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198110156106ae578181101561069f57604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610486565b6106ae8484848403600061077f565b50505050565b6001600160a01b0383166106de57604051634b637e8f60e11b815260006004820152602401610486565b6001600160a01b0382166107085760405163ec442f0560e01b815260006004820152602401610486565b610630838383610854565b6001600160a01b03821661073d5760405163ec442f0560e01b815260006004820152602401610486565b61044660008383610854565b6001600160a01b03821661077357604051634b637e8f60e11b815260006004820152602401610486565b61044682600083610854565b6001600160a01b0384166107a95760405163e602df0560e01b815260006004820152602401610486565b6001600160a01b0383166107d357604051634a1406b160e11b815260006004820152602401610486565b6001600160a01b03808516600090815260016020908152604080832093871683529290522082905580156106ae57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161084691815260200190565b60405180910390a350505050565b6001600160a01b03831661087f5780600260008282546108749190610c96565b909155506108f19050565b6001600160a01b038316600090815260208190526040902054818110156108d25760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610486565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661090d5760028054829003905561092c565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161097191815260200190565b60405180910390a3505050565b600060208083528351808285015260005b818110156109ab5785810183015185820160400152820161098f565b506000604082860101526040601f19601f8301168501019250505092915050565b6000602082840312156109de57600080fd5b5035919050565b80356001600160a01b03811681146109fc57600080fd5b919050565b60008060408385031215610a1457600080fd5b610a1d836109e5565b946020939093013593505050565b600080600060608486031215610a4057600080fd5b610a49846109e5565b9250610a57602085016109e5565b9150604084013590509250925092565b60008060408385031215610a7a57600080fd5b82359150610a8a602084016109e5565b90509250929050565b600060208284031215610aa557600080fd5b610aae826109e5565b9392505050565b60008060408385031215610ac857600080fd5b610ad1836109e5565b9150610a8a602084016109e5565b600181811c90821680610af357607f821691505b602082108103610b1357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115610b6a578160001904821115610b5057610b50610b19565b80851615610b5d57918102915b93841c9390800290610b34565b509250929050565b600082610b8157506001610412565b81610b8e57506000610412565b8160018114610ba45760028114610bae57610bca565b6001915050610412565b60ff841115610bbf57610bbf610b19565b50506001821b610412565b5060208310610133831016604e8410600b8410161715610bed575081810a610412565b610bf78383610b2f565b8060001904821115610c0b57610c0b610b19565b029392505050565b6000610aae60ff841683610b72565b808202811582820484141761041257610412610b19565b600082610c5657634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215610c6d57600080fd5b5051919050565b600060208284031215610c8657600080fd5b81518015158114610aae57600080fd5b8082018082111561041257610412610b1956fea264697066735822122085b69e84a8fdceba323a53974779fea0ba99eb5374b9411ac6837f0701ceb5be64736f6c63430008150033",
|
|
498
|
+
"linkReferences": {},
|
|
499
|
+
"deployedLinkReferences": {}
|
|
500
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "MockIERC4626",
|
|
4
|
+
"sourceName": "contracts/mocks/MockIERC4626.sol",
|
|
5
|
+
"abi": [
|
|
6
|
+
{
|
|
7
|
+
"inputs": [],
|
|
8
|
+
"name": "asset",
|
|
9
|
+
"outputs": [
|
|
10
|
+
{
|
|
11
|
+
"internalType": "address",
|
|
12
|
+
"name": "",
|
|
13
|
+
"type": "address"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"stateMutability": "view",
|
|
17
|
+
"type": "function"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"inputs": [
|
|
21
|
+
{
|
|
22
|
+
"internalType": "uint256",
|
|
23
|
+
"name": "shares",
|
|
24
|
+
"type": "uint256"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"name": "convertToAssets",
|
|
28
|
+
"outputs": [
|
|
29
|
+
{
|
|
30
|
+
"internalType": "uint256",
|
|
31
|
+
"name": "",
|
|
32
|
+
"type": "uint256"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"stateMutability": "view",
|
|
36
|
+
"type": "function"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"inputs": [
|
|
40
|
+
{
|
|
41
|
+
"internalType": "uint256",
|
|
42
|
+
"name": "assets",
|
|
43
|
+
"type": "uint256"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"name": "convertToShares",
|
|
47
|
+
"outputs": [
|
|
48
|
+
{
|
|
49
|
+
"internalType": "uint256",
|
|
50
|
+
"name": "",
|
|
51
|
+
"type": "uint256"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"stateMutability": "view",
|
|
55
|
+
"type": "function"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"inputs": [
|
|
59
|
+
{
|
|
60
|
+
"internalType": "uint256",
|
|
61
|
+
"name": "assets",
|
|
62
|
+
"type": "uint256"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"internalType": "address",
|
|
66
|
+
"name": "receiver",
|
|
67
|
+
"type": "address"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"name": "deposit",
|
|
71
|
+
"outputs": [
|
|
72
|
+
{
|
|
73
|
+
"internalType": "uint256",
|
|
74
|
+
"name": "shares",
|
|
75
|
+
"type": "uint256"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"stateMutability": "nonpayable",
|
|
79
|
+
"type": "function"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"inputs": [
|
|
83
|
+
{
|
|
84
|
+
"internalType": "uint256",
|
|
85
|
+
"name": "newRate",
|
|
86
|
+
"type": "uint256"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"name": "setExchangeRate",
|
|
90
|
+
"outputs": [],
|
|
91
|
+
"stateMutability": "nonpayable",
|
|
92
|
+
"type": "function"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"bytecode": "0x",
|
|
96
|
+
"deployedBytecode": "0x",
|
|
97
|
+
"linkReferences": {},
|
|
98
|
+
"deployedLinkReferences": {}
|
|
99
|
+
}
|