File tree 1 file changed +36
-0
lines changed
1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ // SPDX-License-Identifier: GPL-3.0-or-later
2
+ pragma solidity 0.8.19 ;
3
+
4
+ contract UpgradeRewardEscrowV2 is Script {
5
+ function deployRewardEscrow (
6
+ address _kwenta ,
7
+ address _rewardsNotifier
8
+ bool _printLogs
9
+ ) public {
10
+ uint256 deployerPrivateKey = vm.envUint ("DEPLOYER_PRIVATE_KEY " );
11
+ vm.startBroadcast (deployerPrivateKey);
12
+
13
+ rewardEscrowV2Implementation =
14
+ address (new RewardEscrowV2 (_kwenta, address (_rewardsNotifier)));
15
+ rewardEscrowV2 = RewardEscrowV2 (
16
+ address (
17
+ new ERC1967Proxy (
18
+ rewardEscrowV2Implementation,
19
+ abi.encodeWithSignature (
20
+ "initialize(address) " ,
21
+ _owner
22
+ )
23
+ )
24
+ )
25
+ );
26
+
27
+ if (_printLogs) {
28
+ console.log (
29
+ "Deployed RewardEscrowV2 Implementation at %s " , rewardEscrowV2Implementation
30
+ );
31
+ }
32
+ if (_printLogs) console.log ("Deployed RewardEscrowV2 Proxy at %s " , address (rewardEscrowV2));
33
+
34
+ vm.stopBroadcast ();
35
+ }
36
+ }
You can’t perform that action at this time.
0 commit comments