Skip to content

Commit

Permalink
Merge pull request #91 from VenusProtocol/feat/ven-2687
Browse files Browse the repository at this point in the history
[VEN-2687]:  Multichain governance deployments on zksyncsepolia
  • Loading branch information
GitGuru7 authored Oct 4, 2024
2 parents 95368b1 + d0cbfdb commit c9edc5f
Show file tree
Hide file tree
Showing 19 changed files with 10,413 additions and 3 deletions.
12 changes: 12 additions & 0 deletions deploy/005-remote-timelock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export enum REMOTE_NETWORKS {
SEPOLIA = "sepolia",
OPBNBTESTNET = "opbnbtestnet",
ARBITRUM_SEPOLIA = "arbitrumsepolia",
ZKSYNCSEPOLIA = "zksyncsepolia",
ZKSYNCMAINNET = "zksyncmainnet",
HARDHAT = "hardhat",
}
type DelayTypes = {
Expand Down Expand Up @@ -56,6 +58,16 @@ export const delayConfig: DelayConfig = {
fast: 21600,
critical: 3600,
},
zksyncsepolia: {
normal: 600,
fast: 300,
critical: 100,
},
zksyncmainnet: {
normal: 172800,
fast: 21600,
critical: 3600,
},
};
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deployments, getNamedAccounts } = hre;
Expand Down
12 changes: 11 additions & 1 deletion deploy/006-omnichain-executorOwner-remote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,28 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const fastTrackTimelockAddress = (await ethers.getContract("FastTrackTimelock")).address;
const criticalTimelockAddress = (await ethers.getContract("CriticalTimelock")).address;

// Explicitly mentioning Default Proxy Admin contract path to fetch it from hardhat-deploy instead of OpenZeppelin
// as zksync doesnot compile OpenZeppelin contracts using zksolc. It is backward compatible for all networks as well.
const defaultProxyAdmin = await hre.artifacts.readArtifact(
"hardhat-deploy/solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol:ProxyAdmin",
);

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.
proxyContract: "OpenZeppelinTransparentProxy",
proxyContract: "OptimizedTransparentUpgradeableProxy",
execute: {
methodName: "initialize",
args: [acmAddress],
},
viaAdminContract: {
name: "DefaultProxyAdmin",
artifact: defaultProxyAdmin,
},
upgradeIndex: 0,
},
log: true,
Expand Down
Loading

0 comments on commit c9edc5f

Please sign in to comment.