From 48aa2a956ebc3819c6b640a5057a77c155e24a4a Mon Sep 17 00:00:00 2001 From: Shawn <44221603+shaspitz@users.noreply.github.com> Date: Thu, 5 Dec 2024 19:31:01 -0800 Subject: [PATCH] Add DeployMainnet for router file --- .../DeployValidatorOptInRouter.s.sol | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/contracts/scripts/validator-registry/DeployValidatorOptInRouter.s.sol b/contracts/scripts/validator-registry/DeployValidatorOptInRouter.s.sol index 9f6aef56f..ed3da864d 100644 --- a/contracts/scripts/validator-registry/DeployValidatorOptInRouter.s.sol +++ b/contracts/scripts/validator-registry/DeployValidatorOptInRouter.s.sol @@ -9,6 +9,7 @@ import {Script} from "forge-std/Script.sol"; import {console} from "forge-std/console.sol"; import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol"; import {ValidatorOptInRouter} from "../../contracts/validator-registry/ValidatorOptInRouter.sol"; +import {MainnetConstants} from "../MainnetConstants.sol"; contract BaseDeploy is Script { function deployValidatorOptInRouter( @@ -32,6 +33,34 @@ contract BaseDeploy is Script { } } +/// Temporary stand-in until the mev-commit middleware and symbiotic core, are ready for mainnet. +contract AlwaysFalseMevCommitMiddleware { + function isValidatorOptedIn(bytes calldata) external pure returns (bool) { + return false; + } +} + +contract DeployMainnet is BaseDeploy { + address constant public VANILLA_REGISTRY = 0x47afdcB2B089C16CEe354811EA1Bbe0DB7c335E9; + address constant public MEV_COMMIT_AVS = 0xBc77233855e3274E1903771675Eb71E602D9DC2e; + address constant public OWNER = MainnetConstants.PRIMEV_TEAM_MULTISIG; + + function run() external { + require(block.chainid == 1, "must deploy on mainnet"); + vm.startBroadcast(); + + AlwaysFalseMevCommitMiddleware alwaysFalseMevCommitMiddleware = new AlwaysFalseMevCommitMiddleware(); + + deployValidatorOptInRouter( + VANILLA_REGISTRY, + MEV_COMMIT_AVS, + address(alwaysFalseMevCommitMiddleware), + OWNER + ); + vm.stopBroadcast(); + } +} + contract DeployHolesky is BaseDeploy { address constant public VANILLA_REGISTRY = 0x87D5F694fAD0b6C8aaBCa96277DE09451E277Bcf; address constant public MEV_COMMIT_AVS = 0xEDEDB8ed37A43Fd399108A44646B85b780D85DD4;