Skip to content

Commit

Permalink
👷🚀 deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
cmontecoding committed Nov 19, 2024
1 parent 1aec566 commit 605ee96
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions scripts/UpgradeRewardEscrowV2.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.19;

contract UpgradeRewardEscrowV2 is Script {
function deployRewardEscrow(
address _kwenta,
address _rewardsNotifier
bool _printLogs
) public {
uint256 deployerPrivateKey = vm.envUint("DEPLOYER_PRIVATE_KEY");
vm.startBroadcast(deployerPrivateKey);

rewardEscrowV2Implementation =
address(new RewardEscrowV2(_kwenta, address(_rewardsNotifier)));
rewardEscrowV2 = RewardEscrowV2(
address(
new ERC1967Proxy(
rewardEscrowV2Implementation,
abi.encodeWithSignature(
"initialize(address)",
_owner
)
)
)
);

if (_printLogs) {
console.log(
"Deployed RewardEscrowV2 Implementation at %s", rewardEscrowV2Implementation
);
}
if (_printLogs) console.log("Deployed RewardEscrowV2 Proxy at %s", address(rewardEscrowV2));

vm.stopBroadcast();
}
}

0 comments on commit 605ee96

Please sign in to comment.