Skip to content

Commit

Permalink
update accounts, reseed scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brean0 committed Sep 23, 2024
1 parent a602a56 commit 0cb7518
Show file tree
Hide file tree
Showing 3 changed files with 3,667 additions and 20 deletions.
26 changes: 8 additions & 18 deletions protocol/reseed/dataConverts/convertGlobal.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,24 +193,14 @@ function parseGlobals(inputFilePath, outputFilePath) {
"5000000"
],
// ShipmentRoute
// data.shipmentRoutes.length
// ? data.shipmentRoutes.map((route) => [
// route.planContract || "0x0000000000000000000000000000000000000000",
// route.planSelector || "0x00000000",
// route.recipient ? convertToBigNum(route.recipient) : "0",
// route.data || "0x"
// ])
// : [["0x0000000000000000000000000000000000000000", "0x00000000", "0", "0x"]]
[
["0x0000000000000000000000000000000000000000", "0x7c655075", "1", "0x"],
[
"0x0000000000000000000000000000000000000000",
"0x12e8d3ed",
"2",
"0x0000000000000000000000000000000000000000000000000000000000000000"
],
["0x0000000000000000000000000000000000000000", "0x43055ba8", "3", "0x"]
]
data.shipmentRoutes.length
? data.shipmentRoutes.map((route) => [
route.planContract || "0x0000000000000000000000000000000000000000",
route.planSelector || "0x00000000",
route.recipient ? convertToBigNum(route.recipient) : "0",
route.data || "0x"
])
: [["0x0000000000000000000000000000000000000000", "0x00000000", "0", "0x"]]
];

fs.writeFileSync(outputFilePath, JSON.stringify(result, null, 2));
Expand Down
4 changes: 3 additions & 1 deletion protocol/reseed/reseedL2.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ async function reseedL2({
if (i == reseeds.length - 2) {
// prior to the last reseed (i.e, adding facets to L2 beanstalk),
// the Beanstalk deployer needs to transfer ownership to the beanstalk owner.
console.log("Transferring ownership to the beanstalk owner.");
await upgradeWithNewFacets({
diamondAddress: l2BeanstalkAddress,
facetNames: ["OwnershipFacet"],
Expand All @@ -88,8 +89,9 @@ async function reseedL2({
initFacetNameInfo: "ReseedTransferOwnership"
});
}
if (i == reseeds.length - 1 && !onlyState) {
if (i == reseeds.length - 1) {
// claim ownership of beanstalk:
console.log("Claiming ownership of beanstalk.");
await (await getBeanstalk(l2BeanstalkAddress)).connect(l2owner).claimOwnership();
// initialize beanstalk state add selectors to L2 beanstalk.
await reseed10(l2owner, l2BeanstalkAddress, mock);
Expand Down
Loading

0 comments on commit 0cb7518

Please sign in to comment.