Skip to content
Draft
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
12 changes: 12 additions & 0 deletions contracts/l1-deployer-cli.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we need to add the new flag on line 212

Original file line number Diff line number Diff line change
Expand Up @@ -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=""
Expand All @@ -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 <chain> Specify the chain to deploy to ('mainnet' or 'holesky')."
Expand Down Expand Up @@ -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."
Expand Down Expand Up @@ -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 "$@"
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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();
}
}
Loading