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

Berachain Deployment #132

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
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
8 changes: 4 additions & 4 deletions deploy/002-access-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { DeployFunction } from "hardhat-deploy/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";

import { SUPPORTED_NETWORKS } from "../helpers/deploy/constants";
import { getAcmAdminAccount } from "../helpers/deploy/deploymentUtils";

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deployments, getNamedAccounts } = hre;
Expand All @@ -15,14 +14,15 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
args: [],
log: true,
autoMine: true,
skipIfAlreadyDeployed: true,
});

const acm = await ethers.getContractAt("AccessControlManager", acmDeployment.address);
if (hre.network.live) {
const networkName = hre.network.name as SUPPORTED_NETWORKS;
const adminAccount = await getAcmAdminAccount(networkName);
console.log(`Granting DEFAULT_ADMIN_ROLE to ${adminAccount} for ${networkName} network`);
await acm.grantRole(acm.DEFAULT_ADMIN_ROLE(), adminAccount);
const normalTimelock = await ethers.getContract("NormalTimelock");
console.log(`Granting DEFAULT_ADMIN_ROLE to ${normalTimelock.address} for ${networkName} network`);
await acm.grantRole(acm.DEFAULT_ADMIN_ROLE(), normalTimelock.address);

console.log(`Renouncing DEFAULT_ADMIN_ROLE from deployer (${deployer}) for ${hre.network.name} network`);
await acm.renounceRole(acm.DEFAULT_ADMIN_ROLE(), deployer);
Expand Down
6 changes: 6 additions & 0 deletions deploy/005-remote-timelock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export enum REMOTE_NETWORKS {
OPMAINNET = "opmainnet",
BASESEPOLIA = "basesepolia",
BASEMAINNET = "basemainnet",
BERACHAINBARTIO = "berachainbartio",
HARDHAT = "hardhat",
}
type DelayTypes = {
Expand Down Expand Up @@ -92,6 +93,11 @@ export const delayConfig: DelayConfig = {
fast: 21600,
critical: 3600,
},
berachainbartio: {
normal: 600,
fast: 300,
critical: 100,
},
};

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
Expand Down
5 changes: 4 additions & 1 deletion deploy/006-omnichain-executorOwner-remote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
contract: string;
signature: string;
argTypes: string[];
parameters: any[];

Check warning on line 22 in deploy/006-omnichain-executorOwner-remote.ts

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
value: BigNumberish;
}

Expand Down Expand Up @@ -102,13 +102,15 @@
"hardhat-deploy/solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol:ProxyAdmin",
);

const normalTimelock = await ethers.getContract("NormalTimelock");

const omnichainGovernanceExecutorAddress = (await ethers.getContract("OmnichainGovernanceExecutor")).address;
const OmnichainExecutorOwner = await deploy("OmnichainExecutorOwner", {
from: deployer,
args: [omnichainGovernanceExecutorAddress],
contract: "OmnichainExecutorOwner",
proxy: {
owner: hre.network.live ? Guardian : deployer, // Guardian will be replaced by normalTimelock once ownership of DefaultProxyAdmin is transferred to normalTimelock.
owner: hre.network.live ? normalTimelock.address : deployer,
proxyContract: "OptimizedTransparentUpgradeableProxy",
execute: {
methodName: "initialize",
Expand All @@ -122,6 +124,7 @@
},
log: true,
autoMine: true,
skipIfAlreadyDeployed: true,
});
const omnichainExecutorOwner = await ethers.getContractAt(
"OmnichainExecutorOwner",
Expand Down
1 change: 1 addition & 0 deletions deployments/berachainbartio/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
80084
366 changes: 366 additions & 0 deletions deployments/berachainbartio/ACMCommandsAggregator.json

Large diffs are not rendered by default.

Loading
Loading