diff --git a/script/Deploy.s.sol b/script/Deploy.s.sol index cac1e0d..859c472 100644 --- a/script/Deploy.s.sol +++ b/script/Deploy.s.sol @@ -2,6 +2,8 @@ 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"; @@ -9,6 +11,8 @@ 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 @@ -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), @@ -49,6 +59,7 @@ contract Deploy is Script { ); DelegateStaking delegate = new DelegateStaking(); + vm.label(address(delegate), "DelegateStaking"); delegateProxy = DelegateStaking( address( new TransparentUpgradeableProxy( @@ -58,6 +69,7 @@ contract Deploy is Script { ) ) ); + vm.label(address(delegateProxy), "DelegateStakingProxy"); IERC20Metadata(STAKING_TOKEN).approve( address(delegateProxy),