Skip to content

Commit

Permalink
add labels to Deploy.s.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
anajuliabit committed Sep 21, 2024
1 parent 1b5ca1d commit cc7d64a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
pragma solidity 0.8.26;

import "@forge-std/Script.sol";
import "@forge-std/Test.sol";

import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import {RewardsDistributor} from "src/RewardsDistributor.sol";
import {DelegateStaking} from "src/DelegateStaking.sol";
import {Staking} from "src/Staking.sol";
import "./Constants.sol";

// forge script script/Deploy.s.sol --rpc-url mainnet -vvvvv --slow --always-use-create-2-factory --account test --etherscan-api-key mainnet --chain 1 --code-size-limit 40000
// --verify --broadcast
contract Deploy is Script {
function run()
public
Expand All @@ -18,22 +22,28 @@ contract Deploy is Script {
DelegateStaking delegateProxy
)
{
vm.label(STAKING_TOKEN, "StakingToken");

vm.startBroadcast();

rewardsDistributor = new RewardsDistributor(
CONTRACT_OWNER,
STAKING_TOKEN
address(STAKING_TOKEN)
);
vm.label(address(rewardsDistributor), "RewardsDistributor");

Staking stake = new Staking();
vm.label(address(stake), "Staking");
stakingProxy = Staking(
address(
new TransparentUpgradeableProxy(
address(new Staking()),
address(stake),
address(CONTRACT_OWNER),
""
)
)
);
vm.label(address(stakingProxy), "StakingProxy");

IERC20Metadata(STAKING_TOKEN).approve(
address(stakingProxy),
Expand All @@ -49,6 +59,7 @@ contract Deploy is Script {
);

DelegateStaking delegate = new DelegateStaking();
vm.label(address(delegate), "DelegateStaking");
delegateProxy = DelegateStaking(
address(
new TransparentUpgradeableProxy(
Expand All @@ -58,6 +69,7 @@ contract Deploy is Script {
)
)
);
vm.label(address(delegateProxy), "DelegateStakingProxy");

IERC20Metadata(STAKING_TOKEN).approve(
address(delegateProxy),
Expand Down

0 comments on commit cc7d64a

Please sign in to comment.