@venusprotocol/oracle 1.3.2 → 1.4.0
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/artifacts/build-info/2fde13baf96aae3a4a0595eaa19cc540.json +1 -0
- package/artifacts/build-info/99d7aae43e9eacb55ec69b3cd6d3a70b.json +1 -0
- package/artifacts/contracts/PriceOracle.sol/PriceOracle.dbg.json +1 -1
- package/artifacts/contracts/PriceOracle.sol/PriceOracle.json +0 -6
- package/artifacts/contracts/ResilientOracle.sol/ResilientOracle.dbg.json +1 -1
- package/artifacts/contracts/ResilientOracle.sol/ResilientOracle.json +10 -10
- package/contracts/PriceOracle.sol +4 -4
- package/contracts/ResilientOracle.sol +27 -24
- package/deploy/{oracles.d.ts → 1-deploy-oracles.d.ts} +1 -1
- package/deploy/1-deploy-oracles.d.ts.map +1 -0
- package/deploy/{oracles.js → 1-deploy-oracles.js} +22 -8
- package/deploy/1-deploy-oracles.js.map +1 -0
- package/deploy/2-configure-feeds.d.ts +4 -0
- package/deploy/2-configure-feeds.d.ts.map +1 -0
- package/deploy/2-configure-feeds.js +90 -0
- package/deploy/2-configure-feeds.js.map +1 -0
- package/deployments/bsctestnet/.chainId +1 -0
- package/deployments/bsctestnet/BinanceOracle.json +290 -0
- package/deployments/bsctestnet/BinanceOracle_Implementation.json +140 -0
- package/deployments/{localhost/ChainlinkOracle_Proxy.json → bsctestnet/BinanceOracle_Proxy.json} +36 -46
- package/deployments/{localhost → bsctestnet}/BoundValidator.json +40 -40
- package/deployments/{localhost → bsctestnet}/BoundValidator_Implementation.json +19 -19
- package/deployments/{localhost → bsctestnet}/BoundValidator_Proxy.json +39 -39
- package/deployments/{localhost/PivotTwapOracle.json → bsctestnet/ChainlinkOracle.json} +214 -61
- package/deployments/bsctestnet/ChainlinkOracle_Implementation.json +553 -0
- package/deployments/{localhost/PivotTwapOracle_Proxy.json → bsctestnet/ChainlinkOracle_Proxy.json} +39 -43
- package/deployments/{localhost → bsctestnet}/DefaultProxyAdmin.json +19 -19
- package/deployments/{localhost → bsctestnet}/PythOracle.json +178 -49
- package/deployments/{localhost → bsctestnet}/PythOracle_Implementation.json +247 -45
- package/deployments/{localhost → bsctestnet}/PythOracle_Proxy.json +53 -40
- package/deployments/{localhost → bsctestnet}/ResilientOracle.json +51 -51
- package/deployments/bsctestnet/ResilientOracle_Implementation.json +746 -0
- package/deployments/{localhost → bsctestnet}/ResilientOracle_Proxy.json +41 -41
- package/deployments/{localhost/BinanceOracle.json → bsctestnet/TwapOracle.json} +419 -53
- package/deployments/bsctestnet/TwapOracle_Implementation.json +842 -0
- package/deployments/{localhost/BinanceOracle_Proxy.json → bsctestnet/TwapOracle_Proxy.json} +41 -41
- package/deployments/bsctestnet/solcInputs/09bc2981019c6dcce653b90bac585fe0.json +81 -0
- package/deployments/{localhost → bsctestnet}/solcInputs/0e89febeebc7444140de8e67c9067d2c.json +0 -0
- package/deployments/{localhost/solcInputs/468ec7a31e2db8855c82fb8141193271.json → bsctestnet/solcInputs/5dedb37ab8105f1f71e53a3f865859c5.json} +7 -4
- package/deployments/{localhost/solcInputs/50629170e50dc9fec79dac585e95ac05.json → bsctestnet/solcInputs/bb71c6049f6b7b21a6581f40daf802bc.json} +31 -31
- package/package.json +2 -2
- package/artifacts/build-info/766f05630947fa6d366a667b66c1141b.json +0 -1
- package/deploy/oracles.d.ts.map +0 -1
- package/deploy/oracles.js.map +0 -1
- package/deployments/localhost/.chainId +0 -1
- package/deployments/localhost/BinanceOracle_Implementation.json +0 -305
- package/deployments/localhost/ChainlinkOracle.json +0 -370
- package/deployments/localhost/ChainlinkOracle_Implementation.json +0 -273
- package/deployments/localhost/PivotTwapOracle_Implementation.json +0 -304
- package/deployments/localhost/ResilientOracle_Implementation.json +0 -746
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"address": "
|
|
2
|
+
"address": "0x6e45ECf4ecCc49B36F4aF586fefD03a7a226cAA1",
|
|
3
3
|
"abi": [
|
|
4
4
|
{
|
|
5
5
|
"anonymous": false,
|
|
@@ -144,14 +144,46 @@
|
|
|
144
144
|
"type": "event"
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
|
+
"anonymous": false,
|
|
147
148
|
"inputs": [
|
|
148
149
|
{
|
|
150
|
+
"indexed": true,
|
|
149
151
|
"internalType": "address",
|
|
150
|
-
"name": "",
|
|
152
|
+
"name": "newPythOracle",
|
|
151
153
|
"type": "address"
|
|
152
154
|
}
|
|
153
155
|
],
|
|
154
|
-
"name": "
|
|
156
|
+
"name": "PythOracleSet",
|
|
157
|
+
"type": "event"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"anonymous": false,
|
|
161
|
+
"inputs": [
|
|
162
|
+
{
|
|
163
|
+
"indexed": true,
|
|
164
|
+
"internalType": "address",
|
|
165
|
+
"name": "vToken",
|
|
166
|
+
"type": "address"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"indexed": true,
|
|
170
|
+
"internalType": "bytes32",
|
|
171
|
+
"name": "pythId",
|
|
172
|
+
"type": "bytes32"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"indexed": true,
|
|
176
|
+
"internalType": "uint64",
|
|
177
|
+
"name": "maxStalePeriod",
|
|
178
|
+
"type": "uint64"
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"name": "TokenConfigAdded",
|
|
182
|
+
"type": "event"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"inputs": [],
|
|
186
|
+
"name": "EXP_SCALE",
|
|
155
187
|
"outputs": [
|
|
156
188
|
{
|
|
157
189
|
"internalType": "uint256",
|
|
@@ -214,22 +246,106 @@
|
|
|
214
246
|
"stateMutability": "nonpayable",
|
|
215
247
|
"type": "function"
|
|
216
248
|
},
|
|
249
|
+
{
|
|
250
|
+
"inputs": [
|
|
251
|
+
{
|
|
252
|
+
"components": [
|
|
253
|
+
{
|
|
254
|
+
"internalType": "bytes32",
|
|
255
|
+
"name": "pythId",
|
|
256
|
+
"type": "bytes32"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"internalType": "address",
|
|
260
|
+
"name": "asset",
|
|
261
|
+
"type": "address"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"internalType": "uint64",
|
|
265
|
+
"name": "maxStalePeriod",
|
|
266
|
+
"type": "uint64"
|
|
267
|
+
}
|
|
268
|
+
],
|
|
269
|
+
"internalType": "struct TokenConfig",
|
|
270
|
+
"name": "tokenConfig",
|
|
271
|
+
"type": "tuple"
|
|
272
|
+
}
|
|
273
|
+
],
|
|
274
|
+
"name": "setTokenConfig",
|
|
275
|
+
"outputs": [],
|
|
276
|
+
"stateMutability": "nonpayable",
|
|
277
|
+
"type": "function"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"inputs": [
|
|
281
|
+
{
|
|
282
|
+
"components": [
|
|
283
|
+
{
|
|
284
|
+
"internalType": "bytes32",
|
|
285
|
+
"name": "pythId",
|
|
286
|
+
"type": "bytes32"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"internalType": "address",
|
|
290
|
+
"name": "asset",
|
|
291
|
+
"type": "address"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"internalType": "uint64",
|
|
295
|
+
"name": "maxStalePeriod",
|
|
296
|
+
"type": "uint64"
|
|
297
|
+
}
|
|
298
|
+
],
|
|
299
|
+
"internalType": "struct TokenConfig[]",
|
|
300
|
+
"name": "tokenConfigs_",
|
|
301
|
+
"type": "tuple[]"
|
|
302
|
+
}
|
|
303
|
+
],
|
|
304
|
+
"name": "setTokenConfigs",
|
|
305
|
+
"outputs": [],
|
|
306
|
+
"stateMutability": "nonpayable",
|
|
307
|
+
"type": "function"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"inputs": [
|
|
311
|
+
{
|
|
312
|
+
"internalType": "contract IPyth",
|
|
313
|
+
"name": "underlyingPythOracle_",
|
|
314
|
+
"type": "address"
|
|
315
|
+
}
|
|
316
|
+
],
|
|
317
|
+
"name": "setUnderlyingPythOracle",
|
|
318
|
+
"outputs": [],
|
|
319
|
+
"stateMutability": "nonpayable",
|
|
320
|
+
"type": "function"
|
|
321
|
+
},
|
|
217
322
|
{
|
|
218
323
|
"inputs": [
|
|
324
|
+
{
|
|
325
|
+
"internalType": "address",
|
|
326
|
+
"name": "",
|
|
327
|
+
"type": "address"
|
|
328
|
+
}
|
|
329
|
+
],
|
|
330
|
+
"name": "tokenConfigs",
|
|
331
|
+
"outputs": [
|
|
332
|
+
{
|
|
333
|
+
"internalType": "bytes32",
|
|
334
|
+
"name": "pythId",
|
|
335
|
+
"type": "bytes32"
|
|
336
|
+
},
|
|
219
337
|
{
|
|
220
338
|
"internalType": "address",
|
|
221
339
|
"name": "asset",
|
|
222
340
|
"type": "address"
|
|
223
341
|
},
|
|
224
342
|
{
|
|
225
|
-
"internalType": "
|
|
226
|
-
"name": "
|
|
227
|
-
"type": "
|
|
343
|
+
"internalType": "uint64",
|
|
344
|
+
"name": "maxStalePeriod",
|
|
345
|
+
"type": "uint64"
|
|
228
346
|
}
|
|
229
347
|
],
|
|
230
|
-
"
|
|
231
|
-
"outputs": [],
|
|
232
|
-
"stateMutability": "nonpayable",
|
|
348
|
+
"stateMutability": "view",
|
|
233
349
|
"type": "function"
|
|
234
350
|
},
|
|
235
351
|
{
|
|
@@ -280,73 +396,86 @@
|
|
|
280
396
|
"type": "constructor"
|
|
281
397
|
}
|
|
282
398
|
],
|
|
283
|
-
"transactionHash": "
|
|
399
|
+
"transactionHash": "0xbb31804303a53d25dfac86e5fc26fb05f215b248a1d3ff0644c38fdefe69f6dd",
|
|
284
400
|
"receipt": {
|
|
285
401
|
"to": null,
|
|
286
|
-
"from": "
|
|
287
|
-
"contractAddress": "
|
|
288
|
-
"transactionIndex":
|
|
289
|
-
"gasUsed": "
|
|
290
|
-
"logsBloom": "
|
|
291
|
-
"blockHash": "
|
|
292
|
-
"transactionHash": "
|
|
402
|
+
"from": "0x2Ce1d0ffD7E869D9DF33e28552b12DdDed326706",
|
|
403
|
+
"contractAddress": "0x6e45ECf4ecCc49B36F4aF586fefD03a7a226cAA1",
|
|
404
|
+
"transactionIndex": 2,
|
|
405
|
+
"gasUsed": "692901",
|
|
406
|
+
"logsBloom": "0x10000000000000000000000000000000400000000000000000800008000000000000000000000000000000000000000000000000000000000000000000004000004000000000000000000000002002000001000000000000000000000100000000000000020000000010000000000800002000800000000000000000000000400000000100000000000000000008000000000000000080000000000000800000000000000000000000000000000404000000000000000000000000000000000000000020000000000000000000040000000000000400000000000000000820000001000000000000000000000000000000000000000000000000000001000000",
|
|
407
|
+
"blockHash": "0x8e4f330c26559c318119c88787e12460219b8cc1a74ec3ffa42db0b5fd43150e",
|
|
408
|
+
"transactionHash": "0xbb31804303a53d25dfac86e5fc26fb05f215b248a1d3ff0644c38fdefe69f6dd",
|
|
293
409
|
"logs": [
|
|
294
410
|
{
|
|
295
|
-
"transactionIndex":
|
|
296
|
-
"blockNumber":
|
|
297
|
-
"transactionHash": "
|
|
298
|
-
"address": "
|
|
411
|
+
"transactionIndex": 2,
|
|
412
|
+
"blockNumber": 24708554,
|
|
413
|
+
"transactionHash": "0xbb31804303a53d25dfac86e5fc26fb05f215b248a1d3ff0644c38fdefe69f6dd",
|
|
414
|
+
"address": "0x6e45ECf4ecCc49B36F4aF586fefD03a7a226cAA1",
|
|
299
415
|
"topics": [
|
|
300
416
|
"0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b",
|
|
301
|
-
"
|
|
417
|
+
"0x0000000000000000000000009f6263a70cab4cadaae34ae0c6969eb135d0e7fd"
|
|
302
418
|
],
|
|
303
419
|
"data": "0x",
|
|
304
|
-
"logIndex":
|
|
305
|
-
"blockHash": "
|
|
420
|
+
"logIndex": 2,
|
|
421
|
+
"blockHash": "0x8e4f330c26559c318119c88787e12460219b8cc1a74ec3ffa42db0b5fd43150e"
|
|
306
422
|
},
|
|
307
423
|
{
|
|
308
|
-
"transactionIndex":
|
|
309
|
-
"blockNumber":
|
|
310
|
-
"transactionHash": "
|
|
311
|
-
"address": "
|
|
424
|
+
"transactionIndex": 2,
|
|
425
|
+
"blockNumber": 24708554,
|
|
426
|
+
"transactionHash": "0xbb31804303a53d25dfac86e5fc26fb05f215b248a1d3ff0644c38fdefe69f6dd",
|
|
427
|
+
"address": "0x6e45ECf4ecCc49B36F4aF586fefD03a7a226cAA1",
|
|
312
428
|
"topics": [
|
|
313
429
|
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
|
|
314
430
|
"0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
315
|
-
"
|
|
431
|
+
"0x0000000000000000000000002ce1d0ffd7e869d9df33e28552b12ddded326706"
|
|
316
432
|
],
|
|
317
433
|
"data": "0x",
|
|
318
|
-
"logIndex":
|
|
319
|
-
"blockHash": "
|
|
434
|
+
"logIndex": 3,
|
|
435
|
+
"blockHash": "0x8e4f330c26559c318119c88787e12460219b8cc1a74ec3ffa42db0b5fd43150e"
|
|
320
436
|
},
|
|
321
437
|
{
|
|
322
|
-
"transactionIndex":
|
|
323
|
-
"blockNumber":
|
|
324
|
-
"transactionHash": "
|
|
325
|
-
"address": "
|
|
438
|
+
"transactionIndex": 2,
|
|
439
|
+
"blockNumber": 24708554,
|
|
440
|
+
"transactionHash": "0xbb31804303a53d25dfac86e5fc26fb05f215b248a1d3ff0644c38fdefe69f6dd",
|
|
441
|
+
"address": "0x6e45ECf4ecCc49B36F4aF586fefD03a7a226cAA1",
|
|
442
|
+
"topics": [
|
|
443
|
+
"0xad50c6353c28bb4c67268a71d1f313fc9630fd4a91a6f3185270ba60a28710c1",
|
|
444
|
+
"0x000000000000000000000000d7308b14bf4008e7c7196ec35610b1427c5702ea"
|
|
445
|
+
],
|
|
446
|
+
"data": "0x",
|
|
447
|
+
"logIndex": 4,
|
|
448
|
+
"blockHash": "0x8e4f330c26559c318119c88787e12460219b8cc1a74ec3ffa42db0b5fd43150e"
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"transactionIndex": 2,
|
|
452
|
+
"blockNumber": 24708554,
|
|
453
|
+
"transactionHash": "0xbb31804303a53d25dfac86e5fc26fb05f215b248a1d3ff0644c38fdefe69f6dd",
|
|
454
|
+
"address": "0x6e45ECf4ecCc49B36F4aF586fefD03a7a226cAA1",
|
|
326
455
|
"topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"],
|
|
327
456
|
"data": "0x0000000000000000000000000000000000000000000000000000000000000001",
|
|
328
|
-
"logIndex":
|
|
329
|
-
"blockHash": "
|
|
457
|
+
"logIndex": 5,
|
|
458
|
+
"blockHash": "0x8e4f330c26559c318119c88787e12460219b8cc1a74ec3ffa42db0b5fd43150e"
|
|
330
459
|
},
|
|
331
460
|
{
|
|
332
|
-
"transactionIndex":
|
|
333
|
-
"blockNumber":
|
|
334
|
-
"transactionHash": "
|
|
335
|
-
"address": "
|
|
461
|
+
"transactionIndex": 2,
|
|
462
|
+
"blockNumber": 24708554,
|
|
463
|
+
"transactionHash": "0xbb31804303a53d25dfac86e5fc26fb05f215b248a1d3ff0644c38fdefe69f6dd",
|
|
464
|
+
"address": "0x6e45ECf4ecCc49B36F4aF586fefD03a7a226cAA1",
|
|
336
465
|
"topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"],
|
|
337
|
-
"data": "
|
|
338
|
-
"logIndex":
|
|
339
|
-
"blockHash": "
|
|
466
|
+
"data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000088c90a298028f7c2ba3edc16382609e996f3aa9f",
|
|
467
|
+
"logIndex": 6,
|
|
468
|
+
"blockHash": "0x8e4f330c26559c318119c88787e12460219b8cc1a74ec3ffa42db0b5fd43150e"
|
|
340
469
|
}
|
|
341
470
|
],
|
|
342
|
-
"blockNumber":
|
|
343
|
-
"cumulativeGasUsed": "
|
|
471
|
+
"blockNumber": 24708554,
|
|
472
|
+
"cumulativeGasUsed": "748321",
|
|
344
473
|
"status": 1,
|
|
345
474
|
"byzantium": true
|
|
346
475
|
},
|
|
347
476
|
"args": [
|
|
348
|
-
"
|
|
349
|
-
"
|
|
477
|
+
"0x9F6263A70cAB4CAdaaE34Ae0C6969eB135D0E7FD",
|
|
478
|
+
"0x88c90A298028F7C2Ba3eDc16382609E996f3aa9F",
|
|
350
479
|
"0xc4d66de8000000000000000000000000d7308b14bf4008e7c7196ec35610b1427c5702ea"
|
|
351
480
|
],
|
|
352
481
|
"numDeployments": 1,
|
|
@@ -358,7 +487,7 @@
|
|
|
358
487
|
"methodName": "initialize",
|
|
359
488
|
"args": ["0xd7308b14BF4008e7C7196eC35610B1427C5702EA"]
|
|
360
489
|
},
|
|
361
|
-
"implementation": "
|
|
490
|
+
"implementation": "0x9F6263A70cAB4CAdaaE34Ae0C6969eB135D0E7FD",
|
|
362
491
|
"devdoc": {
|
|
363
492
|
"details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.",
|
|
364
493
|
"kind": "dev",
|