@venusprotocol/oracle 2.15.0-dev.5 → 2.15.0-dev.7

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 (34) hide show
  1. package/deployments/bscmainnet/AtlasOracle.json +658 -0
  2. package/deployments/bscmainnet/AtlasOracle_Implementation.json +743 -0
  3. package/deployments/bscmainnet/AtlasOracle_Proxy.json +262 -0
  4. package/deployments/bscmainnet/PendleOracle-PT-clisBNB-25JUN2026.json +785 -0
  5. package/deployments/bscmainnet/PendleOracle-PT-clisBNB-25JUN2026_Reference_PtToAsset.json +785 -0
  6. package/deployments/bscmainnet/SolvBTCFundamentalChainlinkOracle.json +658 -0
  7. package/deployments/bscmainnet/SolvBTCFundamentalChainlinkOracle_Implementation.json +743 -0
  8. package/deployments/bscmainnet/SolvBTCFundamentalChainlinkOracle_Proxy.json +262 -0
  9. package/deployments/bscmainnet/SolvBTCOneJumpChainlinkOracle.json +665 -0
  10. package/deployments/bscmainnet/SolvBTCOneJumpFundamentalOracle.json +665 -0
  11. package/deployments/bscmainnet/SolvBTCOneJumpRedStoneOracle.json +665 -0
  12. package/deployments/bscmainnet/solcInputs/fad126030085a626952462c92d5fc265.json +349 -0
  13. package/deployments/bscmainnet.json +10038 -5642
  14. package/deployments/bscmainnet_addresses.json +11 -0
  15. package/deployments/bsctestnet/PendleOracle-PT-clisBNB-25JUN2026.json +785 -0
  16. package/deployments/bsctestnet/solcInputs/b2af75c30578a1eadca811d3d7334646.json +340 -0
  17. package/deployments/bsctestnet.json +504 -0
  18. package/deployments/bsctestnet_addresses.json +1 -0
  19. package/dist/deploy/27-deploy-clisBNB-pendle-oracle.d.ts +4 -0
  20. package/dist/deploy/27-deploy-clisBNB-pendle-oracle.d.ts.map +1 -0
  21. package/dist/deploy/27-deploy-clisBNB-pendle-oracle.js +72 -0
  22. package/dist/deploy/27-deploy-clisBNB-pendle-oracle.js.map +1 -0
  23. package/dist/deploy/28-deploy-atlas-oracle.d.ts +4 -0
  24. package/dist/deploy/28-deploy-atlas-oracle.d.ts.map +1 -0
  25. package/dist/deploy/28-deploy-atlas-oracle.js +44 -0
  26. package/dist/deploy/28-deploy-atlas-oracle.js.map +1 -0
  27. package/dist/deploy/29-deploy-SolvBTC-oracles.d.ts +4 -0
  28. package/dist/deploy/29-deploy-SolvBTC-oracles.d.ts.map +1 -0
  29. package/dist/deploy/29-deploy-SolvBTC-oracles.js +72 -0
  30. package/dist/deploy/29-deploy-SolvBTC-oracles.js.map +1 -0
  31. package/dist/helpers/deploymentConfig.d.ts.map +1 -1
  32. package/dist/helpers/deploymentConfig.js +3 -0
  33. package/dist/helpers/deploymentConfig.js.map +1 -1
  34. package/package.json +1 -1
@@ -0,0 +1,665 @@
1
+ {
2
+ "address": "0x1f785B1AFE0808d69d1188db9e47b7B9Dd95ab09",
3
+ "abi": [
4
+ {
5
+ "inputs": [
6
+ {
7
+ "internalType": "address",
8
+ "name": "correlatedToken",
9
+ "type": "address"
10
+ },
11
+ {
12
+ "internalType": "address",
13
+ "name": "underlyingToken",
14
+ "type": "address"
15
+ },
16
+ {
17
+ "internalType": "address",
18
+ "name": "resilientOracle",
19
+ "type": "address"
20
+ },
21
+ {
22
+ "internalType": "address",
23
+ "name": "intermediateOracle",
24
+ "type": "address"
25
+ },
26
+ {
27
+ "internalType": "uint256",
28
+ "name": "annualGrowthRate",
29
+ "type": "uint256"
30
+ },
31
+ {
32
+ "internalType": "uint256",
33
+ "name": "_snapshotInterval",
34
+ "type": "uint256"
35
+ },
36
+ {
37
+ "internalType": "uint256",
38
+ "name": "initialSnapshotMaxExchangeRate",
39
+ "type": "uint256"
40
+ },
41
+ {
42
+ "internalType": "uint256",
43
+ "name": "initialSnapshotTimestamp",
44
+ "type": "uint256"
45
+ },
46
+ {
47
+ "internalType": "address",
48
+ "name": "accessControlManager",
49
+ "type": "address"
50
+ },
51
+ {
52
+ "internalType": "uint256",
53
+ "name": "_snapshotGap",
54
+ "type": "uint256"
55
+ }
56
+ ],
57
+ "stateMutability": "nonpayable",
58
+ "type": "constructor"
59
+ },
60
+ {
61
+ "inputs": [],
62
+ "name": "InvalidGrowthRate",
63
+ "type": "error"
64
+ },
65
+ {
66
+ "inputs": [],
67
+ "name": "InvalidInitialSnapshot",
68
+ "type": "error"
69
+ },
70
+ {
71
+ "inputs": [],
72
+ "name": "InvalidSnapshotMaxExchangeRate",
73
+ "type": "error"
74
+ },
75
+ {
76
+ "inputs": [],
77
+ "name": "InvalidTokenAddress",
78
+ "type": "error"
79
+ },
80
+ {
81
+ "inputs": [
82
+ {
83
+ "internalType": "address",
84
+ "name": "sender",
85
+ "type": "address"
86
+ },
87
+ {
88
+ "internalType": "address",
89
+ "name": "calledContract",
90
+ "type": "address"
91
+ },
92
+ {
93
+ "internalType": "string",
94
+ "name": "methodSignature",
95
+ "type": "string"
96
+ }
97
+ ],
98
+ "name": "Unauthorized",
99
+ "type": "error"
100
+ },
101
+ {
102
+ "inputs": [],
103
+ "name": "ZeroAddressNotAllowed",
104
+ "type": "error"
105
+ },
106
+ {
107
+ "anonymous": false,
108
+ "inputs": [
109
+ {
110
+ "indexed": true,
111
+ "internalType": "uint256",
112
+ "name": "oldGrowthRatePerSecond",
113
+ "type": "uint256"
114
+ },
115
+ {
116
+ "indexed": true,
117
+ "internalType": "uint256",
118
+ "name": "newGrowthRatePerSecond",
119
+ "type": "uint256"
120
+ },
121
+ {
122
+ "indexed": true,
123
+ "internalType": "uint256",
124
+ "name": "oldSnapshotInterval",
125
+ "type": "uint256"
126
+ },
127
+ {
128
+ "indexed": false,
129
+ "internalType": "uint256",
130
+ "name": "newSnapshotInterval",
131
+ "type": "uint256"
132
+ }
133
+ ],
134
+ "name": "GrowthRateUpdated",
135
+ "type": "event"
136
+ },
137
+ {
138
+ "anonymous": false,
139
+ "inputs": [
140
+ {
141
+ "indexed": true,
142
+ "internalType": "uint256",
143
+ "name": "oldSnapshotGap",
144
+ "type": "uint256"
145
+ },
146
+ {
147
+ "indexed": true,
148
+ "internalType": "uint256",
149
+ "name": "newSnapshotGap",
150
+ "type": "uint256"
151
+ }
152
+ ],
153
+ "name": "SnapshotGapUpdated",
154
+ "type": "event"
155
+ },
156
+ {
157
+ "anonymous": false,
158
+ "inputs": [
159
+ {
160
+ "indexed": true,
161
+ "internalType": "uint256",
162
+ "name": "maxExchangeRate",
163
+ "type": "uint256"
164
+ },
165
+ {
166
+ "indexed": true,
167
+ "internalType": "uint256",
168
+ "name": "timestamp",
169
+ "type": "uint256"
170
+ }
171
+ ],
172
+ "name": "SnapshotUpdated",
173
+ "type": "event"
174
+ },
175
+ {
176
+ "inputs": [],
177
+ "name": "ACCESS_CONTROL_MANAGER",
178
+ "outputs": [
179
+ {
180
+ "internalType": "contract IAccessControlManagerV8",
181
+ "name": "",
182
+ "type": "address"
183
+ }
184
+ ],
185
+ "stateMutability": "view",
186
+ "type": "function"
187
+ },
188
+ {
189
+ "inputs": [],
190
+ "name": "CORRELATED_TOKEN",
191
+ "outputs": [
192
+ {
193
+ "internalType": "address",
194
+ "name": "",
195
+ "type": "address"
196
+ }
197
+ ],
198
+ "stateMutability": "view",
199
+ "type": "function"
200
+ },
201
+ {
202
+ "inputs": [],
203
+ "name": "INTERMEDIATE_ORACLE",
204
+ "outputs": [
205
+ {
206
+ "internalType": "contract OracleInterface",
207
+ "name": "",
208
+ "type": "address"
209
+ }
210
+ ],
211
+ "stateMutability": "view",
212
+ "type": "function"
213
+ },
214
+ {
215
+ "inputs": [],
216
+ "name": "RESILIENT_ORACLE",
217
+ "outputs": [
218
+ {
219
+ "internalType": "contract ResilientOracleInterface",
220
+ "name": "",
221
+ "type": "address"
222
+ }
223
+ ],
224
+ "stateMutability": "view",
225
+ "type": "function"
226
+ },
227
+ {
228
+ "inputs": [],
229
+ "name": "UNDERLYING_TOKEN",
230
+ "outputs": [
231
+ {
232
+ "internalType": "address",
233
+ "name": "",
234
+ "type": "address"
235
+ }
236
+ ],
237
+ "stateMutability": "view",
238
+ "type": "function"
239
+ },
240
+ {
241
+ "inputs": [],
242
+ "name": "getMaxAllowedExchangeRate",
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": "asset",
258
+ "type": "address"
259
+ }
260
+ ],
261
+ "name": "getPrice",
262
+ "outputs": [
263
+ {
264
+ "internalType": "uint256",
265
+ "name": "",
266
+ "type": "uint256"
267
+ }
268
+ ],
269
+ "stateMutability": "view",
270
+ "type": "function"
271
+ },
272
+ {
273
+ "inputs": [],
274
+ "name": "getUnderlyingAmount",
275
+ "outputs": [
276
+ {
277
+ "internalType": "uint256",
278
+ "name": "",
279
+ "type": "uint256"
280
+ }
281
+ ],
282
+ "stateMutability": "view",
283
+ "type": "function"
284
+ },
285
+ {
286
+ "inputs": [],
287
+ "name": "growthRatePerSecond",
288
+ "outputs": [
289
+ {
290
+ "internalType": "uint256",
291
+ "name": "",
292
+ "type": "uint256"
293
+ }
294
+ ],
295
+ "stateMutability": "view",
296
+ "type": "function"
297
+ },
298
+ {
299
+ "inputs": [],
300
+ "name": "isCapped",
301
+ "outputs": [
302
+ {
303
+ "internalType": "bool",
304
+ "name": "",
305
+ "type": "bool"
306
+ }
307
+ ],
308
+ "stateMutability": "view",
309
+ "type": "function"
310
+ },
311
+ {
312
+ "inputs": [
313
+ {
314
+ "internalType": "uint256",
315
+ "name": "_annualGrowthRate",
316
+ "type": "uint256"
317
+ },
318
+ {
319
+ "internalType": "uint256",
320
+ "name": "_snapshotInterval",
321
+ "type": "uint256"
322
+ }
323
+ ],
324
+ "name": "setGrowthRate",
325
+ "outputs": [],
326
+ "stateMutability": "nonpayable",
327
+ "type": "function"
328
+ },
329
+ {
330
+ "inputs": [
331
+ {
332
+ "internalType": "uint256",
333
+ "name": "_snapshotMaxExchangeRate",
334
+ "type": "uint256"
335
+ },
336
+ {
337
+ "internalType": "uint256",
338
+ "name": "_snapshotTimestamp",
339
+ "type": "uint256"
340
+ }
341
+ ],
342
+ "name": "setSnapshot",
343
+ "outputs": [],
344
+ "stateMutability": "nonpayable",
345
+ "type": "function"
346
+ },
347
+ {
348
+ "inputs": [
349
+ {
350
+ "internalType": "uint256",
351
+ "name": "_snapshotGap",
352
+ "type": "uint256"
353
+ }
354
+ ],
355
+ "name": "setSnapshotGap",
356
+ "outputs": [],
357
+ "stateMutability": "nonpayable",
358
+ "type": "function"
359
+ },
360
+ {
361
+ "inputs": [],
362
+ "name": "snapshotGap",
363
+ "outputs": [
364
+ {
365
+ "internalType": "uint256",
366
+ "name": "",
367
+ "type": "uint256"
368
+ }
369
+ ],
370
+ "stateMutability": "view",
371
+ "type": "function"
372
+ },
373
+ {
374
+ "inputs": [],
375
+ "name": "snapshotInterval",
376
+ "outputs": [
377
+ {
378
+ "internalType": "uint256",
379
+ "name": "",
380
+ "type": "uint256"
381
+ }
382
+ ],
383
+ "stateMutability": "view",
384
+ "type": "function"
385
+ },
386
+ {
387
+ "inputs": [],
388
+ "name": "snapshotMaxExchangeRate",
389
+ "outputs": [
390
+ {
391
+ "internalType": "uint256",
392
+ "name": "",
393
+ "type": "uint256"
394
+ }
395
+ ],
396
+ "stateMutability": "view",
397
+ "type": "function"
398
+ },
399
+ {
400
+ "inputs": [],
401
+ "name": "snapshotTimestamp",
402
+ "outputs": [
403
+ {
404
+ "internalType": "uint256",
405
+ "name": "",
406
+ "type": "uint256"
407
+ }
408
+ ],
409
+ "stateMutability": "view",
410
+ "type": "function"
411
+ },
412
+ {
413
+ "inputs": [],
414
+ "name": "updateSnapshot",
415
+ "outputs": [],
416
+ "stateMutability": "nonpayable",
417
+ "type": "function"
418
+ }
419
+ ],
420
+ "transactionHash": "0xa8e5c12e525fcb7ffbefd669a905eaa5d6f53fc3baf9c2e0210a8f1fc052014d",
421
+ "receipt": {
422
+ "to": null,
423
+ "from": "0x14A1c22EF6d2eF6cE33c0b018d8A34D02021e5c8",
424
+ "contractAddress": "0x1f785B1AFE0808d69d1188db9e47b7B9Dd95ab09",
425
+ "transactionIndex": 77,
426
+ "gasUsed": "837130",
427
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
428
+ "blockHash": "0x8d730feb8e60d1a6821751046fb92ffc7af7d8876f97baacc8cd7e5246dc14a1",
429
+ "transactionHash": "0xa8e5c12e525fcb7ffbefd669a905eaa5d6f53fc3baf9c2e0210a8f1fc052014d",
430
+ "logs": [],
431
+ "blockNumber": 92422315,
432
+ "cumulativeGasUsed": "14294331",
433
+ "status": 1,
434
+ "byzantium": true
435
+ },
436
+ "args": [
437
+ "0x4aae823a6a0b376De6A78e74eCC5b079d38cBCf7",
438
+ "0x7130d2A12B9BCbFAe4f2634d864A1Ee1Ce3Ead9c",
439
+ "0x6592b5DE802159F3E74B2486b091D11a8256ab8A",
440
+ "0x4521589226ef07d9805936de42F1ACF394B2B221",
441
+ 0,
442
+ 0,
443
+ 0,
444
+ 0,
445
+ "0x4788629abc6cfca10f9f969efdeaa1cf70c23555",
446
+ 0
447
+ ],
448
+ "numDeployments": 1,
449
+ "solcInputHash": "fad126030085a626952462c92d5fc265",
450
+ "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"correlatedToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"underlyingToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"resilientOracle\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"intermediateOracle\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"annualGrowthRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_snapshotInterval\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"initialSnapshotMaxExchangeRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"initialSnapshotTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"accessControlManager\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_snapshotGap\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"InvalidGrowthRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialSnapshot\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSnapshotMaxExchangeRate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokenAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"calledContract\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"methodSignature\",\"type\":\"string\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldGrowthRatePerSecond\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newGrowthRatePerSecond\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldSnapshotInterval\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newSnapshotInterval\",\"type\":\"uint256\"}],\"name\":\"GrowthRateUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldSnapshotGap\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newSnapshotGap\",\"type\":\"uint256\"}],\"name\":\"SnapshotGapUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"maxExchangeRate\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"SnapshotUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ACCESS_CONTROL_MANAGER\",\"outputs\":[{\"internalType\":\"contract IAccessControlManagerV8\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"CORRELATED_TOKEN\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"INTERMEDIATE_ORACLE\",\"outputs\":[{\"internalType\":\"contract OracleInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RESILIENT_ORACLE\",\"outputs\":[{\"internalType\":\"contract ResilientOracleInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UNDERLYING_TOKEN\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMaxAllowedExchangeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"getPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getUnderlyingAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"growthRatePerSecond\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isCapped\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_annualGrowthRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_snapshotInterval\",\"type\":\"uint256\"}],\"name\":\"setGrowthRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_snapshotMaxExchangeRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_snapshotTimestamp\",\"type\":\"uint256\"}],\"name\":\"setSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_snapshotGap\",\"type\":\"uint256\"}],\"name\":\"setSnapshotGap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"snapshotGap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"snapshotInterval\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"snapshotMaxExchangeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"snapshotTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{\"getMaxAllowedExchangeRate()\":{\"returns\":{\"_0\":\"maxExchangeRate Maximum allowed exchange rate\"}},\"getPrice(address)\":{\"custom:error\":\"InvalidTokenAddress error is thrown if the token address is invalid\",\"params\":{\"asset\":\"Address of the token\"},\"returns\":{\"_0\":\"price The price of the token in scaled decimal places. It can be capped to a maximum value taking into account the growth rate\"}},\"getUnderlyingAmount()\":{\"returns\":{\"_0\":\"amount The amount of the underlying token for 1 correlated token scaled by the underlying token decimals\"}},\"isCapped()\":{\"returns\":{\"_0\":\"isCapped Boolean indicating if the price is capped\"}},\"setGrowthRate(uint256,uint256)\":{\"custom:error\":\"InvalidGrowthRate error is thrown if the growth rate is invalid\",\"custom:event\":\"Emits GrowthRateUpdated event on successful update of the growth rate\",\"params\":{\"_annualGrowthRate\":\"The annual growth rate to set\",\"_snapshotInterval\":\"The snapshot interval to set\"}},\"setSnapshot(uint256,uint256)\":{\"custom:event\":\"Emits SnapshotUpdated event on successful update of the snapshot\",\"params\":{\"_snapshotMaxExchangeRate\":\"The exchange rate to set\",\"_snapshotTimestamp\":\"The timestamp to set\"}},\"setSnapshotGap(uint256)\":{\"custom:event\":\"Emits SnapshotGapUpdated event on successful update of the snapshot gap\",\"params\":{\"_snapshotGap\":\"The snapshot gap to set\"}},\"updateSnapshot()\":{\"custom:error\":\"InvalidSnapshotMaxExchangeRate error is thrown if the max snapshot exchange rate is zero\",\"custom:event\":\"Emits SnapshotUpdated event on successful update of the snapshot\"}},\"title\":\"OneJumpOracle\",\"version\":1},\"userdoc\":{\"errors\":{\"InvalidGrowthRate()\":[{\"notice\":\"Thrown if the growth rate is invalid\"}],\"InvalidInitialSnapshot()\":[{\"notice\":\"Thrown if the initial snapshot is invalid\"}],\"InvalidSnapshotMaxExchangeRate()\":[{\"notice\":\"Thrown if the max snapshot exchange rate is invalid\"}],\"InvalidTokenAddress()\":[{\"notice\":\"Thrown if the token address is invalid\"}],\"Unauthorized(address,address,string)\":[{\"notice\":\"@notice Thrown when the action is prohibited by AccessControlManager\"}],\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"GrowthRateUpdated(uint256,uint256,uint256,uint256)\":{\"notice\":\"Emitted when the growth rate is updated\"},\"SnapshotGapUpdated(uint256,uint256)\":{\"notice\":\"Emitted when the snapshot gap is updated\"},\"SnapshotUpdated(uint256,uint256)\":{\"notice\":\"Emitted when the snapshot is updated\"}},\"kind\":\"user\",\"methods\":{\"ACCESS_CONTROL_MANAGER()\":{\"notice\":\"Address of the AccessControlManager contract\"},\"CORRELATED_TOKEN()\":{\"notice\":\"Address of the correlated token\"},\"INTERMEDIATE_ORACLE()\":{\"notice\":\"Address of the intermediate oracle\"},\"RESILIENT_ORACLE()\":{\"notice\":\"Address of Resilient Oracle\"},\"UNDERLYING_TOKEN()\":{\"notice\":\"Address of the underlying token\"},\"constructor\":{\"notice\":\"Constructor for the implementation contract.\"},\"getMaxAllowedExchangeRate()\":{\"notice\":\"Gets the maximum allowed exchange rate for token\"},\"getPrice(address)\":{\"notice\":\"Fetches the price of the token\"},\"getUnderlyingAmount()\":{\"notice\":\"Fetches the amount of the underlying token for 1 correlated token, using the intermediate oracle\"},\"isCapped()\":{\"notice\":\"Returns if the price is capped\"},\"setGrowthRate(uint256,uint256)\":{\"notice\":\"Sets the growth rate and snapshot interval\"},\"setSnapshot(uint256,uint256)\":{\"notice\":\"Directly sets the snapshot exchange rate and timestamp\"},\"setSnapshotGap(uint256)\":{\"notice\":\"Sets the snapshot gap\"},\"snapshotGap()\":{\"notice\":\"Gap to add when updating the snapshot\"},\"snapshotInterval()\":{\"notice\":\"Snapshot update interval\"},\"snapshotMaxExchangeRate()\":{\"notice\":\"Last stored snapshot maximum exchange rate\"},\"snapshotTimestamp()\":{\"notice\":\"Last stored snapshot timestamp\"},\"updateSnapshot()\":{\"notice\":\"Updates the snapshot price and timestamp\"}},\"notice\":\"This oracle fetches the price of an asset in through an intermediate asset\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/oracles/OneJumpOracle.sol\":\"OneJumpOracle\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\nimport \\\"@openzeppelin/contracts/access/IAccessControl.sol\\\";\\n\\n/**\\n * @title IAccessControlManagerV8\\n * @author Venus\\n * @notice Interface implemented by the `AccessControlManagerV8` contract.\\n */\\ninterface IAccessControlManagerV8 is IAccessControl {\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\\n\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) external;\\n\\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\\n\\n function hasPermission(\\n address account,\\n address contractAddress,\\n string calldata functionSig\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xaa29b098440d0b3a131c5ecdf25ce548790c1b5ac7bf9b5c0264b6af6f7a1e0b\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/constants.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\n/// @dev Base unit for computations, usually used in scaling (multiplications, divisions)\\nuint256 constant EXP_SCALE = 1e18;\\n\\n/// @dev A unit (literal one) in EXP_SCALE, usually used in additions/subtractions\\nuint256 constant MANTISSA_ONE = EXP_SCALE;\\n\\n/// @dev The approximate number of seconds per year\\nuint256 constant SECONDS_PER_YEAR = 31_536_000;\\n\",\"keccak256\":\"0x14de93ead464da249af31bea0e3bcfb62ec693bea3475fb4d90f055ac81dc5eb\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Thrown if the supplied value is 0 where it is not allowed\\nerror ZeroValueNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\\n/// @notice Checks if the provided value is nonzero, reverts otherwise\\n/// @param value_ Value to check\\n/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0\\nfunction ensureNonzeroValue(uint256 value_) pure {\\n if (value_ == 0) {\\n revert ZeroValueNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0xdb88e14d50dd21889ca3329d755673d022c47e8da005b6a545c7f69c2c4b7b86\",\"license\":\"BSD-3-Clause\"},\"contracts/interfaces/ICappedOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\ninterface ICappedOracle {\\n function updateSnapshot() external;\\n}\\n\",\"keccak256\":\"0xad239e65b5e92b3486418c5ccca120247702251f9724cd96657c3cfdc7fedc31\",\"license\":\"BSD-3-Clause\"},\"contracts/interfaces/OracleInterface.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\ninterface OracleInterface {\\n function getPrice(address asset) external view returns (uint256);\\n}\\n\\ninterface ResilientOracleInterface is OracleInterface {\\n function updatePrice(address vToken) external;\\n\\n function updateAssetPrice(address asset) external;\\n\\n function getUnderlyingPrice(address vToken) external view returns (uint256);\\n}\\n\\ninterface BoundValidatorInterface {\\n function validatePriceWithAnchorPrice(\\n address asset,\\n uint256 reporterPrice,\\n uint256 anchorPrice\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xd3bbb7c9eef19e8f467342df6034ef95399a00964646fb8c82b438968ae3a8c0\",\"license\":\"BSD-3-Clause\"},\"contracts/oracles/OneJumpOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport { CorrelatedTokenOracle } from \\\"./common/CorrelatedTokenOracle.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\nimport { OracleInterface } from \\\"../interfaces/OracleInterface.sol\\\";\\nimport { IERC20Metadata } from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\\n/**\\n * @title OneJumpOracle\\n * @author Venus\\n * @notice This oracle fetches the price of an asset in through an intermediate asset\\n */\\ncontract OneJumpOracle is CorrelatedTokenOracle {\\n /// @notice Address of the intermediate oracle\\n OracleInterface public immutable INTERMEDIATE_ORACLE;\\n\\n /// @notice Constructor for the implementation contract.\\n constructor(\\n address correlatedToken,\\n address underlyingToken,\\n address resilientOracle,\\n address intermediateOracle,\\n uint256 annualGrowthRate,\\n uint256 _snapshotInterval,\\n uint256 initialSnapshotMaxExchangeRate,\\n uint256 initialSnapshotTimestamp,\\n address accessControlManager,\\n uint256 _snapshotGap\\n )\\n CorrelatedTokenOracle(\\n correlatedToken,\\n underlyingToken,\\n resilientOracle,\\n annualGrowthRate,\\n _snapshotInterval,\\n initialSnapshotMaxExchangeRate,\\n initialSnapshotTimestamp,\\n accessControlManager,\\n _snapshotGap\\n )\\n {\\n ensureNonzeroAddress(intermediateOracle);\\n INTERMEDIATE_ORACLE = OracleInterface(intermediateOracle);\\n }\\n\\n /**\\n * @notice Fetches the amount of the underlying token for 1 correlated token, using the intermediate oracle\\n * @return amount The amount of the underlying token for 1 correlated token scaled by the underlying token decimals\\n */\\n function getUnderlyingAmount() public view override returns (uint256) {\\n uint256 underlyingDecimals = IERC20Metadata(UNDERLYING_TOKEN).decimals();\\n uint256 correlatedDecimals = IERC20Metadata(CORRELATED_TOKEN).decimals();\\n\\n uint256 underlyingAmount = INTERMEDIATE_ORACLE.getPrice(CORRELATED_TOKEN);\\n\\n return (underlyingAmount * (10 ** correlatedDecimals)) / (10 ** (36 - underlyingDecimals));\\n }\\n}\\n\",\"keccak256\":\"0xa08f479bef67278c8b7a32cdf49691b76ed64c9f29c7dbd3435bd1a964f6b4ac\",\"license\":\"BSD-3-Clause\"},\"contracts/oracles/common/CorrelatedTokenOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport { OracleInterface, ResilientOracleInterface } from \\\"../../interfaces/OracleInterface.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\nimport { SECONDS_PER_YEAR } from \\\"@venusprotocol/solidity-utilities/contracts/constants.sol\\\";\\nimport { IERC20Metadata } from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\nimport { ICappedOracle } from \\\"../../interfaces/ICappedOracle.sol\\\";\\nimport { IAccessControlManagerV8 } from \\\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\\\";\\n\\n/**\\n * @title CorrelatedTokenOracle\\n * @notice This oracle fetches the price of a token that is correlated to another token.\\n */\\nabstract contract CorrelatedTokenOracle is OracleInterface, ICappedOracle {\\n /// @notice Address of the correlated token\\n address public immutable CORRELATED_TOKEN;\\n\\n /// @notice Address of the underlying token\\n address public immutable UNDERLYING_TOKEN;\\n\\n /// @notice Address of Resilient Oracle\\n ResilientOracleInterface public immutable RESILIENT_ORACLE;\\n\\n /// @notice Address of the AccessControlManager contract\\n IAccessControlManagerV8 public immutable ACCESS_CONTROL_MANAGER;\\n\\n //// @notice Growth rate percentage in seconds. Ex: 1e18 is 100%\\n uint256 public growthRatePerSecond;\\n\\n /// @notice Snapshot update interval\\n uint256 public snapshotInterval;\\n\\n /// @notice Last stored snapshot maximum exchange rate\\n uint256 public snapshotMaxExchangeRate;\\n\\n /// @notice Last stored snapshot timestamp\\n uint256 public snapshotTimestamp;\\n\\n /// @notice Gap to add when updating the snapshot\\n uint256 public snapshotGap;\\n\\n /// @notice Emitted when the snapshot is updated\\n event SnapshotUpdated(uint256 indexed maxExchangeRate, uint256 indexed timestamp);\\n\\n /// @notice Emitted when the growth rate is updated\\n event GrowthRateUpdated(\\n uint256 indexed oldGrowthRatePerSecond,\\n uint256 indexed newGrowthRatePerSecond,\\n uint256 indexed oldSnapshotInterval,\\n uint256 newSnapshotInterval\\n );\\n\\n /// @notice Emitted when the snapshot gap is updated\\n event SnapshotGapUpdated(uint256 indexed oldSnapshotGap, uint256 indexed newSnapshotGap);\\n\\n /// @notice Thrown if the token address is invalid\\n error InvalidTokenAddress();\\n\\n /// @notice Thrown if the growth rate is invalid\\n error InvalidGrowthRate();\\n\\n /// @notice Thrown if the initial snapshot is invalid\\n error InvalidInitialSnapshot();\\n\\n /// @notice Thrown if the max snapshot exchange rate is invalid\\n error InvalidSnapshotMaxExchangeRate();\\n\\n /// @notice @notice Thrown when the action is prohibited by AccessControlManager\\n error Unauthorized(address sender, address calledContract, string methodSignature);\\n\\n /**\\n * @notice Constructor for the implementation contract.\\n * @custom:error InvalidGrowthRate error is thrown if the growth rate is invalid\\n * @custom:error InvalidInitialSnapshot error is thrown if the initial snapshot values are invalid\\n */\\n constructor(\\n address _correlatedToken,\\n address _underlyingToken,\\n address _resilientOracle,\\n uint256 _annualGrowthRate,\\n uint256 _snapshotInterval,\\n uint256 _initialSnapshotMaxExchangeRate,\\n uint256 _initialSnapshotTimestamp,\\n address _accessControlManager,\\n uint256 _snapshotGap\\n ) {\\n growthRatePerSecond = _annualGrowthRate / SECONDS_PER_YEAR;\\n\\n if ((growthRatePerSecond == 0 && _snapshotInterval > 0) || (growthRatePerSecond > 0 && _snapshotInterval == 0))\\n revert InvalidGrowthRate();\\n\\n if ((_initialSnapshotMaxExchangeRate == 0 || _initialSnapshotTimestamp == 0) && _snapshotInterval > 0) {\\n revert InvalidInitialSnapshot();\\n }\\n\\n ensureNonzeroAddress(_correlatedToken);\\n ensureNonzeroAddress(_underlyingToken);\\n ensureNonzeroAddress(_resilientOracle);\\n ensureNonzeroAddress(_accessControlManager);\\n\\n CORRELATED_TOKEN = _correlatedToken;\\n UNDERLYING_TOKEN = _underlyingToken;\\n RESILIENT_ORACLE = ResilientOracleInterface(_resilientOracle);\\n snapshotInterval = _snapshotInterval;\\n\\n snapshotMaxExchangeRate = _initialSnapshotMaxExchangeRate;\\n snapshotTimestamp = _initialSnapshotTimestamp;\\n snapshotGap = _snapshotGap;\\n\\n ACCESS_CONTROL_MANAGER = IAccessControlManagerV8(_accessControlManager);\\n }\\n\\n /**\\n * @notice Directly sets the snapshot exchange rate and timestamp\\n * @param _snapshotMaxExchangeRate The exchange rate to set\\n * @param _snapshotTimestamp The timestamp to set\\n * @custom:event Emits SnapshotUpdated event on successful update of the snapshot\\n */\\n function setSnapshot(uint256 _snapshotMaxExchangeRate, uint256 _snapshotTimestamp) external {\\n _checkAccessAllowed(\\\"setSnapshot(uint256,uint256)\\\");\\n\\n snapshotMaxExchangeRate = _snapshotMaxExchangeRate;\\n snapshotTimestamp = _snapshotTimestamp;\\n\\n emit SnapshotUpdated(snapshotMaxExchangeRate, snapshotTimestamp);\\n }\\n\\n /**\\n * @notice Sets the growth rate and snapshot interval\\n * @param _annualGrowthRate The annual growth rate to set\\n * @param _snapshotInterval The snapshot interval to set\\n * @custom:error InvalidGrowthRate error is thrown if the growth rate is invalid\\n * @custom:event Emits GrowthRateUpdated event on successful update of the growth rate\\n */\\n function setGrowthRate(uint256 _annualGrowthRate, uint256 _snapshotInterval) external {\\n _checkAccessAllowed(\\\"setGrowthRate(uint256,uint256)\\\");\\n uint256 oldGrowthRatePerSecond = growthRatePerSecond;\\n\\n growthRatePerSecond = _annualGrowthRate / SECONDS_PER_YEAR;\\n\\n if ((growthRatePerSecond == 0 && _snapshotInterval > 0) || (growthRatePerSecond > 0 && _snapshotInterval == 0))\\n revert InvalidGrowthRate();\\n\\n emit GrowthRateUpdated(oldGrowthRatePerSecond, growthRatePerSecond, snapshotInterval, _snapshotInterval);\\n\\n snapshotInterval = _snapshotInterval;\\n }\\n\\n /**\\n * @notice Sets the snapshot gap\\n * @param _snapshotGap The snapshot gap to set\\n * @custom:event Emits SnapshotGapUpdated event on successful update of the snapshot gap\\n */\\n function setSnapshotGap(uint256 _snapshotGap) external {\\n _checkAccessAllowed(\\\"setSnapshotGap(uint256)\\\");\\n\\n emit SnapshotGapUpdated(snapshotGap, _snapshotGap);\\n\\n snapshotGap = _snapshotGap;\\n }\\n\\n /**\\n * @notice Returns if the price is capped\\n * @return isCapped Boolean indicating if the price is capped\\n */\\n function isCapped() external view virtual returns (bool) {\\n if (snapshotInterval == 0) {\\n return false;\\n }\\n\\n uint256 maxAllowedExchangeRate = getMaxAllowedExchangeRate();\\n if (maxAllowedExchangeRate == 0) {\\n return false;\\n }\\n\\n uint256 exchangeRate = getUnderlyingAmount();\\n\\n return exchangeRate > maxAllowedExchangeRate;\\n }\\n\\n /**\\n * @notice Updates the snapshot price and timestamp\\n * @custom:event Emits SnapshotUpdated event on successful update of the snapshot\\n * @custom:error InvalidSnapshotMaxExchangeRate error is thrown if the max snapshot exchange rate is zero\\n */\\n function updateSnapshot() public override {\\n if (block.timestamp - snapshotTimestamp < snapshotInterval || snapshotInterval == 0) return;\\n\\n uint256 exchangeRate = getUnderlyingAmount();\\n uint256 maxAllowedExchangeRate = getMaxAllowedExchangeRate();\\n\\n snapshotMaxExchangeRate =\\n (exchangeRate > maxAllowedExchangeRate ? maxAllowedExchangeRate : exchangeRate) +\\n snapshotGap;\\n snapshotTimestamp = block.timestamp;\\n\\n if (snapshotMaxExchangeRate == 0) revert InvalidSnapshotMaxExchangeRate();\\n\\n RESILIENT_ORACLE.updateAssetPrice(UNDERLYING_TOKEN);\\n emit SnapshotUpdated(snapshotMaxExchangeRate, snapshotTimestamp);\\n }\\n\\n /**\\n * @notice Fetches the price of the token\\n * @param asset Address of the token\\n * @return price The price of the token in scaled decimal places. It can be capped\\n * to a maximum value taking into account the growth rate\\n * @custom:error InvalidTokenAddress error is thrown if the token address is invalid\\n */\\n function getPrice(address asset) public view override returns (uint256) {\\n if (asset != CORRELATED_TOKEN) revert InvalidTokenAddress();\\n\\n uint256 exchangeRate = getUnderlyingAmount();\\n\\n if (snapshotInterval == 0) {\\n return _calculatePrice(exchangeRate);\\n }\\n\\n uint256 maxAllowedExchangeRate = getMaxAllowedExchangeRate();\\n\\n uint256 finalExchangeRate = (exchangeRate > maxAllowedExchangeRate && maxAllowedExchangeRate != 0)\\n ? maxAllowedExchangeRate\\n : exchangeRate;\\n\\n return _calculatePrice(finalExchangeRate);\\n }\\n\\n /**\\n * @notice Gets the maximum allowed exchange rate for token\\n * @return maxExchangeRate Maximum allowed exchange rate\\n */\\n function getMaxAllowedExchangeRate() public view returns (uint256) {\\n uint256 timeElapsed = block.timestamp - snapshotTimestamp;\\n uint256 maxExchangeRate = snapshotMaxExchangeRate +\\n (snapshotMaxExchangeRate * growthRatePerSecond * timeElapsed) /\\n 1e18;\\n return maxExchangeRate;\\n }\\n\\n /**\\n * @notice Gets the underlying amount for correlated token\\n * @return underlyingAmount Amount of underlying token\\n */\\n function getUnderlyingAmount() public view virtual returns (uint256);\\n\\n /**\\n * @notice Fetches price of the token based on an underlying exchange rate\\n * @param exchangeRate The underlying exchange rate to use\\n * @return price The price of the token in scaled decimal places\\n */\\n function _calculatePrice(uint256 exchangeRate) internal view returns (uint256) {\\n uint256 underlyingUSDPrice = RESILIENT_ORACLE.getPrice(UNDERLYING_TOKEN);\\n\\n IERC20Metadata token = IERC20Metadata(CORRELATED_TOKEN);\\n uint256 decimals = token.decimals();\\n\\n return (exchangeRate * underlyingUSDPrice) / (10 ** decimals);\\n }\\n\\n /**\\n * @notice Reverts if the call is not allowed by AccessControlManager\\n * @param signature Method signature\\n * @custom:error Unauthorized error is thrown if the call is not allowed\\n */\\n function _checkAccessAllowed(string memory signature) internal view {\\n bool isAllowedToCall = ACCESS_CONTROL_MANAGER.isAllowedToCall(msg.sender, signature);\\n\\n if (!isAllowedToCall) {\\n revert Unauthorized(msg.sender, address(this), signature);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x808b444fa4d1d440dc43de290f1eb59a64646ce9085028b286fa30346305872e\",\"license\":\"BSD-3-Clause\"}},\"version\":1}",
451
+ "bytecode": "0x610120604052348015610010575f80fd5b5060405161108538038061108583398101604081905261002f9161017d565b8989898888888888886100466301e133808761020e565b5f81905515801561005657505f85115b8061006a57505f805411801561006a575084155b15610088576040516353b7e64560e11b815260040160405180910390fd5b831580610093575082155b801561009e57505f85115b156100bc5760405163b8a5589b60e01b815260040160405180910390fd5b6100c589610138565b6100ce88610138565b6100d787610138565b6100e082610138565b6001600160a01b0398891660805296881660a05294871660c052600192909255600255600355506004919091551660e05261011a87610138565b5050506001600160a01b03909316610100525061022d945050505050565b6001600160a01b03811661015f576040516342bcdf7f60e11b815260040160405180910390fd5b50565b80516001600160a01b0381168114610178575f80fd5b919050565b5f805f805f805f805f806101408b8d031215610197575f80fd5b6101a08b610162565b99506101ae60208c01610162565b98506101bc60408c01610162565b97506101ca60608c01610162565b965060808b0151955060a08b0151945060c08b0151935060e08b015192506101f56101008c01610162565b91506101208b015190509295989b9194979a5092959850565b5f8261022857634e487b7160e01b5f52601260045260245ffd5b500490565b60805160a05160c05160e05161010051610dce6102b75f395f818161028b01526107f201525f81816101910152610a5701525f818161024c0152818161059c015261092a01525f818161013601528181610574015281816106a501526108fe01525f8181610209015281816102b00152818161072b015281816107c001526109980152610dce5ff3fe608060405234801561000f575f80fd5b5060043610610111575f3560e01c8063692404261161009e578063a4edcd4c1161006e578063a4edcd4c14610247578063abb856131461026e578063ac5a693e14610276578063bdf13af21461027e578063ef4fa51b14610286575f80fd5b806369240426146101fc57806369818a35146102045780637fc4e4a01461022b5780639c43eb541461023e575f80fd5b806345be2dc7116100e457806345be2dc71461018c5780635213f9c8146101b3578063596efe6f146101c8578063643d813d146101d1578063671528d4146101e4575f80fd5b806307d0413c1461011557806329db1be6146101315780634169d2451461017057806341976e0914610179575b5f80fd5b61011e60015481565b6040519081526020015b60405180910390f35b6101587f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610128565b61011e60045481565b61011e610187366004610b00565b6102ad565b6101587f000000000000000000000000000000000000000000000000000000000000000081565b6101c66101c1366004610b26565b61035e565b005b61011e60025481565b6101c66101df366004610b3d565b6103cf565b6101ec6104a5565b6040519015158152602001610128565b6101c66104e0565b6101587f000000000000000000000000000000000000000000000000000000000000000081565b6101c6610239366004610b3d565b610629565b61011e60035481565b6101587f000000000000000000000000000000000000000000000000000000000000000081565b61011e6106a1565b61011e5f5481565b61011e61089a565b6101587f000000000000000000000000000000000000000000000000000000000000000081565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161461030057604051630f58058360e11b815260040160405180910390fd5b5f6103096106a1565b90506001545f036103245761031d816108e7565b9392505050565b5f61032d61089a565b90505f818311801561033e57508115155b610348578261034a565b815b9050610355816108e7565b95945050505050565b61039c6040518060400160405280601781526020017f736574536e617073686f744761702875696e7432353629000000000000000000815250610a3e565b6004546040518291907feb3716d3f8388c182853c1dc98b18931f3a600bbab31f2ff48631f6412e4997f905f90a3600455565b61040d6040518060400160405280601e81526020017f73657447726f777468526174652875696e743235362c75696e74323536290000815250610a3e565b5f5461041d6301e1338084610b71565b5f81905515801561042d57505f82115b8061044157505f8054118015610441575081155b1561045f576040516353b7e64560e11b815260040160405180910390fd5b6001545f54827fa65cbeb0e28a8803a912daac67c472c160aa01e2c988755fa424f290321de6088560405161049691815260200190565b60405180910390a45060015550565b5f6001545f036104b457505f90565b5f6104bd61089a565b9050805f036104cd575f91505090565b5f6104d66106a1565b9190911192915050565b6001546003546104f09042610b90565b10806104fc5750600154155b1561050357565b5f61050c6106a1565b90505f61051761089a565b9050600454818311610529578261052b565b815b6105359190610ba9565b6002819055426003555f0361055d57604051635f18388760e01b815260040160405180910390fd5b60405163b62cad6960e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063b62cad69906024015f604051808303815f87803b1580156105dd575f80fd5b505af11580156105ef573d5f803e3d5ffd5b505050506003546002547f2c8c8fcb8c77a0ca21dcc3ab8fc0ade761557e76b1240cb40ebbef9fcee00f7d60405160405180910390a35050565b6106676040518060400160405280601c81526020017f736574536e617073686f742875696e743235362c75696e743235362900000000815250610a3e565b60028290556003819055604051819083907f2c8c8fcb8c77a0ca21dcc3ab8fc0ade761557e76b1240cb40ebbef9fcee00f7d905f90a35050565b5f807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106ff573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107239190610bbc565b60ff1690505f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610785573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107a99190610bbc565b6040516341976e0960e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015260ff9290921692505f917f000000000000000000000000000000000000000000000000000000000000000016906341976e0990602401602060405180830381865afa158015610837573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061085b9190610bdc565b9050610868836024610b90565b61087390600a610cd3565b61087e83600a610cd3565b6108889083610cde565b6108929190610b71565b935050505090565b5f80600354426108aa9190610b90565b90505f670de0b6b3a7640000825f546002546108c69190610cde565b6108d09190610cde565b6108da9190610b71565b60025461031d9190610ba9565b6040516341976e0960e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301525f9182917f000000000000000000000000000000000000000000000000000000000000000016906341976e0990602401602060405180830381865afa15801561096f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109939190610bdc565b90505f7f000000000000000000000000000000000000000000000000000000000000000090505f816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109f6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a1a9190610bbc565b60ff169050610a2a81600a610cd3565b610a348487610cde565b6103559190610b71565b6040516318c5e8ab60e01b81525f906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906318c5e8ab90610a8e9033908690600401610d23565b602060405180830381865afa158015610aa9573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610acd9190610d4e565b905080610afc57333083604051634a3fa29360e01b8152600401610af393929190610d6d565b60405180910390fd5b5050565b5f60208284031215610b10575f80fd5b81356001600160a01b038116811461031d575f80fd5b5f60208284031215610b36575f80fd5b5035919050565b5f8060408385031215610b4e575f80fd5b50508035926020909101359150565b634e487b7160e01b5f52601160045260245ffd5b5f82610b8b57634e487b7160e01b5f52601260045260245ffd5b500490565b81810381811115610ba357610ba3610b5d565b92915050565b80820180821115610ba357610ba3610b5d565b5f60208284031215610bcc575f80fd5b815160ff8116811461031d575f80fd5b5f60208284031215610bec575f80fd5b5051919050565b600181815b80851115610c2d57815f1904821115610c1357610c13610b5d565b80851615610c2057918102915b93841c9390800290610bf8565b509250929050565b5f82610c4357506001610ba3565b81610c4f57505f610ba3565b8160018114610c655760028114610c6f57610c8b565b6001915050610ba3565b60ff841115610c8057610c80610b5d565b50506001821b610ba3565b5060208310610133831016604e8410600b8410161715610cae575081810a610ba3565b610cb88383610bf3565b805f1904821115610ccb57610ccb610b5d565b029392505050565b5f61031d8383610c35565b8082028115828204841417610ba357610ba3610b5d565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6001600160a01b03831681526040602082018190525f90610d4690830184610cf5565b949350505050565b5f60208284031215610d5e575f80fd5b8151801515811461031d575f80fd5b6001600160a01b038481168252831660208201526060604082018190525f9061035590830184610cf556fea264697066735822122057dc71c01a42ea6e734ad67ef8afa39d0d746c0cd6b90ea6f845bc4e46b319b764736f6c63430008190033",
452
+ "deployedBytecode": "0x608060405234801561000f575f80fd5b5060043610610111575f3560e01c8063692404261161009e578063a4edcd4c1161006e578063a4edcd4c14610247578063abb856131461026e578063ac5a693e14610276578063bdf13af21461027e578063ef4fa51b14610286575f80fd5b806369240426146101fc57806369818a35146102045780637fc4e4a01461022b5780639c43eb541461023e575f80fd5b806345be2dc7116100e457806345be2dc71461018c5780635213f9c8146101b3578063596efe6f146101c8578063643d813d146101d1578063671528d4146101e4575f80fd5b806307d0413c1461011557806329db1be6146101315780634169d2451461017057806341976e0914610179575b5f80fd5b61011e60015481565b6040519081526020015b60405180910390f35b6101587f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610128565b61011e60045481565b61011e610187366004610b00565b6102ad565b6101587f000000000000000000000000000000000000000000000000000000000000000081565b6101c66101c1366004610b26565b61035e565b005b61011e60025481565b6101c66101df366004610b3d565b6103cf565b6101ec6104a5565b6040519015158152602001610128565b6101c66104e0565b6101587f000000000000000000000000000000000000000000000000000000000000000081565b6101c6610239366004610b3d565b610629565b61011e60035481565b6101587f000000000000000000000000000000000000000000000000000000000000000081565b61011e6106a1565b61011e5f5481565b61011e61089a565b6101587f000000000000000000000000000000000000000000000000000000000000000081565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161461030057604051630f58058360e11b815260040160405180910390fd5b5f6103096106a1565b90506001545f036103245761031d816108e7565b9392505050565b5f61032d61089a565b90505f818311801561033e57508115155b610348578261034a565b815b9050610355816108e7565b95945050505050565b61039c6040518060400160405280601781526020017f736574536e617073686f744761702875696e7432353629000000000000000000815250610a3e565b6004546040518291907feb3716d3f8388c182853c1dc98b18931f3a600bbab31f2ff48631f6412e4997f905f90a3600455565b61040d6040518060400160405280601e81526020017f73657447726f777468526174652875696e743235362c75696e74323536290000815250610a3e565b5f5461041d6301e1338084610b71565b5f81905515801561042d57505f82115b8061044157505f8054118015610441575081155b1561045f576040516353b7e64560e11b815260040160405180910390fd5b6001545f54827fa65cbeb0e28a8803a912daac67c472c160aa01e2c988755fa424f290321de6088560405161049691815260200190565b60405180910390a45060015550565b5f6001545f036104b457505f90565b5f6104bd61089a565b9050805f036104cd575f91505090565b5f6104d66106a1565b9190911192915050565b6001546003546104f09042610b90565b10806104fc5750600154155b1561050357565b5f61050c6106a1565b90505f61051761089a565b9050600454818311610529578261052b565b815b6105359190610ba9565b6002819055426003555f0361055d57604051635f18388760e01b815260040160405180910390fd5b60405163b62cad6960e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063b62cad69906024015f604051808303815f87803b1580156105dd575f80fd5b505af11580156105ef573d5f803e3d5ffd5b505050506003546002547f2c8c8fcb8c77a0ca21dcc3ab8fc0ade761557e76b1240cb40ebbef9fcee00f7d60405160405180910390a35050565b6106676040518060400160405280601c81526020017f736574536e617073686f742875696e743235362c75696e743235362900000000815250610a3e565b60028290556003819055604051819083907f2c8c8fcb8c77a0ca21dcc3ab8fc0ade761557e76b1240cb40ebbef9fcee00f7d905f90a35050565b5f807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106ff573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107239190610bbc565b60ff1690505f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610785573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107a99190610bbc565b6040516341976e0960e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015260ff9290921692505f917f000000000000000000000000000000000000000000000000000000000000000016906341976e0990602401602060405180830381865afa158015610837573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061085b9190610bdc565b9050610868836024610b90565b61087390600a610cd3565b61087e83600a610cd3565b6108889083610cde565b6108929190610b71565b935050505090565b5f80600354426108aa9190610b90565b90505f670de0b6b3a7640000825f546002546108c69190610cde565b6108d09190610cde565b6108da9190610b71565b60025461031d9190610ba9565b6040516341976e0960e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301525f9182917f000000000000000000000000000000000000000000000000000000000000000016906341976e0990602401602060405180830381865afa15801561096f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109939190610bdc565b90505f7f000000000000000000000000000000000000000000000000000000000000000090505f816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109f6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a1a9190610bbc565b60ff169050610a2a81600a610cd3565b610a348487610cde565b6103559190610b71565b6040516318c5e8ab60e01b81525f906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906318c5e8ab90610a8e9033908690600401610d23565b602060405180830381865afa158015610aa9573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610acd9190610d4e565b905080610afc57333083604051634a3fa29360e01b8152600401610af393929190610d6d565b60405180910390fd5b5050565b5f60208284031215610b10575f80fd5b81356001600160a01b038116811461031d575f80fd5b5f60208284031215610b36575f80fd5b5035919050565b5f8060408385031215610b4e575f80fd5b50508035926020909101359150565b634e487b7160e01b5f52601160045260245ffd5b5f82610b8b57634e487b7160e01b5f52601260045260245ffd5b500490565b81810381811115610ba357610ba3610b5d565b92915050565b80820180821115610ba357610ba3610b5d565b5f60208284031215610bcc575f80fd5b815160ff8116811461031d575f80fd5b5f60208284031215610bec575f80fd5b5051919050565b600181815b80851115610c2d57815f1904821115610c1357610c13610b5d565b80851615610c2057918102915b93841c9390800290610bf8565b509250929050565b5f82610c4357506001610ba3565b81610c4f57505f610ba3565b8160018114610c655760028114610c6f57610c8b565b6001915050610ba3565b60ff841115610c8057610c80610b5d565b50506001821b610ba3565b5060208310610133831016604e8410600b8410161715610cae575081810a610ba3565b610cb88383610bf3565b805f1904821115610ccb57610ccb610b5d565b029392505050565b5f61031d8383610c35565b8082028115828204841417610ba357610ba3610b5d565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6001600160a01b03831681526040602082018190525f90610d4690830184610cf5565b949350505050565b5f60208284031215610d5e575f80fd5b8151801515811461031d575f80fd5b6001600160a01b038481168252831660208201526060604082018190525f9061035590830184610cf556fea264697066735822122057dc71c01a42ea6e734ad67ef8afa39d0d746c0cd6b90ea6f845bc4e46b319b764736f6c63430008190033",
453
+ "devdoc": {
454
+ "author": "Venus",
455
+ "kind": "dev",
456
+ "methods": {
457
+ "getMaxAllowedExchangeRate()": {
458
+ "returns": {
459
+ "_0": "maxExchangeRate Maximum allowed exchange rate"
460
+ }
461
+ },
462
+ "getPrice(address)": {
463
+ "custom:error": "InvalidTokenAddress error is thrown if the token address is invalid",
464
+ "params": {
465
+ "asset": "Address of the token"
466
+ },
467
+ "returns": {
468
+ "_0": "price The price of the token in scaled decimal places. It can be capped to a maximum value taking into account the growth rate"
469
+ }
470
+ },
471
+ "getUnderlyingAmount()": {
472
+ "returns": {
473
+ "_0": "amount The amount of the underlying token for 1 correlated token scaled by the underlying token decimals"
474
+ }
475
+ },
476
+ "isCapped()": {
477
+ "returns": {
478
+ "_0": "isCapped Boolean indicating if the price is capped"
479
+ }
480
+ },
481
+ "setGrowthRate(uint256,uint256)": {
482
+ "custom:error": "InvalidGrowthRate error is thrown if the growth rate is invalid",
483
+ "custom:event": "Emits GrowthRateUpdated event on successful update of the growth rate",
484
+ "params": {
485
+ "_annualGrowthRate": "The annual growth rate to set",
486
+ "_snapshotInterval": "The snapshot interval to set"
487
+ }
488
+ },
489
+ "setSnapshot(uint256,uint256)": {
490
+ "custom:event": "Emits SnapshotUpdated event on successful update of the snapshot",
491
+ "params": {
492
+ "_snapshotMaxExchangeRate": "The exchange rate to set",
493
+ "_snapshotTimestamp": "The timestamp to set"
494
+ }
495
+ },
496
+ "setSnapshotGap(uint256)": {
497
+ "custom:event": "Emits SnapshotGapUpdated event on successful update of the snapshot gap",
498
+ "params": {
499
+ "_snapshotGap": "The snapshot gap to set"
500
+ }
501
+ },
502
+ "updateSnapshot()": {
503
+ "custom:error": "InvalidSnapshotMaxExchangeRate error is thrown if the max snapshot exchange rate is zero",
504
+ "custom:event": "Emits SnapshotUpdated event on successful update of the snapshot"
505
+ }
506
+ },
507
+ "title": "OneJumpOracle",
508
+ "version": 1
509
+ },
510
+ "userdoc": {
511
+ "errors": {
512
+ "InvalidGrowthRate()": [
513
+ {
514
+ "notice": "Thrown if the growth rate is invalid"
515
+ }
516
+ ],
517
+ "InvalidInitialSnapshot()": [
518
+ {
519
+ "notice": "Thrown if the initial snapshot is invalid"
520
+ }
521
+ ],
522
+ "InvalidSnapshotMaxExchangeRate()": [
523
+ {
524
+ "notice": "Thrown if the max snapshot exchange rate is invalid"
525
+ }
526
+ ],
527
+ "InvalidTokenAddress()": [
528
+ {
529
+ "notice": "Thrown if the token address is invalid"
530
+ }
531
+ ],
532
+ "Unauthorized(address,address,string)": [
533
+ {
534
+ "notice": "@notice Thrown when the action is prohibited by AccessControlManager"
535
+ }
536
+ ],
537
+ "ZeroAddressNotAllowed()": [
538
+ {
539
+ "notice": "Thrown if the supplied address is a zero address where it is not allowed"
540
+ }
541
+ ]
542
+ },
543
+ "events": {
544
+ "GrowthRateUpdated(uint256,uint256,uint256,uint256)": {
545
+ "notice": "Emitted when the growth rate is updated"
546
+ },
547
+ "SnapshotGapUpdated(uint256,uint256)": {
548
+ "notice": "Emitted when the snapshot gap is updated"
549
+ },
550
+ "SnapshotUpdated(uint256,uint256)": {
551
+ "notice": "Emitted when the snapshot is updated"
552
+ }
553
+ },
554
+ "kind": "user",
555
+ "methods": {
556
+ "ACCESS_CONTROL_MANAGER()": {
557
+ "notice": "Address of the AccessControlManager contract"
558
+ },
559
+ "CORRELATED_TOKEN()": {
560
+ "notice": "Address of the correlated token"
561
+ },
562
+ "INTERMEDIATE_ORACLE()": {
563
+ "notice": "Address of the intermediate oracle"
564
+ },
565
+ "RESILIENT_ORACLE()": {
566
+ "notice": "Address of Resilient Oracle"
567
+ },
568
+ "UNDERLYING_TOKEN()": {
569
+ "notice": "Address of the underlying token"
570
+ },
571
+ "constructor": {
572
+ "notice": "Constructor for the implementation contract."
573
+ },
574
+ "getMaxAllowedExchangeRate()": {
575
+ "notice": "Gets the maximum allowed exchange rate for token"
576
+ },
577
+ "getPrice(address)": {
578
+ "notice": "Fetches the price of the token"
579
+ },
580
+ "getUnderlyingAmount()": {
581
+ "notice": "Fetches the amount of the underlying token for 1 correlated token, using the intermediate oracle"
582
+ },
583
+ "isCapped()": {
584
+ "notice": "Returns if the price is capped"
585
+ },
586
+ "setGrowthRate(uint256,uint256)": {
587
+ "notice": "Sets the growth rate and snapshot interval"
588
+ },
589
+ "setSnapshot(uint256,uint256)": {
590
+ "notice": "Directly sets the snapshot exchange rate and timestamp"
591
+ },
592
+ "setSnapshotGap(uint256)": {
593
+ "notice": "Sets the snapshot gap"
594
+ },
595
+ "snapshotGap()": {
596
+ "notice": "Gap to add when updating the snapshot"
597
+ },
598
+ "snapshotInterval()": {
599
+ "notice": "Snapshot update interval"
600
+ },
601
+ "snapshotMaxExchangeRate()": {
602
+ "notice": "Last stored snapshot maximum exchange rate"
603
+ },
604
+ "snapshotTimestamp()": {
605
+ "notice": "Last stored snapshot timestamp"
606
+ },
607
+ "updateSnapshot()": {
608
+ "notice": "Updates the snapshot price and timestamp"
609
+ }
610
+ },
611
+ "notice": "This oracle fetches the price of an asset in through an intermediate asset",
612
+ "version": 1
613
+ },
614
+ "storageLayout": {
615
+ "storage": [
616
+ {
617
+ "astId": 8908,
618
+ "contract": "contracts/oracles/OneJumpOracle.sol:OneJumpOracle",
619
+ "label": "growthRatePerSecond",
620
+ "offset": 0,
621
+ "slot": "0",
622
+ "type": "t_uint256"
623
+ },
624
+ {
625
+ "astId": 8911,
626
+ "contract": "contracts/oracles/OneJumpOracle.sol:OneJumpOracle",
627
+ "label": "snapshotInterval",
628
+ "offset": 0,
629
+ "slot": "1",
630
+ "type": "t_uint256"
631
+ },
632
+ {
633
+ "astId": 8914,
634
+ "contract": "contracts/oracles/OneJumpOracle.sol:OneJumpOracle",
635
+ "label": "snapshotMaxExchangeRate",
636
+ "offset": 0,
637
+ "slot": "2",
638
+ "type": "t_uint256"
639
+ },
640
+ {
641
+ "astId": 8917,
642
+ "contract": "contracts/oracles/OneJumpOracle.sol:OneJumpOracle",
643
+ "label": "snapshotTimestamp",
644
+ "offset": 0,
645
+ "slot": "3",
646
+ "type": "t_uint256"
647
+ },
648
+ {
649
+ "astId": 8920,
650
+ "contract": "contracts/oracles/OneJumpOracle.sol:OneJumpOracle",
651
+ "label": "snapshotGap",
652
+ "offset": 0,
653
+ "slot": "4",
654
+ "type": "t_uint256"
655
+ }
656
+ ],
657
+ "types": {
658
+ "t_uint256": {
659
+ "encoding": "inplace",
660
+ "label": "uint256",
661
+ "numberOfBytes": "32"
662
+ }
663
+ }
664
+ }
665
+ }