// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; import "@forge-std/Script.sol"; import { RelayerRegistry } from "@root/v4-patch/RelayerRegistry.sol"; import { TornadoStakingRewards } from "@root/v4-patch/TornadoStakingRewards.sol"; import { AdminUpgradeableProxy } from "@root/v4-patch/AdminUpgradeableProxy.sol"; import { PatchProposal } from "@root/v4-patch/PatchProposal.sol"; import { Parameters } from "@proprietary/Parameters.sol"; contract DeployScript is Script, Parameters { function run() external { uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); vm.startBroadcast(deployerPrivateKey); TornadoStakingRewards governanceStakingImplementation = new TornadoStakingRewards(_governanceAddress, _tokenAddress, _relayerRegistryAddress); // We don't need initialization parameters to deploy Governance Staking Proxy contract bytes memory empty; AdminUpgradeableProxy governanceStakingProxy = new AdminUpgradeableProxy(address(governanceStakingImplementation), _governanceAddress, empty); // Deploy new relayer registry implementation after staking, because we need refer to staking proxy in registry contract RelayerRegistry relayerRegistryImplementation = new RelayerRegistry(_tokenAddress, _governanceAddress, _ensAddress, address(governanceStakingProxy), _feeManagerAddress); PatchProposal patchProposal = new PatchProposal(address(governanceStakingProxy), address(relayerRegistryImplementation)); vm.stopBroadcast(); } }