From cafb15255cd5bf254853e42a3ad22d6dbe8b9c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BBuk?= Date: Thu, 20 Jul 2023 11:15:42 +0200 Subject: [PATCH] BLOCKCHAIN-48 - contracts upgrade script --- eth-bridge/contracts/script/Upgrade.s.sol | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 eth-bridge/contracts/script/Upgrade.s.sol diff --git a/eth-bridge/contracts/script/Upgrade.s.sol b/eth-bridge/contracts/script/Upgrade.s.sol new file mode 100644 index 000000000..520319e23 --- /dev/null +++ b/eth-bridge/contracts/script/Upgrade.s.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.18; + +import "forge-std/Script.sol"; +import "../src/Bridge.sol"; + +contract Deploy is Script { + function run() external { + vm.startBroadcast(); + Bridge lldProxy = Bridge(vm.envAddress("LLDProxy")); + Bridge llmProxy = Bridge(vm.envAddress("LLMProxy")); + + Bridge newBridgeImpl = new Bridge(); + + lldProxy.upgradeTo(address(newBridgeImpl)); + llmProxy.upgradeTo(address(newBridgeImpl)); + } +}