@pendle/core-v2 4.5.1-oracle-beta → 4.5.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/build/artifacts/contracts/interfaces/IPPtLpOracle.sol/IPPtLpOracle.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/{IPPYLpOracle.sol/IPPYLpOracle.json → IPPtLpOracle.sol/IPPtLpOracle.json} +2 -50
- package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/IPossibleSupplyCapInterface.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/IPossibleSupplyCapInterface.json +63 -0
- package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/SupplyCapReader.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/SupplyCapReader.json +35 -0
- package/build/artifacts/contracts/oracles/PendleLpOracleLib.sol/PendleLpOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendleLpOracleLib.sol/PendleLpOracleLib.json +2 -2
- package/build/artifacts/contracts/oracles/PendlePtLpOracle.sol/PendlePtLpOracle.dbg.json +4 -0
- package/build/artifacts/contracts/oracles/PendlePtLpOracle.sol/PendlePtLpOracle.json +367 -0
- package/build/artifacts/contracts/oracles/PendlePtOracleLib.sol/PendlePtOracleLib.dbg.json +4 -0
- package/build/artifacts/contracts/oracles/{PendlePYOracleLib.sol/PendlePYOracleLib.json → PendlePtOracleLib.sol/PendlePtOracleLib.json} +4 -4
- package/build/artifacts/contracts/oracles/samples/BoringLpGlpOracle.sol/BoringLpGlpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/samples/BoringLpGlpOracle.sol/BoringLpGlpOracle.json +2 -2
- package/build/artifacts/contracts/oracles/samples/BoringPtUsdChainlinkOracle.sol/BoringPtUsdChainlinkOracle.dbg.json +4 -0
- package/build/artifacts/contracts/oracles/samples/BoringPtUsdChainlinkOracle.sol/BoringPtUsdChainlinkOracle.json +157 -0
- package/contracts/interfaces/{IPPYLpOracle.sol → IPPtLpOracle.sol} +1 -5
- package/contracts/offchain-helpers/SupplyCapReader.sol +25 -0
- package/contracts/oracles/PendleLpOracleLib.sol +4 -4
- package/contracts/oracles/{PendlePYLpOracle.sol → PendlePtLpOracle.sol} +16 -44
- package/contracts/oracles/{PendlePYOracleLib.sol → PendlePtOracleLib.sol} +1 -31
- package/contracts/oracles/samples/BoringLpGlpOracle.sol +2 -2
- package/contracts/oracles/samples/{BoringPYUsdChainlinkAssetOracle.sol → BoringPtUsdChainlinkOracle.sol} +12 -36
- package/deployments/1-markets/UNIETH-MAINNET-SEP2024.json +13 -0
- package/deployments/1-offchain-helper.json +2 -1
- package/deployments/10-offchain-helper.json +2 -1
- package/deployments/42161-offchain-helper.json +2 -1
- package/deployments/5000-offchain-helper.json +2 -1
- package/deployments/56-offchain-helper.json +2 -1
- package/package.json +1 -1
- package/typechain-types/IPossibleSupplyCapInterface.ts +142 -0
- package/typechain-types/SupplyCapReader.ts +105 -0
- package/typechain-types/factories/BoringLpGlpOracle__factory.ts +1 -1
- package/typechain-types/factories/IPossibleSupplyCapInterface__factory.ts +82 -0
- package/typechain-types/factories/SupplyCapReader__factory.ts +88 -0
- package/typechain-types/hardhat.d.ts +18 -0
- package/typechain-types/index.ts +4 -0
- package/build/artifacts/contracts/interfaces/IPPYLpOracle.sol/IPPYLpOracle.dbg.json +0 -4
- package/build/artifacts/contracts/oracles/PendlePYLpOracle.sol/PendlePYLpOracle.dbg.json +0 -4
- package/build/artifacts/contracts/oracles/PendlePYLpOracle.sol/PendlePYLpOracle.json +0 -422
- package/build/artifacts/contracts/oracles/PendlePYOracleLib.sol/PendlePYOracleLib.dbg.json +0 -4
- package/build/artifacts/contracts/oracles/samples/BoringPYUsdChainlinkAssetOracle.sol/BoringPYUsdChainlinkAssetOracle.dbg.json +0 -4
- package/build/artifacts/contracts/oracles/samples/BoringPYUsdChainlinkAssetOracle.sol/BoringPYUsdChainlinkAssetOracle.json +0 -183
- package/build/artifacts/contracts/oracles/samples/BoringPYUsdChainlinkSYOracle.sol/BoringPYUsdChainlinkSYOracle.dbg.json +0 -4
- package/build/artifacts/contracts/oracles/samples/BoringPYUsdChainlinkSYOracle.sol/BoringPYUsdChainlinkSYOracle.json +0 -183
- package/contracts/oracles/samples/BoringPYUsdChainlinkSYOracle.sol +0 -102
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_format": "hh-sol-artifact-1",
|
|
3
|
-
"contractName": "BoringPYUsdChainlinkAssetOracle",
|
|
4
|
-
"sourceName": "contracts/oracles/samples/BoringPYUsdChainlinkAssetOracle.sol",
|
|
5
|
-
"abi": [
|
|
6
|
-
{
|
|
7
|
-
"inputs": [
|
|
8
|
-
{
|
|
9
|
-
"internalType": "uint32",
|
|
10
|
-
"name": "_twapDuration",
|
|
11
|
-
"type": "uint32"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"internalType": "address",
|
|
15
|
-
"name": "_market",
|
|
16
|
-
"type": "address"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"internalType": "address",
|
|
20
|
-
"name": "_feed",
|
|
21
|
-
"type": "address"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"internalType": "address",
|
|
25
|
-
"name": "_pyLpOracle",
|
|
26
|
-
"type": "address"
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
"stateMutability": "nonpayable",
|
|
30
|
-
"type": "constructor"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"inputs": [
|
|
34
|
-
{
|
|
35
|
-
"internalType": "uint32",
|
|
36
|
-
"name": "duration",
|
|
37
|
-
"type": "uint32"
|
|
38
|
-
}
|
|
39
|
-
],
|
|
40
|
-
"name": "AdditionalWaitRequired",
|
|
41
|
-
"type": "error"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"inputs": [
|
|
45
|
-
{
|
|
46
|
-
"internalType": "uint16",
|
|
47
|
-
"name": "cardinalityRequired",
|
|
48
|
-
"type": "uint16"
|
|
49
|
-
}
|
|
50
|
-
],
|
|
51
|
-
"name": "IncreaseCardinalityRequired",
|
|
52
|
-
"type": "error"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"inputs": [],
|
|
56
|
-
"name": "checkOracleState",
|
|
57
|
-
"outputs": [],
|
|
58
|
-
"stateMutability": "view",
|
|
59
|
-
"type": "function"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"inputs": [],
|
|
63
|
-
"name": "feed",
|
|
64
|
-
"outputs": [
|
|
65
|
-
{
|
|
66
|
-
"internalType": "address",
|
|
67
|
-
"name": "",
|
|
68
|
-
"type": "address"
|
|
69
|
-
}
|
|
70
|
-
],
|
|
71
|
-
"stateMutability": "view",
|
|
72
|
-
"type": "function"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"inputs": [],
|
|
76
|
-
"name": "feedDecimals",
|
|
77
|
-
"outputs": [
|
|
78
|
-
{
|
|
79
|
-
"internalType": "uint8",
|
|
80
|
-
"name": "",
|
|
81
|
-
"type": "uint8"
|
|
82
|
-
}
|
|
83
|
-
],
|
|
84
|
-
"stateMutability": "view",
|
|
85
|
-
"type": "function"
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
"inputs": [],
|
|
89
|
-
"name": "getPtPriceSample1",
|
|
90
|
-
"outputs": [
|
|
91
|
-
{
|
|
92
|
-
"internalType": "uint256",
|
|
93
|
-
"name": "",
|
|
94
|
-
"type": "uint256"
|
|
95
|
-
}
|
|
96
|
-
],
|
|
97
|
-
"stateMutability": "view",
|
|
98
|
-
"type": "function"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"inputs": [],
|
|
102
|
-
"name": "getPtPriceSample2",
|
|
103
|
-
"outputs": [
|
|
104
|
-
{
|
|
105
|
-
"internalType": "uint256",
|
|
106
|
-
"name": "",
|
|
107
|
-
"type": "uint256"
|
|
108
|
-
}
|
|
109
|
-
],
|
|
110
|
-
"stateMutability": "view",
|
|
111
|
-
"type": "function"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"inputs": [],
|
|
115
|
-
"name": "getYtPriceSample1",
|
|
116
|
-
"outputs": [
|
|
117
|
-
{
|
|
118
|
-
"internalType": "uint256",
|
|
119
|
-
"name": "",
|
|
120
|
-
"type": "uint256"
|
|
121
|
-
}
|
|
122
|
-
],
|
|
123
|
-
"stateMutability": "view",
|
|
124
|
-
"type": "function"
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"inputs": [],
|
|
128
|
-
"name": "getYtPriceSample2",
|
|
129
|
-
"outputs": [
|
|
130
|
-
{
|
|
131
|
-
"internalType": "uint256",
|
|
132
|
-
"name": "",
|
|
133
|
-
"type": "uint256"
|
|
134
|
-
}
|
|
135
|
-
],
|
|
136
|
-
"stateMutability": "view",
|
|
137
|
-
"type": "function"
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
"inputs": [],
|
|
141
|
-
"name": "market",
|
|
142
|
-
"outputs": [
|
|
143
|
-
{
|
|
144
|
-
"internalType": "address",
|
|
145
|
-
"name": "",
|
|
146
|
-
"type": "address"
|
|
147
|
-
}
|
|
148
|
-
],
|
|
149
|
-
"stateMutability": "view",
|
|
150
|
-
"type": "function"
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
"inputs": [],
|
|
154
|
-
"name": "pyLpOracle",
|
|
155
|
-
"outputs": [
|
|
156
|
-
{
|
|
157
|
-
"internalType": "address",
|
|
158
|
-
"name": "",
|
|
159
|
-
"type": "address"
|
|
160
|
-
}
|
|
161
|
-
],
|
|
162
|
-
"stateMutability": "view",
|
|
163
|
-
"type": "function"
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
"inputs": [],
|
|
167
|
-
"name": "twapDuration",
|
|
168
|
-
"outputs": [
|
|
169
|
-
{
|
|
170
|
-
"internalType": "uint32",
|
|
171
|
-
"name": "",
|
|
172
|
-
"type": "uint32"
|
|
173
|
-
}
|
|
174
|
-
],
|
|
175
|
-
"stateMutability": "view",
|
|
176
|
-
"type": "function"
|
|
177
|
-
}
|
|
178
|
-
],
|
|
179
|
-
"bytecode": "0x6101206040523480156200001257600080fd5b50604051620016fe380380620016fe8339810160408190526200003591620000f0565b63ffffffff84166080526001600160a01b0380841660a052821660c08190526040805163313ce56760e01b8152905163313ce567916004808201926020929091908290030181865afa15801562000090573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b6919062000157565b60ff1660e0526001600160a01b0316610100525062000183915050565b80516001600160a01b0381168114620000eb57600080fd5b919050565b600080600080608085870312156200010757600080fd5b845163ffffffff811681146200011c57600080fd5b93506200012c60208601620000d3565b92506200013c60408601620000d3565b91506200014c60608601620000d3565b905092959194509250565b6000602082840312156200016a57600080fd5b815160ff811681146200017c57600080fd5b9392505050565b60805160a05160c05160e051610100516114ba620002446000396000818161015d0152818161025f01528181610387015261041a01526000818161018c0152818161063f0152818161066d01526106b001526000818160f701526105b9015260008181610136015281816101e20152818161028e0152818161033c015281816103b6015261044901526000818160b301528181610204015281816102af0152818161035e015281816103d70152818161046a015261053001526114ba6000f3fe608060405234801561001057600080fd5b506004361061008e5760003560e01c8063223a3b261461009357806326d89545146100ae5780632f467dab146100ea57806337a7b7d8146100f257806380f55605146101315780638ca06ea614610158578063addccbb31461017f578063c23953d014610187578063e710b82f146101c0578063f9294d8b146101c8575b600080fd5b61009b6101d2565b6040519081526020015b60405180910390f35b6100d57f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016100a5565b61009b61025a565b6101197f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100a5565b6101197f000000000000000000000000000000000000000000000000000000000000000081565b6101197f000000000000000000000000000000000000000000000000000000000000000081565b61009b61032c565b6101ae7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016100a5565b61009b610382565b6101d0610413565b005b6000806102286001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000610562565b905060006102346105b4565b9050670de0b6b3a7640000610249838361104b565b6102539190611078565b9250505090565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb0856fe7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006040518363ffffffff1660e01b81526004016102eb92919061108c565b602060405180830381865afa158015610308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061022891906110ab565b6000806102286001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006106f1565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663abca0eab7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006040518363ffffffff1660e01b81526004016102eb92919061108c565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663873e96007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006040518363ffffffff1660e01b81526004016104a692919061108c565b606060405180830381865afa1580156104c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e791906110d9565b9250925092508215610517576040516333b3ceb360e01b815261ffff831660048201526024015b60405180910390fd5b8061055d57604051631229555360e01b815263ffffffff7f000000000000000000000000000000000000000000000000000000000000000016600482015260240161050e565b505050565b600080600061057085610720565b9150915080821061058e576105858585610950565b925050506105ae565b808261059a8787610950565b6105a4919061104b565b6105859190611078565b92915050565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610615573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061063991906110ab565b905060127f000000000000000000000000000000000000000000000000000000000000000060ff16106106ab5761069160127f0000000000000000000000000000000000000000000000000000000000000000611125565b61069c90600a611222565b6106a69082611078565b6106eb565b6106d67f00000000000000000000000000000000000000000000000000000000000000006012611125565b6106e190600a611222565b6106eb908261104b565b91505090565b60008060006106ff85610720565b91509150808210610714576105858585610975565b808261059a8787610975565b600080600080846001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610764573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107889190611249565b9250509150816001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ef91906110ab565b93506000816001600160a01b031663d2a3584e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610831573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085591906110ab565b9050816001600160a01b031663516399df6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610895573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b99190611296565b801561092e575043826001600160a01b03166360e0a9e16040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108ff573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092391906112b1565b6001600160801b0316145b1561093b57809350610948565b6109458582610a4a565b93505b505050915091565b600061095c8383610975565b61096e90670de0b6b3a76400006112da565b9392505050565b600080836001600160a01b031663e184c9be6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109da91906110ab565b90504281116109f457670de0b6b3a76400009150506105ae565b6000610a008585610a60565b90506000610a0e42846112da565b90506000610a24610a1f8484610b87565b610bc8565b9050610a38670de0b6b3a764000082610bdb565b9450505050506105ae565b5092915050565b6000818311610a59578161096e565b5090919050565b604080516002808252606082018352600092839291906020830190803683370190505090508281600081518110610a9957610a99611303565b63ffffffff9092166020928302919091019091015260405163883bdbfd60e01b81526000906001600160a01b0386169063883bdbfd90610add908590600401611319565b600060405180830381865afa158015610afa573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b22919081019061137a565b90508363ffffffff1681600081518110610b3e57610b3e611303565b602002602001015182600181518110610b5957610b59611303565b6020026020010151610b6b919061143e565b610b75919061145e565b6001600160d81b031695945050505050565b600080610b996201518061016d61104b565b610ba3848661104b565b610bad9190611078565b9050610bc0610bbb82610c0a565b610c20565b949350505050565b600080821215610bd757600080fd5b5090565b600080610bf0670de0b6b3a76400008561104b565b9050828181610c0157610c01611062565b04949350505050565b60006001600160ff1b03821115610bd757600080fd5b6000680238fd42c5cf03ffff198212158015610c45575068070c1cc73b00c800008213155b610c845760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a5908195e1c1bdb995b9d60821b604482015260640161050e565b6000821215610cbc57610c9982600003610c20565b6a0c097ce7bc90715b34b9f160241b81610cb557610cb5611062565b0592915050565b60006806f05b59d3b20000008312610cfa57506806f05b59d3b1ffffff199091019072195e54c5dd42177f53a27172fa9ec63026282760241b610d30565b6803782dace9d90000008312610d2c57506803782dace9d8ffffff19909101906b1425982cf597cd205cef7380610d30565b5060015b6064929092029168056bc75e2d6310000068ad78ebc5ac620000008412610d805768ad78ebc5ac61ffffff199093019268056bc75e2d631000006e01855144814a7ff805980ff008400082020590505b6856bc75e2d6310000008412610dbc576856bc75e2d630ffffff199093019268056bc75e2d631000006b02df0ab5a80a22c61ab5a70082020590505b682b5e3af16b188000008412610df657682b5e3af16b187fffff199093019268056bc75e2d63100000693f1fce3da636ea5cf85082020590505b6815af1d78b58c4000008412610e30576815af1d78b58c3fffff199093019268056bc75e2d63100000690127fa27722cc06cc5e282020590505b680ad78ebc5ac62000008412610e6957680ad78ebc5ac61fffff199093019268056bc75e2d6310000068280e60114edb805d0382020590505b68056bc75e2d631000008412610ea25768056bc75e2d630fffff199093019268056bc75e2d63100000680ebc5fb4174612111082020590505b6802b5e3af16b18800008412610edb576802b5e3af16b187ffff199093019268056bc75e2d631000006808f00f760a4b2db55d82020590505b68015af1d78b58c400008412610f145768015af1d78b58c3ffff199093019268056bc75e2d631000006806f5f177578893793782020590505b68056bc75e2d631000008481019085906002908280020505918201919050600368056bc75e2d631000008783020505918201919050600468056bc75e2d631000008783020505918201919050600568056bc75e2d631000008783020505918201919050600668056bc75e2d631000008783020505918201919050600768056bc75e2d631000008783020505918201919050600868056bc75e2d631000008783020505918201919050600968056bc75e2d631000008783020505918201919050600a68056bc75e2d631000008783020505918201919050600b68056bc75e2d631000008783020505918201919050600c68056bc75e2d631000008783020505918201919050606468056bc75e2d63100000848402058502059695505050505050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176105ae576105ae611035565b634e487b7160e01b600052601260045260246000fd5b60008261108757611087611062565b500490565b6001600160a01b0392909216825263ffffffff16602082015260400190565b6000602082840312156110bd57600080fd5b5051919050565b805180151581146110d457600080fd5b919050565b6000806000606084860312156110ee57600080fd5b6110f7846110c4565b9250602084015161ffff8116811461110e57600080fd5b915061111c604085016110c4565b90509250925092565b60ff82811682821603908111156105ae576105ae611035565b600181815b8085111561117957816000190482111561115f5761115f611035565b8085161561116c57918102915b93841c9390800290611143565b509250929050565b600082611190575060016105ae565b8161119d575060006105ae565b81600181146111b357600281146111bd576111d9565b60019150506105ae565b60ff8411156111ce576111ce611035565b50506001821b6105ae565b5060208310610133831016604e8410600b84101617156111fc575081810a6105ae565b611206838361113e565b806000190482111561121a5761121a611035565b029392505050565b600061096e60ff841683611181565b6001600160a01b038116811461124657600080fd5b50565b60008060006060848603121561125e57600080fd5b835161126981611231565b602085015190935061127a81611231565b604085015190925061128b81611231565b809150509250925092565b6000602082840312156112a857600080fd5b61096e826110c4565b6000602082840312156112c357600080fd5b81516001600160801b038116811461096e57600080fd5b818103818111156105ae576105ae611035565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6020808252825182820181905260009190848201906040850190845b8181101561135757835163ffffffff1683529284019291840191600101611335565b50909695505050505050565b80516001600160d81b03811681146110d457600080fd5b6000602080838503121561138d57600080fd5b82516001600160401b03808211156113a457600080fd5b818501915085601f8301126113b857600080fd5b8151818111156113ca576113ca6112ed565b8060051b604051601f19603f830116810181811085821117156113ef576113ef6112ed565b60405291825284820192508381018501918883111561140d57600080fd5b938501935b828510156114325761142385611363565b84529385019392850192611412565b98975050505050505050565b6001600160d81b03828116828216039080821115610a4357610a43611035565b60006001600160d81b038381168061147857611478611062565b9216919091049291505056fea2646970667358221220eb374368e5fdbcf8d6ff8f41fa8a1450d1f59e053c5235c4ac66de22d1d63cc064736f6c63430008170033",
|
|
180
|
-
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061008e5760003560e01c8063223a3b261461009357806326d89545146100ae5780632f467dab146100ea57806337a7b7d8146100f257806380f55605146101315780638ca06ea614610158578063addccbb31461017f578063c23953d014610187578063e710b82f146101c0578063f9294d8b146101c8575b600080fd5b61009b6101d2565b6040519081526020015b60405180910390f35b6100d57f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016100a5565b61009b61025a565b6101197f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100a5565b6101197f000000000000000000000000000000000000000000000000000000000000000081565b6101197f000000000000000000000000000000000000000000000000000000000000000081565b61009b61032c565b6101ae7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016100a5565b61009b610382565b6101d0610413565b005b6000806102286001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000610562565b905060006102346105b4565b9050670de0b6b3a7640000610249838361104b565b6102539190611078565b9250505090565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb0856fe7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006040518363ffffffff1660e01b81526004016102eb92919061108c565b602060405180830381865afa158015610308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061022891906110ab565b6000806102286001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006106f1565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663abca0eab7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006040518363ffffffff1660e01b81526004016102eb92919061108c565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663873e96007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006040518363ffffffff1660e01b81526004016104a692919061108c565b606060405180830381865afa1580156104c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e791906110d9565b9250925092508215610517576040516333b3ceb360e01b815261ffff831660048201526024015b60405180910390fd5b8061055d57604051631229555360e01b815263ffffffff7f000000000000000000000000000000000000000000000000000000000000000016600482015260240161050e565b505050565b600080600061057085610720565b9150915080821061058e576105858585610950565b925050506105ae565b808261059a8787610950565b6105a4919061104b565b6105859190611078565b92915050565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610615573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061063991906110ab565b905060127f000000000000000000000000000000000000000000000000000000000000000060ff16106106ab5761069160127f0000000000000000000000000000000000000000000000000000000000000000611125565b61069c90600a611222565b6106a69082611078565b6106eb565b6106d67f00000000000000000000000000000000000000000000000000000000000000006012611125565b6106e190600a611222565b6106eb908261104b565b91505090565b60008060006106ff85610720565b91509150808210610714576105858585610975565b808261059a8787610975565b600080600080846001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610764573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107889190611249565b9250509150816001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ef91906110ab565b93506000816001600160a01b031663d2a3584e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610831573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085591906110ab565b9050816001600160a01b031663516399df6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610895573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b99190611296565b801561092e575043826001600160a01b03166360e0a9e16040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108ff573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092391906112b1565b6001600160801b0316145b1561093b57809350610948565b6109458582610a4a565b93505b505050915091565b600061095c8383610975565b61096e90670de0b6b3a76400006112da565b9392505050565b600080836001600160a01b031663e184c9be6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109da91906110ab565b90504281116109f457670de0b6b3a76400009150506105ae565b6000610a008585610a60565b90506000610a0e42846112da565b90506000610a24610a1f8484610b87565b610bc8565b9050610a38670de0b6b3a764000082610bdb565b9450505050506105ae565b5092915050565b6000818311610a59578161096e565b5090919050565b604080516002808252606082018352600092839291906020830190803683370190505090508281600081518110610a9957610a99611303565b63ffffffff9092166020928302919091019091015260405163883bdbfd60e01b81526000906001600160a01b0386169063883bdbfd90610add908590600401611319565b600060405180830381865afa158015610afa573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b22919081019061137a565b90508363ffffffff1681600081518110610b3e57610b3e611303565b602002602001015182600181518110610b5957610b59611303565b6020026020010151610b6b919061143e565b610b75919061145e565b6001600160d81b031695945050505050565b600080610b996201518061016d61104b565b610ba3848661104b565b610bad9190611078565b9050610bc0610bbb82610c0a565b610c20565b949350505050565b600080821215610bd757600080fd5b5090565b600080610bf0670de0b6b3a76400008561104b565b9050828181610c0157610c01611062565b04949350505050565b60006001600160ff1b03821115610bd757600080fd5b6000680238fd42c5cf03ffff198212158015610c45575068070c1cc73b00c800008213155b610c845760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a5908195e1c1bdb995b9d60821b604482015260640161050e565b6000821215610cbc57610c9982600003610c20565b6a0c097ce7bc90715b34b9f160241b81610cb557610cb5611062565b0592915050565b60006806f05b59d3b20000008312610cfa57506806f05b59d3b1ffffff199091019072195e54c5dd42177f53a27172fa9ec63026282760241b610d30565b6803782dace9d90000008312610d2c57506803782dace9d8ffffff19909101906b1425982cf597cd205cef7380610d30565b5060015b6064929092029168056bc75e2d6310000068ad78ebc5ac620000008412610d805768ad78ebc5ac61ffffff199093019268056bc75e2d631000006e01855144814a7ff805980ff008400082020590505b6856bc75e2d6310000008412610dbc576856bc75e2d630ffffff199093019268056bc75e2d631000006b02df0ab5a80a22c61ab5a70082020590505b682b5e3af16b188000008412610df657682b5e3af16b187fffff199093019268056bc75e2d63100000693f1fce3da636ea5cf85082020590505b6815af1d78b58c4000008412610e30576815af1d78b58c3fffff199093019268056bc75e2d63100000690127fa27722cc06cc5e282020590505b680ad78ebc5ac62000008412610e6957680ad78ebc5ac61fffff199093019268056bc75e2d6310000068280e60114edb805d0382020590505b68056bc75e2d631000008412610ea25768056bc75e2d630fffff199093019268056bc75e2d63100000680ebc5fb4174612111082020590505b6802b5e3af16b18800008412610edb576802b5e3af16b187ffff199093019268056bc75e2d631000006808f00f760a4b2db55d82020590505b68015af1d78b58c400008412610f145768015af1d78b58c3ffff199093019268056bc75e2d631000006806f5f177578893793782020590505b68056bc75e2d631000008481019085906002908280020505918201919050600368056bc75e2d631000008783020505918201919050600468056bc75e2d631000008783020505918201919050600568056bc75e2d631000008783020505918201919050600668056bc75e2d631000008783020505918201919050600768056bc75e2d631000008783020505918201919050600868056bc75e2d631000008783020505918201919050600968056bc75e2d631000008783020505918201919050600a68056bc75e2d631000008783020505918201919050600b68056bc75e2d631000008783020505918201919050600c68056bc75e2d631000008783020505918201919050606468056bc75e2d63100000848402058502059695505050505050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176105ae576105ae611035565b634e487b7160e01b600052601260045260246000fd5b60008261108757611087611062565b500490565b6001600160a01b0392909216825263ffffffff16602082015260400190565b6000602082840312156110bd57600080fd5b5051919050565b805180151581146110d457600080fd5b919050565b6000806000606084860312156110ee57600080fd5b6110f7846110c4565b9250602084015161ffff8116811461110e57600080fd5b915061111c604085016110c4565b90509250925092565b60ff82811682821603908111156105ae576105ae611035565b600181815b8085111561117957816000190482111561115f5761115f611035565b8085161561116c57918102915b93841c9390800290611143565b509250929050565b600082611190575060016105ae565b8161119d575060006105ae565b81600181146111b357600281146111bd576111d9565b60019150506105ae565b60ff8411156111ce576111ce611035565b50506001821b6105ae565b5060208310610133831016604e8410600b84101617156111fc575081810a6105ae565b611206838361113e565b806000190482111561121a5761121a611035565b029392505050565b600061096e60ff841683611181565b6001600160a01b038116811461124657600080fd5b50565b60008060006060848603121561125e57600080fd5b835161126981611231565b602085015190935061127a81611231565b604085015190925061128b81611231565b809150509250925092565b6000602082840312156112a857600080fd5b61096e826110c4565b6000602082840312156112c357600080fd5b81516001600160801b038116811461096e57600080fd5b818103818111156105ae576105ae611035565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6020808252825182820181905260009190848201906040850190845b8181101561135757835163ffffffff1683529284019291840191600101611335565b50909695505050505050565b80516001600160d81b03811681146110d457600080fd5b6000602080838503121561138d57600080fd5b82516001600160401b03808211156113a457600080fd5b818501915085601f8301126113b857600080fd5b8151818111156113ca576113ca6112ed565b8060051b604051601f19603f830116810181811085821117156113ef576113ef6112ed565b60405291825284820192508381018501918883111561140d57600080fd5b938501935b828510156114325761142385611363565b84529385019392850192611412565b98975050505050505050565b6001600160d81b03828116828216039080821115610a4357610a43611035565b60006001600160d81b038381168061147857611478611062565b9216919091049291505056fea2646970667358221220eb374368e5fdbcf8d6ff8f41fa8a1450d1f59e053c5235c4ac66de22d1d63cc064736f6c63430008170033",
|
|
181
|
-
"linkReferences": {},
|
|
182
|
-
"deployedLinkReferences": {}
|
|
183
|
-
}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_format": "hh-sol-artifact-1",
|
|
3
|
-
"contractName": "BoringPYUsdChainlinkSYOracle",
|
|
4
|
-
"sourceName": "contracts/oracles/samples/BoringPYUsdChainlinkSYOracle.sol",
|
|
5
|
-
"abi": [
|
|
6
|
-
{
|
|
7
|
-
"inputs": [
|
|
8
|
-
{
|
|
9
|
-
"internalType": "uint32",
|
|
10
|
-
"name": "_twapDuration",
|
|
11
|
-
"type": "uint32"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"internalType": "address",
|
|
15
|
-
"name": "_market",
|
|
16
|
-
"type": "address"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"internalType": "address",
|
|
20
|
-
"name": "_feed",
|
|
21
|
-
"type": "address"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"internalType": "address",
|
|
25
|
-
"name": "_pyLpOracle",
|
|
26
|
-
"type": "address"
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
"stateMutability": "nonpayable",
|
|
30
|
-
"type": "constructor"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"inputs": [
|
|
34
|
-
{
|
|
35
|
-
"internalType": "uint32",
|
|
36
|
-
"name": "duration",
|
|
37
|
-
"type": "uint32"
|
|
38
|
-
}
|
|
39
|
-
],
|
|
40
|
-
"name": "AdditionalWaitRequired",
|
|
41
|
-
"type": "error"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"inputs": [
|
|
45
|
-
{
|
|
46
|
-
"internalType": "uint16",
|
|
47
|
-
"name": "cardinalityRequired",
|
|
48
|
-
"type": "uint16"
|
|
49
|
-
}
|
|
50
|
-
],
|
|
51
|
-
"name": "IncreaseCardinalityRequired",
|
|
52
|
-
"type": "error"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"inputs": [],
|
|
56
|
-
"name": "checkOracleState",
|
|
57
|
-
"outputs": [],
|
|
58
|
-
"stateMutability": "view",
|
|
59
|
-
"type": "function"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"inputs": [],
|
|
63
|
-
"name": "feed",
|
|
64
|
-
"outputs": [
|
|
65
|
-
{
|
|
66
|
-
"internalType": "address",
|
|
67
|
-
"name": "",
|
|
68
|
-
"type": "address"
|
|
69
|
-
}
|
|
70
|
-
],
|
|
71
|
-
"stateMutability": "view",
|
|
72
|
-
"type": "function"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"inputs": [],
|
|
76
|
-
"name": "feedDecimals",
|
|
77
|
-
"outputs": [
|
|
78
|
-
{
|
|
79
|
-
"internalType": "uint8",
|
|
80
|
-
"name": "",
|
|
81
|
-
"type": "uint8"
|
|
82
|
-
}
|
|
83
|
-
],
|
|
84
|
-
"stateMutability": "view",
|
|
85
|
-
"type": "function"
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
"inputs": [],
|
|
89
|
-
"name": "getPtPriceSample1",
|
|
90
|
-
"outputs": [
|
|
91
|
-
{
|
|
92
|
-
"internalType": "uint256",
|
|
93
|
-
"name": "",
|
|
94
|
-
"type": "uint256"
|
|
95
|
-
}
|
|
96
|
-
],
|
|
97
|
-
"stateMutability": "view",
|
|
98
|
-
"type": "function"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"inputs": [],
|
|
102
|
-
"name": "getPtPriceSample2",
|
|
103
|
-
"outputs": [
|
|
104
|
-
{
|
|
105
|
-
"internalType": "uint256",
|
|
106
|
-
"name": "",
|
|
107
|
-
"type": "uint256"
|
|
108
|
-
}
|
|
109
|
-
],
|
|
110
|
-
"stateMutability": "view",
|
|
111
|
-
"type": "function"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"inputs": [],
|
|
115
|
-
"name": "getYtPriceSample1",
|
|
116
|
-
"outputs": [
|
|
117
|
-
{
|
|
118
|
-
"internalType": "uint256",
|
|
119
|
-
"name": "",
|
|
120
|
-
"type": "uint256"
|
|
121
|
-
}
|
|
122
|
-
],
|
|
123
|
-
"stateMutability": "view",
|
|
124
|
-
"type": "function"
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"inputs": [],
|
|
128
|
-
"name": "getYtPriceSample2",
|
|
129
|
-
"outputs": [
|
|
130
|
-
{
|
|
131
|
-
"internalType": "uint256",
|
|
132
|
-
"name": "",
|
|
133
|
-
"type": "uint256"
|
|
134
|
-
}
|
|
135
|
-
],
|
|
136
|
-
"stateMutability": "view",
|
|
137
|
-
"type": "function"
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
"inputs": [],
|
|
141
|
-
"name": "market",
|
|
142
|
-
"outputs": [
|
|
143
|
-
{
|
|
144
|
-
"internalType": "address",
|
|
145
|
-
"name": "",
|
|
146
|
-
"type": "address"
|
|
147
|
-
}
|
|
148
|
-
],
|
|
149
|
-
"stateMutability": "view",
|
|
150
|
-
"type": "function"
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
"inputs": [],
|
|
154
|
-
"name": "pyLpOracle",
|
|
155
|
-
"outputs": [
|
|
156
|
-
{
|
|
157
|
-
"internalType": "address",
|
|
158
|
-
"name": "",
|
|
159
|
-
"type": "address"
|
|
160
|
-
}
|
|
161
|
-
],
|
|
162
|
-
"stateMutability": "view",
|
|
163
|
-
"type": "function"
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
"inputs": [],
|
|
167
|
-
"name": "twapDuration",
|
|
168
|
-
"outputs": [
|
|
169
|
-
{
|
|
170
|
-
"internalType": "uint32",
|
|
171
|
-
"name": "",
|
|
172
|
-
"type": "uint32"
|
|
173
|
-
}
|
|
174
|
-
],
|
|
175
|
-
"stateMutability": "view",
|
|
176
|
-
"type": "function"
|
|
177
|
-
}
|
|
178
|
-
],
|
|
179
|
-
"bytecode": "0x6101206040523480156200001257600080fd5b50604051620016fc380380620016fc8339810160408190526200003591620000f0565b63ffffffff84166080526001600160a01b0380841660a052821660c08190526040805163313ce56760e01b8152905163313ce567916004808201926020929091908290030181865afa15801562000090573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b6919062000157565b60ff1660e0526001600160a01b0316610100525062000183915050565b80516001600160a01b0381168114620000eb57600080fd5b919050565b600080600080608085870312156200010757600080fd5b845163ffffffff811681146200011c57600080fd5b93506200012c60208601620000d3565b92506200013c60408601620000d3565b91506200014c60608601620000d3565b905092959194509250565b6000602082840312156200016a57600080fd5b815160ff811681146200017c57600080fd5b9392505050565b60805160a05160c05160e051610100516114b8620002446000396000818161015d0152818161025f01528181610387015261041a01526000818161018c015281816106370152818161066501526106a801526000818160f701526105b1015260008181610136015281816101e20152818161028e0152818161033c015281816103b6015261044901526000818160b301528181610204015281816102af0152818161035e015281816103d70152818161046a015261053001526114b86000f3fe608060405234801561001057600080fd5b506004361061008e5760003560e01c8063223a3b261461009357806326d89545146100ae5780632f467dab146100ea57806337a7b7d8146100f257806380f55605146101315780638ca06ea614610158578063addccbb31461017f578063c23953d014610187578063e710b82f146101c0578063f9294d8b146101c8575b600080fd5b61009b6101d2565b6040519081526020015b60405180910390f35b6100d57f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016100a5565b61009b61025a565b6101197f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100a5565b6101197f000000000000000000000000000000000000000000000000000000000000000081565b6101197f000000000000000000000000000000000000000000000000000000000000000081565b61009b61032c565b6101ae7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016100a5565b61009b610382565b6101d0610413565b005b6000806102286001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000610562565b905060006102346105ac565b9050670de0b6b3a76400006102498383611049565b6102539190611076565b9250505090565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ffec44077f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006040518363ffffffff1660e01b81526004016102eb92919061108a565b602060405180830381865afa158015610308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061022891906110a9565b6000806102286001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006106e9565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a31426d17f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006040518363ffffffff1660e01b81526004016102eb92919061108a565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663873e96007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006040518363ffffffff1660e01b81526004016104a692919061108a565b606060405180830381865afa1580156104c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e791906110d7565b9250925092508215610517576040516333b3ceb360e01b815261ffff831660048201526024015b60405180910390fd5b8061055d57604051631229555360e01b815263ffffffff7f000000000000000000000000000000000000000000000000000000000000000016600482015260240161050e565b505050565b60008060006105708561071e565b915091508082106105985761058f82610589878761094e565b90610973565b925050506105a6565b61058f81610589878761094e565b92915050565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561060d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061063191906110a9565b905060127f000000000000000000000000000000000000000000000000000000000000000060ff16106106a35761068960127f0000000000000000000000000000000000000000000000000000000000000000611123565b61069490600a611220565b61069e9082611076565b6106e3565b6106ce7f00000000000000000000000000000000000000000000000000000000000000006012611123565b6106d990600a611220565b6106e39082611049565b91505090565b60008060006106f78561071e565b915091508082106107105761058f8261058987876109a2565b61058f8161058987876109a2565b600080600080846001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610762573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107869190611247565b9250509150816001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ed91906110a9565b93506000816001600160a01b031663d2a3584e6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561082f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085391906110a9565b9050816001600160a01b031663516399df6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610893573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b79190611294565b801561092c575043826001600160a01b03166360e0a9e16040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108fd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092191906112af565b6001600160801b0316145b1561093957809350610946565b6109438582610a77565b93505b505050915091565b600061095a83836109a2565b61096c90670de0b6b3a76400006112d8565b9392505050565b600080610988670de0b6b3a764000085611049565b905082818161099957610999611060565b04949350505050565b600080836001600160a01b031663e184c9be6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0791906110a9565b9050428111610a2157670de0b6b3a76400009150506105a6565b6000610a2d8585610a8d565b90506000610a3b42846112d8565b90506000610a51610a4c8484610bb4565b610bf5565b9050610a65670de0b6b3a764000082610973565b9450505050506105a6565b5092915050565b6000818311610a86578161096c565b5090919050565b604080516002808252606082018352600092839291906020830190803683370190505090508281600081518110610ac657610ac6611301565b63ffffffff9092166020928302919091019091015260405163883bdbfd60e01b81526000906001600160a01b0386169063883bdbfd90610b0a908590600401611317565b600060405180830381865afa158015610b27573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b4f9190810190611378565b90508363ffffffff1681600081518110610b6b57610b6b611301565b602002602001015182600181518110610b8657610b86611301565b6020026020010151610b98919061143c565b610ba2919061145c565b6001600160d81b031695945050505050565b600080610bc66201518061016d611049565b610bd08486611049565b610bda9190611076565b9050610bed610be882610c08565b610c1e565b949350505050565b600080821215610c0457600080fd5b5090565b60006001600160ff1b03821115610c0457600080fd5b6000680238fd42c5cf03ffff198212158015610c43575068070c1cc73b00c800008213155b610c825760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a5908195e1c1bdb995b9d60821b604482015260640161050e565b6000821215610cba57610c9782600003610c1e565b6a0c097ce7bc90715b34b9f160241b81610cb357610cb3611060565b0592915050565b60006806f05b59d3b20000008312610cf857506806f05b59d3b1ffffff199091019072195e54c5dd42177f53a27172fa9ec63026282760241b610d2e565b6803782dace9d90000008312610d2a57506803782dace9d8ffffff19909101906b1425982cf597cd205cef7380610d2e565b5060015b6064929092029168056bc75e2d6310000068ad78ebc5ac620000008412610d7e5768ad78ebc5ac61ffffff199093019268056bc75e2d631000006e01855144814a7ff805980ff008400082020590505b6856bc75e2d6310000008412610dba576856bc75e2d630ffffff199093019268056bc75e2d631000006b02df0ab5a80a22c61ab5a70082020590505b682b5e3af16b188000008412610df457682b5e3af16b187fffff199093019268056bc75e2d63100000693f1fce3da636ea5cf85082020590505b6815af1d78b58c4000008412610e2e576815af1d78b58c3fffff199093019268056bc75e2d63100000690127fa27722cc06cc5e282020590505b680ad78ebc5ac62000008412610e6757680ad78ebc5ac61fffff199093019268056bc75e2d6310000068280e60114edb805d0382020590505b68056bc75e2d631000008412610ea05768056bc75e2d630fffff199093019268056bc75e2d63100000680ebc5fb4174612111082020590505b6802b5e3af16b18800008412610ed9576802b5e3af16b187ffff199093019268056bc75e2d631000006808f00f760a4b2db55d82020590505b68015af1d78b58c400008412610f125768015af1d78b58c3ffff199093019268056bc75e2d631000006806f5f177578893793782020590505b68056bc75e2d631000008481019085906002908280020505918201919050600368056bc75e2d631000008783020505918201919050600468056bc75e2d631000008783020505918201919050600568056bc75e2d631000008783020505918201919050600668056bc75e2d631000008783020505918201919050600768056bc75e2d631000008783020505918201919050600868056bc75e2d631000008783020505918201919050600968056bc75e2d631000008783020505918201919050600a68056bc75e2d631000008783020505918201919050600b68056bc75e2d631000008783020505918201919050600c68056bc75e2d631000008783020505918201919050606468056bc75e2d63100000848402058502059695505050505050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176105a6576105a6611033565b634e487b7160e01b600052601260045260246000fd5b60008261108557611085611060565b500490565b6001600160a01b0392909216825263ffffffff16602082015260400190565b6000602082840312156110bb57600080fd5b5051919050565b805180151581146110d257600080fd5b919050565b6000806000606084860312156110ec57600080fd5b6110f5846110c2565b9250602084015161ffff8116811461110c57600080fd5b915061111a604085016110c2565b90509250925092565b60ff82811682821603908111156105a6576105a6611033565b600181815b8085111561117757816000190482111561115d5761115d611033565b8085161561116a57918102915b93841c9390800290611141565b509250929050565b60008261118e575060016105a6565b8161119b575060006105a6565b81600181146111b157600281146111bb576111d7565b60019150506105a6565b60ff8411156111cc576111cc611033565b50506001821b6105a6565b5060208310610133831016604e8410600b84101617156111fa575081810a6105a6565b611204838361113c565b806000190482111561121857611218611033565b029392505050565b600061096c60ff84168361117f565b6001600160a01b038116811461124457600080fd5b50565b60008060006060848603121561125c57600080fd5b83516112678161122f565b60208501519093506112788161122f565b60408501519092506112898161122f565b809150509250925092565b6000602082840312156112a657600080fd5b61096c826110c2565b6000602082840312156112c157600080fd5b81516001600160801b038116811461096c57600080fd5b818103818111156105a6576105a6611033565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6020808252825182820181905260009190848201906040850190845b8181101561135557835163ffffffff1683529284019291840191600101611333565b50909695505050505050565b80516001600160d81b03811681146110d257600080fd5b6000602080838503121561138b57600080fd5b82516001600160401b03808211156113a257600080fd5b818501915085601f8301126113b657600080fd5b8151818111156113c8576113c86112eb565b8060051b604051601f19603f830116810181811085821117156113ed576113ed6112eb565b60405291825284820192508381018501918883111561140b57600080fd5b938501935b828510156114305761142185611361565b84529385019392850192611410565b98975050505050505050565b6001600160d81b03828116828216039080821115610a7057610a70611033565b60006001600160d81b038381168061147657611476611060565b9216919091049291505056fea26469706673582212207edce4b0f198cd00968b46daf175bf47b33ef5f572378401881d8e73365a0e6864736f6c63430008170033",
|
|
180
|
-
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061008e5760003560e01c8063223a3b261461009357806326d89545146100ae5780632f467dab146100ea57806337a7b7d8146100f257806380f55605146101315780638ca06ea614610158578063addccbb31461017f578063c23953d014610187578063e710b82f146101c0578063f9294d8b146101c8575b600080fd5b61009b6101d2565b6040519081526020015b60405180910390f35b6100d57f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016100a5565b61009b61025a565b6101197f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100a5565b6101197f000000000000000000000000000000000000000000000000000000000000000081565b6101197f000000000000000000000000000000000000000000000000000000000000000081565b61009b61032c565b6101ae7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016100a5565b61009b610382565b6101d0610413565b005b6000806102286001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000610562565b905060006102346105ac565b9050670de0b6b3a76400006102498383611049565b6102539190611076565b9250505090565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ffec44077f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006040518363ffffffff1660e01b81526004016102eb92919061108a565b602060405180830381865afa158015610308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061022891906110a9565b6000806102286001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006106e9565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a31426d17f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006040518363ffffffff1660e01b81526004016102eb92919061108a565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663873e96007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006040518363ffffffff1660e01b81526004016104a692919061108a565b606060405180830381865afa1580156104c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e791906110d7565b9250925092508215610517576040516333b3ceb360e01b815261ffff831660048201526024015b60405180910390fd5b8061055d57604051631229555360e01b815263ffffffff7f000000000000000000000000000000000000000000000000000000000000000016600482015260240161050e565b505050565b60008060006105708561071e565b915091508082106105985761058f82610589878761094e565b90610973565b925050506105a6565b61058f81610589878761094e565b92915050565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561060d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061063191906110a9565b905060127f000000000000000000000000000000000000000000000000000000000000000060ff16106106a35761068960127f0000000000000000000000000000000000000000000000000000000000000000611123565b61069490600a611220565b61069e9082611076565b6106e3565b6106ce7f00000000000000000000000000000000000000000000000000000000000000006012611123565b6106d990600a611220565b6106e39082611049565b91505090565b60008060006106f78561071e565b915091508082106107105761058f8261058987876109a2565b61058f8161058987876109a2565b600080600080846001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610762573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107869190611247565b9250509150816001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ed91906110a9565b93506000816001600160a01b031663d2a3584e6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561082f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085391906110a9565b9050816001600160a01b031663516399df6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610893573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b79190611294565b801561092c575043826001600160a01b03166360e0a9e16040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108fd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092191906112af565b6001600160801b0316145b1561093957809350610946565b6109438582610a77565b93505b505050915091565b600061095a83836109a2565b61096c90670de0b6b3a76400006112d8565b9392505050565b600080610988670de0b6b3a764000085611049565b905082818161099957610999611060565b04949350505050565b600080836001600160a01b031663e184c9be6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109e3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0791906110a9565b9050428111610a2157670de0b6b3a76400009150506105a6565b6000610a2d8585610a8d565b90506000610a3b42846112d8565b90506000610a51610a4c8484610bb4565b610bf5565b9050610a65670de0b6b3a764000082610973565b9450505050506105a6565b5092915050565b6000818311610a86578161096c565b5090919050565b604080516002808252606082018352600092839291906020830190803683370190505090508281600081518110610ac657610ac6611301565b63ffffffff9092166020928302919091019091015260405163883bdbfd60e01b81526000906001600160a01b0386169063883bdbfd90610b0a908590600401611317565b600060405180830381865afa158015610b27573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b4f9190810190611378565b90508363ffffffff1681600081518110610b6b57610b6b611301565b602002602001015182600181518110610b8657610b86611301565b6020026020010151610b98919061143c565b610ba2919061145c565b6001600160d81b031695945050505050565b600080610bc66201518061016d611049565b610bd08486611049565b610bda9190611076565b9050610bed610be882610c08565b610c1e565b949350505050565b600080821215610c0457600080fd5b5090565b60006001600160ff1b03821115610c0457600080fd5b6000680238fd42c5cf03ffff198212158015610c43575068070c1cc73b00c800008213155b610c825760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a5908195e1c1bdb995b9d60821b604482015260640161050e565b6000821215610cba57610c9782600003610c1e565b6a0c097ce7bc90715b34b9f160241b81610cb357610cb3611060565b0592915050565b60006806f05b59d3b20000008312610cf857506806f05b59d3b1ffffff199091019072195e54c5dd42177f53a27172fa9ec63026282760241b610d2e565b6803782dace9d90000008312610d2a57506803782dace9d8ffffff19909101906b1425982cf597cd205cef7380610d2e565b5060015b6064929092029168056bc75e2d6310000068ad78ebc5ac620000008412610d7e5768ad78ebc5ac61ffffff199093019268056bc75e2d631000006e01855144814a7ff805980ff008400082020590505b6856bc75e2d6310000008412610dba576856bc75e2d630ffffff199093019268056bc75e2d631000006b02df0ab5a80a22c61ab5a70082020590505b682b5e3af16b188000008412610df457682b5e3af16b187fffff199093019268056bc75e2d63100000693f1fce3da636ea5cf85082020590505b6815af1d78b58c4000008412610e2e576815af1d78b58c3fffff199093019268056bc75e2d63100000690127fa27722cc06cc5e282020590505b680ad78ebc5ac62000008412610e6757680ad78ebc5ac61fffff199093019268056bc75e2d6310000068280e60114edb805d0382020590505b68056bc75e2d631000008412610ea05768056bc75e2d630fffff199093019268056bc75e2d63100000680ebc5fb4174612111082020590505b6802b5e3af16b18800008412610ed9576802b5e3af16b187ffff199093019268056bc75e2d631000006808f00f760a4b2db55d82020590505b68015af1d78b58c400008412610f125768015af1d78b58c3ffff199093019268056bc75e2d631000006806f5f177578893793782020590505b68056bc75e2d631000008481019085906002908280020505918201919050600368056bc75e2d631000008783020505918201919050600468056bc75e2d631000008783020505918201919050600568056bc75e2d631000008783020505918201919050600668056bc75e2d631000008783020505918201919050600768056bc75e2d631000008783020505918201919050600868056bc75e2d631000008783020505918201919050600968056bc75e2d631000008783020505918201919050600a68056bc75e2d631000008783020505918201919050600b68056bc75e2d631000008783020505918201919050600c68056bc75e2d631000008783020505918201919050606468056bc75e2d63100000848402058502059695505050505050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176105a6576105a6611033565b634e487b7160e01b600052601260045260246000fd5b60008261108557611085611060565b500490565b6001600160a01b0392909216825263ffffffff16602082015260400190565b6000602082840312156110bb57600080fd5b5051919050565b805180151581146110d257600080fd5b919050565b6000806000606084860312156110ec57600080fd5b6110f5846110c2565b9250602084015161ffff8116811461110c57600080fd5b915061111a604085016110c2565b90509250925092565b60ff82811682821603908111156105a6576105a6611033565b600181815b8085111561117757816000190482111561115d5761115d611033565b8085161561116a57918102915b93841c9390800290611141565b509250929050565b60008261118e575060016105a6565b8161119b575060006105a6565b81600181146111b157600281146111bb576111d7565b60019150506105a6565b60ff8411156111cc576111cc611033565b50506001821b6105a6565b5060208310610133831016604e8410600b84101617156111fa575081810a6105a6565b611204838361113c565b806000190482111561121857611218611033565b029392505050565b600061096c60ff84168361117f565b6001600160a01b038116811461124457600080fd5b50565b60008060006060848603121561125c57600080fd5b83516112678161122f565b60208501519093506112788161122f565b60408501519092506112898161122f565b809150509250925092565b6000602082840312156112a657600080fd5b61096c826110c2565b6000602082840312156112c157600080fd5b81516001600160801b038116811461096c57600080fd5b818103818111156105a6576105a6611033565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6020808252825182820181905260009190848201906040850190845b8181101561135557835163ffffffff1683529284019291840191600101611333565b50909695505050505050565b80516001600160d81b03811681146110d257600080fd5b6000602080838503121561138b57600080fd5b82516001600160401b03808211156113a257600080fd5b818501915085601f8301126113b657600080fd5b8151818111156113c8576113c86112eb565b8060051b604051601f19603f830116810181811085821117156113ed576113ed6112eb565b60405291825284820192508381018501918883111561140b57600080fd5b938501935b828510156114305761142185611361565b84529385019392850192611410565b98975050505050505050565b6001600160d81b03828116828216039080821115610a7057610a70611033565b60006001600160d81b038381168061147657611476611060565b9216919091049291505056fea26469706673582212207edce4b0f198cd00968b46daf175bf47b33ef5f572378401881d8e73365a0e6864736f6c63430008170033",
|
|
181
|
-
"linkReferences": {},
|
|
182
|
-
"deployedLinkReferences": {}
|
|
183
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity ^0.8.17;
|
|
3
|
-
|
|
4
|
-
import "../../interfaces/IPPYLpOracle.sol";
|
|
5
|
-
import "../../interfaces/IPMarket.sol";
|
|
6
|
-
import "../../core/libraries/math/PMath.sol";
|
|
7
|
-
import "../PendleLpOracleLib.sol";
|
|
8
|
-
|
|
9
|
-
import {AggregatorV2V3Interface as IChainlinkAggregator} from "@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @notice The returned price from this contract is multiplied by the default USD price of the
|
|
13
|
-
* SY-equivalent token, as read from a Chainlink-interface oracle.
|
|
14
|
-
*
|
|
15
|
-
* Example of this usage:
|
|
16
|
-
* - PT-weETH = ptToSyRate * weETH price
|
|
17
|
-
* - PT-ezETH = ptToSyRate * ezETH price
|
|
18
|
-
*
|
|
19
|
-
* For more details into how the oracle is implemented, refer to PendlePYLpOracle & PendlePYOracleLib.
|
|
20
|
-
*/
|
|
21
|
-
contract BoringPYUsdChainlinkSYOracle {
|
|
22
|
-
using PendlePYOracleLib for IPMarket;
|
|
23
|
-
|
|
24
|
-
uint32 public immutable twapDuration;
|
|
25
|
-
address public immutable market;
|
|
26
|
-
address public immutable feed;
|
|
27
|
-
uint8 public immutable feedDecimals;
|
|
28
|
-
address public immutable pyLpOracle;
|
|
29
|
-
|
|
30
|
-
constructor(uint32 _twapDuration, address _market, address _feed, address _pyLpOracle) {
|
|
31
|
-
twapDuration = _twapDuration;
|
|
32
|
-
market = _market;
|
|
33
|
-
feed = _feed;
|
|
34
|
-
feedDecimals = IChainlinkAggregator(feed).decimals();
|
|
35
|
-
|
|
36
|
-
// required only for sample2
|
|
37
|
-
pyLpOracle = _pyLpOracle;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* @notice All pricing functions in this contract should only be used after checkOracleState() is ran successfully without reverting.
|
|
41
|
-
* This equals to calling checkOracleState() in your oracle constructor.
|
|
42
|
-
*/
|
|
43
|
-
// checkOracleState();
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/// @notice direct integration with PendlePYOracleLib, which optimizes gas efficiency.
|
|
47
|
-
/// @notice please checkOracleState() before use
|
|
48
|
-
function getPtPriceSample1() external view virtual returns (uint256) {
|
|
49
|
-
uint256 ptRate = IPMarket(market).getPtToSyRate(twapDuration);
|
|
50
|
-
uint256 syEquivalentTokenPrice = _getSYEquivalentTokenPrice();
|
|
51
|
-
return (syEquivalentTokenPrice * ptRate) / PMath.ONE;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/// @notice integration with the PendlePtOracle contract, resulting in a smaller bytecode size and simpler structure
|
|
55
|
-
/// but slightly higher gas usage (~ 4000 gas, 2 external calls & 1 cold code load)
|
|
56
|
-
/// @notice please checkOracleState() before use
|
|
57
|
-
function getPtPriceSample2() external view virtual returns (uint256) {
|
|
58
|
-
uint256 ptRate = IPPYLpOracle(pyLpOracle).getPtToSyRate(market, twapDuration);
|
|
59
|
-
uint256 syEquivalentTokenPrice = _getSYEquivalentTokenPrice();
|
|
60
|
-
return (syEquivalentTokenPrice * ptRate) / PMath.ONE;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function getYtPriceSample1() external view virtual returns (uint256) {
|
|
64
|
-
uint256 ytRate = IPMarket(market).getYtToSyRate(twapDuration);
|
|
65
|
-
uint256 syEquivalentTokenPrice = _getSYEquivalentTokenPrice();
|
|
66
|
-
return (syEquivalentTokenPrice * ytRate) / PMath.ONE;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function getYtPriceSample2() external view virtual returns (uint256) {
|
|
70
|
-
uint256 ytRate = IPPYLpOracle(pyLpOracle).getYtToSyRate(market, twapDuration);
|
|
71
|
-
uint256 syEquivalentTokenPrice = _getSYEquivalentTokenPrice();
|
|
72
|
-
return (syEquivalentTokenPrice * ytRate) / PMath.ONE;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function _getSYEquivalentTokenPrice() internal view virtual returns (uint256) {
|
|
76
|
-
uint256 rawPrice = uint256(IChainlinkAggregator(feed).latestAnswer());
|
|
77
|
-
return feedDecimals < 18 ? rawPrice * 10 ** (18 - feedDecimals) : rawPrice / 10 ** (feedDecimals - 18);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// ------------------ NOT TO INCLUDE IN PRODUCTION CODE ------------------
|
|
81
|
-
|
|
82
|
-
error IncreaseCardinalityRequired(uint16 cardinalityRequired);
|
|
83
|
-
error AdditionalWaitRequired(uint32 duration);
|
|
84
|
-
|
|
85
|
-
/// @notice Call only once for each (market, duration). Once successful, it's permanently valid (also for any shorter duration).
|
|
86
|
-
function checkOracleState() external view {
|
|
87
|
-
(bool increaseCardinalityRequired, uint16 cardinalityRequired, bool oldestObservationSatisfied) = IPPYLpOracle(
|
|
88
|
-
pyLpOracle
|
|
89
|
-
).getOracleState(market, twapDuration);
|
|
90
|
-
|
|
91
|
-
if (increaseCardinalityRequired) {
|
|
92
|
-
// It's required to call IPMarket(market).increaseObservationsCardinalityNext(cardinalityRequired) and wait for
|
|
93
|
-
// at least the twapDuration, to allow data population.
|
|
94
|
-
revert IncreaseCardinalityRequired(cardinalityRequired);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (!oldestObservationSatisfied) {
|
|
98
|
-
// It's necessary to wait for at least the twapDuration, to allow data population.
|
|
99
|
-
revert AdditionalWaitRequired(twapDuration);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|