Skip to content

Commit 6800a35

Browse files
committed
deployed new policy implementation
1 parent 91bac7b commit 6800a35

File tree

3 files changed

+212
-7
lines changed

3 files changed

+212
-7
lines changed

.openzeppelin/mainnet.json

Lines changed: 205 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,23 @@
5959
"label": "uFrags",
6060
"offset": 0,
6161
"slot": "102",
62-
"type": "t_contract(IUFragments)1177",
62+
"type": "t_contract(IUFragments)4306",
6363
"contract": "UFragmentsPolicy",
6464
"src": "contracts/UFragmentsPolicy.sol:40"
6565
},
6666
{
6767
"label": "cpiOracle",
6868
"offset": 0,
6969
"slot": "103",
70-
"type": "t_contract(IOracle)1185",
70+
"type": "t_contract(IOracle)4314",
7171
"contract": "UFragmentsPolicy",
7272
"src": "contracts/UFragmentsPolicy.sol:43"
7373
},
7474
{
7575
"label": "marketOracle",
7676
"offset": 0,
7777
"slot": "104",
78-
"type": "t_contract(IOracle)1185",
78+
"type": "t_contract(IOracle)4314",
7979
"contract": "UFragmentsPolicy",
8080
"src": "contracts/UFragmentsPolicy.sol:47"
8181
},
@@ -189,11 +189,211 @@
189189
"label": "bool",
190190
"numberOfBytes": "1"
191191
},
192-
"t_contract(IOracle)1185": {
192+
"t_contract(IOracle)4314": {
193193
"label": "contract IOracle",
194194
"numberOfBytes": "20"
195195
},
196-
"t_contract(IUFragments)1177": {
196+
"t_contract(IUFragments)4306": {
197+
"label": "contract IUFragments",
198+
"numberOfBytes": "20"
199+
},
200+
"t_int256": {
201+
"label": "int256",
202+
"numberOfBytes": "32"
203+
},
204+
"t_uint256": {
205+
"label": "uint256",
206+
"numberOfBytes": "32"
207+
}
208+
}
209+
}
210+
},
211+
"48a1e26da957363514647440ab4b33a0cf48bd6fa95acee2a194faceb2076760": {
212+
"address": "0x2C628463de226433820DD479Be27360Deb4592d1",
213+
"txHash": "0x2a444748f3c63ad130a3cd16258c709d0abf0508bc807c2396239299c1fe4f0f",
214+
"layout": {
215+
"solcVersion": "0.8.4",
216+
"storage": [
217+
{
218+
"label": "initialized",
219+
"offset": 0,
220+
"slot": "0",
221+
"type": "t_bool",
222+
"contract": "Initializable",
223+
"src": "contracts/_external/Initializable.sol:19"
224+
},
225+
{
226+
"label": "initializing",
227+
"offset": 1,
228+
"slot": "0",
229+
"type": "t_bool",
230+
"contract": "Initializable",
231+
"src": "contracts/_external/Initializable.sol:24"
232+
},
233+
{
234+
"label": "______gap",
235+
"offset": 0,
236+
"slot": "1",
237+
"type": "t_array(t_uint256)50_storage",
238+
"contract": "Initializable",
239+
"src": "contracts/_external/Initializable.sol:69"
240+
},
241+
{
242+
"label": "_owner",
243+
"offset": 0,
244+
"slot": "51",
245+
"type": "t_address",
246+
"contract": "Ownable",
247+
"src": "contracts/_external/Ownable.sol:11"
248+
},
249+
{
250+
"label": "______gap",
251+
"offset": 0,
252+
"slot": "52",
253+
"type": "t_array(t_uint256)50_storage",
254+
"contract": "Ownable",
255+
"src": "contracts/_external/Ownable.sol:75"
256+
},
257+
{
258+
"label": "uFrags",
259+
"offset": 0,
260+
"slot": "102",
261+
"type": "t_contract(IUFragments)2591",
262+
"contract": "UFragmentsPolicy",
263+
"src": "contracts/UFragmentsPolicy.sol:48"
264+
},
265+
{
266+
"label": "cpiOracle",
267+
"offset": 0,
268+
"slot": "103",
269+
"type": "t_contract(IOracle)2599",
270+
"contract": "UFragmentsPolicy",
271+
"src": "contracts/UFragmentsPolicy.sol:51"
272+
},
273+
{
274+
"label": "marketOracle",
275+
"offset": 0,
276+
"slot": "104",
277+
"type": "t_contract(IOracle)2599",
278+
"contract": "UFragmentsPolicy",
279+
"src": "contracts/UFragmentsPolicy.sol:55"
280+
},
281+
{
282+
"label": "baseCpi_DEPRECATED",
283+
"offset": 0,
284+
"slot": "105",
285+
"type": "t_uint256",
286+
"contract": "UFragmentsPolicy",
287+
"src": "contracts/UFragmentsPolicy.sol:58",
288+
"renamedFrom": "baseCpi"
289+
},
290+
{
291+
"label": "deviationThreshold",
292+
"offset": 0,
293+
"slot": "106",
294+
"type": "t_uint256",
295+
"contract": "UFragmentsPolicy",
296+
"src": "contracts/UFragmentsPolicy.sol:64"
297+
},
298+
{
299+
"label": "rebaseLagDeprecated",
300+
"offset": 0,
301+
"slot": "107",
302+
"type": "t_uint256",
303+
"contract": "UFragmentsPolicy",
304+
"src": "contracts/UFragmentsPolicy.sol:66"
305+
},
306+
{
307+
"label": "minRebaseTimeIntervalSec",
308+
"offset": 0,
309+
"slot": "108",
310+
"type": "t_uint256",
311+
"contract": "UFragmentsPolicy",
312+
"src": "contracts/UFragmentsPolicy.sol:69"
313+
},
314+
{
315+
"label": "lastRebaseTimestampSec",
316+
"offset": 0,
317+
"slot": "109",
318+
"type": "t_uint256",
319+
"contract": "UFragmentsPolicy",
320+
"src": "contracts/UFragmentsPolicy.sol:72"
321+
},
322+
{
323+
"label": "rebaseWindowOffsetSec",
324+
"offset": 0,
325+
"slot": "110",
326+
"type": "t_uint256",
327+
"contract": "UFragmentsPolicy",
328+
"src": "contracts/UFragmentsPolicy.sol:76"
329+
},
330+
{
331+
"label": "rebaseWindowLengthSec",
332+
"offset": 0,
333+
"slot": "111",
334+
"type": "t_uint256",
335+
"contract": "UFragmentsPolicy",
336+
"src": "contracts/UFragmentsPolicy.sol:79"
337+
},
338+
{
339+
"label": "epoch",
340+
"offset": 0,
341+
"slot": "112",
342+
"type": "t_uint256",
343+
"contract": "UFragmentsPolicy",
344+
"src": "contracts/UFragmentsPolicy.sol:82"
345+
},
346+
{
347+
"label": "orchestrator",
348+
"offset": 0,
349+
"slot": "113",
350+
"type": "t_address",
351+
"contract": "UFragmentsPolicy",
352+
"src": "contracts/UFragmentsPolicy.sol:93"
353+
},
354+
{
355+
"label": "rebaseFunctionLowerPercentage",
356+
"offset": 0,
357+
"slot": "114",
358+
"type": "t_int256",
359+
"contract": "UFragmentsPolicy",
360+
"src": "contracts/UFragmentsPolicy.sol:97"
361+
},
362+
{
363+
"label": "rebaseFunctionUpperPercentage",
364+
"offset": 0,
365+
"slot": "115",
366+
"type": "t_int256",
367+
"contract": "UFragmentsPolicy",
368+
"src": "contracts/UFragmentsPolicy.sol:98"
369+
},
370+
{
371+
"label": "rebaseFunctionGrowth",
372+
"offset": 0,
373+
"slot": "116",
374+
"type": "t_int256",
375+
"contract": "UFragmentsPolicy",
376+
"src": "contracts/UFragmentsPolicy.sol:99"
377+
}
378+
],
379+
"types": {
380+
"t_address": {
381+
"label": "address",
382+
"numberOfBytes": "20"
383+
},
384+
"t_array(t_uint256)50_storage": {
385+
"label": "uint256[50]",
386+
"numberOfBytes": "1600"
387+
},
388+
"t_bool": {
389+
"label": "bool",
390+
"numberOfBytes": "1"
391+
},
392+
"t_contract(IOracle)2599": {
393+
"label": "contract IOracle",
394+
"numberOfBytes": "20"
395+
},
396+
"t_contract(IUFragments)2591": {
197397
"label": "contract IUFragments",
198398
"numberOfBytes": "20"
199399
},

scripts/helpers.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ export async function getContractFactoryFromExternalArtifacts(
1616
return hre.ethers.getContractFactoryFromArtifact(artifact)
1717
}
1818

19+
export async function sleep(sleepSec: number) {
20+
await new Promise(resolve => setTimeout(resolve, sleepSec));
21+
}
22+
1923
export async function waitFor(tx: TransactionResponse) {
2024
return (await tx).wait()
2125
}

scripts/upgrade.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Interface } from '@ethersproject/abi'
77
import { TransactionReceipt } from '@ethersproject/providers'
88
import ProxyAdmin from '@openzeppelin/upgrades-core/artifacts/ProxyAdmin.json'
99

10-
import { getContractFactoryFromExternalArtifacts, verify } from './helpers'
10+
import { getContractFactoryFromExternalArtifacts, verify, sleep } from './helpers'
1111

1212
const parseEvents = (
1313
receipt: TransactionReceipt,
@@ -132,5 +132,6 @@ task('prep:upgrade:policy')
132132
)
133133
console.log(`proxyAdmin.upgrade(${args.address}, ${newImpl})`)
134134

135-
await verify(hre, newImpl.address, [])
135+
await sleep(15)
136+
await verify(hre, newImpl, [])
136137
})

0 commit comments

Comments
 (0)