Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sambacha committed Dec 24, 2023
2 parents 25149b6 + 2a06297 commit 71f784d
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
26 changes: 26 additions & 0 deletions nix/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,32 @@
--rpc-url $RPC_GOERLI $@
'';
}
{
category = "deployments";
name = "deploy-auth-manager";
help = "Deploy the AuthManager";
command = ''
forge script $PRJ_ROOT/script/AuthManager.s.sol:AuthManagerDeployScript \
--chain-id 1 \
--rpc-url $RPC_MAINNET \
--broadcast \
--private-key $PRIVATE_KEY \
--verify \
--etherscan-api-key $ETHERSCAN_API_KEY \
-vvvvv
'';
}
{
category = "deployments";
name = "deploy-auth-manager-test";
help = "Deploy the AuthManager test";
command = ''
forge script $PRJ_ROOT/script/AuthManager.s.sol:AuthManagerDeployScript \
--chain-id 1 \
--fork-url $RPC_MAINNET \
-vvvvv
'';
}
{
category = "deployments";
name = "deploy-arbitrum";
Expand Down
25 changes: 25 additions & 0 deletions script/AuthManager.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.19;

import "forge-std/Script.sol";
import { IAuth } from "src/interfaces/IAuth.sol";
import { AuthManager } from "src/libraries/AuthManager.sol";

contract AuthManagerDeployScript is Script {
function run() public {
address safe = 0x617c8dE5BdE54ffbb8d92716CC947858cA38f582;
address authority = safe;
address mevEth = 0x24Ae2dA0f361AA4BE46b48EB19C91e02c5e4f27E;
address initialShareVault = safe;
address initialStakingModule = 0xc5920c99d09E5444C079C01F06763b5d6AB09CbB;

vm.startBroadcast();
// deploy AuthManager
AuthManager authManager = new AuthManager(authority, mevEth, initialShareVault, initialStakingModule);
// set AuthManager as admin
IAuth(mevEth).addAdmin(address(authManager));
IAuth(initialStakingModule).addAdmin(address(authManager));

vm.stopBroadcast();
}
}

0 comments on commit 71f784d

Please sign in to comment.