diff --git a/contracts/l1-deployer-cli.sh b/contracts/l1-deployer-cli.sh index 4540cc92d..cbc4602a0 100755 --- a/contracts/l1-deployer-cli.sh +++ b/contracts/l1-deployer-cli.sh @@ -5,6 +5,7 @@ deploy_vanilla_flag=false deploy_avs_flag=false deploy_middleware_flag=false deploy_router_flag=false +deploy_rewards_flag=false skip_release_verification_flag=false resume_flag=false wallet_type="" @@ -24,6 +25,7 @@ help() { echo " deploy-avs Deploy and verify the MevCommitAVS contract to L1." echo " deploy-middleware Deploy and verify the MevCommitMiddleware contract to L1." echo " deploy-router Deploy and verify the ValidatorOptInRouter contract to L1." + echo " deploy-rewards Deploy and verify the RewardManager contract to L1." echo echo "Required Options:" echo " --chain, -c Specify the chain to deploy to ('mainnet' or 'holesky')." @@ -122,6 +124,10 @@ parse_args() { deploy_router_flag=true shift ;; + deploy-rewards) + deploy_rewards_flag=true + shift + ;; --chain|-c) if [[ -z "$2" ]]; then echo "Error: --chain requires an argument." @@ -383,6 +389,10 @@ deploy_router() { deploy_contract_generic "scripts/validator-registry/DeployValidatorOptInRouter.s.sol" } +deploy_rewards() { + deploy_contract_generic "scripts/validator-registry/rewards/DeployRewardManager.s.sol" +} + main() { check_dependencies parse_args "$@" @@ -406,6 +416,8 @@ main() { deploy_middleware elif [[ "${deploy_router_flag}" == true ]]; then deploy_router + elif [[ "${deploy_rewards_flag}" == true ]]; then + deploy_rewards else usage fi diff --git a/contracts/scripts/validator-registry/rewards/DeployRewardManager.s.sol b/contracts/scripts/validator-registry/rewards/DeployRewardManager.s.sol new file mode 100644 index 000000000..cad5f2579 --- /dev/null +++ b/contracts/scripts/validator-registry/rewards/DeployRewardManager.s.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: BSL 1.1 + +// solhint-disable no-console +// solhint-disable one-contract-per-file + +pragma solidity 0.8.26; +import {RewardManager} from "../../../contracts/validator-registry/rewards/RewardManager.sol"; +import {Script} from "forge-std/Script.sol"; +import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol"; +import {MainnetConstants} from "../../MainnetConstants.sol"; +import {console} from "forge-std/console.sol"; + +contract DeployMainnet is Script { + address constant public VANILLA_REGISTRY = 0x47afdcB2B089C16CEe354811EA1Bbe0DB7c335E9; + address constant public MEV_COMMIT_AVS = 0xBc77233855e3274E1903771675Eb71E602D9DC2e; + address constant public MEV_COMMIT_MIDDLEWARE = 0x21fD239311B050bbeE7F32850d99ADc224761382; + uint256 constant public AUTO_CLAIM_GAS_LIMIT = 250_000; + address constant public OWNER = MainnetConstants.PRIMEV_TEAM_MULTISIG; + function run() public { + require(block.chainid == 1, "must deploy on mainnet"); + vm.startBroadcast(); + + address proxy = Upgrades.deployUUPSProxy( + "RewardManager.sol", + abi.encodeCall( + RewardManager.initialize, + (VANILLA_REGISTRY, + MEV_COMMIT_AVS, + MEV_COMMIT_MIDDLEWARE, + AUTO_CLAIM_GAS_LIMIT, + OWNER) + ) + ); + console.log("RewardManager UUPS proxy deployed to:", address(proxy)); + vm.stopBroadcast(); + } +}