Skip to content

Commit

Permalink
Add new migration scripts and deployment artifacts for Aave workflows…
Browse files Browse the repository at this point in the history
… and Viewer contract upgrades across multiple chains.
  • Loading branch information
ylv-io committed Nov 13, 2024
1 parent 04983a0 commit cf5a879
Show file tree
Hide file tree
Showing 8 changed files with 1,338 additions and 2 deletions.
408 changes: 408 additions & 0 deletions broadcast/145-upgrade_access_protocol.s.sol/8453/run-1731531756.json

Large diffs are not rendered by default.

408 changes: 408 additions & 0 deletions broadcast/145-upgrade_access_protocol.s.sol/8453/run-latest.json

Large diffs are not rendered by default.

117 changes: 117 additions & 0 deletions broadcast/146-upgrade-access-viewer.s.sol/42161/run-1731531235.json

Large diffs are not rendered by default.

117 changes: 117 additions & 0 deletions broadcast/146-upgrade-access-viewer.s.sol/42161/run-latest.json

Large diffs are not rendered by default.

125 changes: 125 additions & 0 deletions broadcast/146-upgrade-access-viewer.s.sol/8453/run-1731531918.json

Large diffs are not rendered by default.

125 changes: 125 additions & 0 deletions broadcast/146-upgrade-access-viewer.s.sol/8453/run-latest.json

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions script/migrations/146-upgrade-access-viewer.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;

import {SafeBeaconProxy} from "@kinto-core/proxy/SafeBeaconProxy.sol";
import {Viewer} from "@kinto-core/viewers/Viewer.sol";

import {UUPSProxy} from "@kinto-core-test/helpers/UUPSProxy.sol";
import {MigrationHelper} from "@kinto-core-script/utils/MigrationHelper.sol";

import {Script} from "forge-std/Script.sol";
import {console2} from "forge-std/console2.sol";

contract DeployViewerScript is Script, MigrationHelper {
function run() public override {
super.run();

Viewer viewer = Viewer(_getChainDeployment("Viewer"));
if (address(viewer) == address(0)) {
console2.log("Viewer is not deployed");
return;
}

vm.broadcast(deployerPrivateKey);
address newImpl = address(new Viewer(getAavePoolProvider(), _getChainDeployment("AccessRegistry")));

vm.broadcast(deployerPrivateKey);
viewer.upgradeTo(newImpl);

require(viewer.getBalances(new address[](0), address(this)).length == 0, "getBalances not working");
}
}

8 changes: 6 additions & 2 deletions test/artifacts/8453/addresses.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,9 @@
"Viewer": "0x8888886e1d7c1468d7300cF08db89FFE68F29830",
"Viewer-impl": "0x053D6CAfEA290CACE8C56E26d092D76871999d50",
"WethWorkflow": "0xC8Bb693Be58f390AC526f1822A3c7d79CbE93157",
"WithdrawWorkflow": "0xdC70c1c6c49AC9B3cA50E2F9079843545646524a"
}
"WithdrawWorkflow": "0xdC70c1c6c49AC9B3cA50E2F9079843545646524a",
"AaveLendWorkflow": "0x720E7BC50C5Db2B387463F3f58E51D4eEa4513E5",
"AaveRepayWorkflow": "0xCbA916cbcC56E911C422C1091d9035362AA7B0EE",
"AaveWithdrawWorkflow": "0x6cffCa3cE5285Aa7FEef445E8dd37F7E4cb24Dc9",
"AaveBorrowWorkflow": "0x4324Fd882507A065FD99E0C6B9332cA2912658A0"
}

0 comments on commit cf5a879

Please sign in to comment.