Skip to content

Commit 605ee96

Browse files
committedNov 19, 2024·
👷🚀 deployment script
1 parent 1aec566 commit 605ee96

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
 

‎scripts/UpgradeRewardEscrowV2.s.sol

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
}

0 commit comments

Comments
 (0)
Please sign in to comment.