Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add mainnet deployment contract for validator opt-in router #520

Merged
merged 2 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions contracts/contracts/utils/AlwaysFalseMiddleware.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// SPDX-License-Identifier: BSL 1.1
pragma solidity 0.8.26;

/// 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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ 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";
import {AlwaysFalseMevCommitMiddleware} from "../../contracts/utils/AlwaysFalseMiddleware.sol";

contract BaseDeploy is Script {
function deployValidatorOptInRouter(
Expand All @@ -32,6 +34,27 @@ contract BaseDeploy is Script {
}
}

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;
Expand Down
Loading