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

[VEN-2712] OneJumpOracle deployment script and files for wstETH and weETH on arbitrum sepolia #214

Merged
merged 6 commits into from
Aug 27, 2024
Merged
62 changes: 62 additions & 0 deletions deploy/13-deploy-wstETH-weETH-oracles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import hre from "hardhat";
import { DeployFunction } from "hardhat-deploy/dist/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";

import { ADDRESSES } from "../helpers/deploymentConfig";

const func: DeployFunction = async function ({
getNamedAccounts,
deployments,
network,
artifacts,
}: HardhatRuntimeEnvironment) {
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();
const proxyOwnerAddress = ADDRESSES[network.name].timelock;
const { WETH, wstETH, weETH } = ADDRESSES[network.name];

const resilientOracle = await hre.ethers.getContract("ResilientOracle");
const chainlinkOracle = await hre.ethers.getContract("ChainlinkOracle");

const defaultProxyAdmin = await artifacts.readArtifact(
"hardhat-deploy/solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol:ProxyAdmin",
);

await deploy("wstETHOneJumpChainlinkOracle", {
contract: "OneJumpOracle",
from: deployer,
log: true,
deterministicDeployment: false,
args: [wstETH, WETH, resilientOracle.address, chainlinkOracle.address],
proxy: {
chechu marked this conversation as resolved.
Show resolved Hide resolved
owner: proxyOwnerAddress,
proxyContract: "OptimizedTransparentUpgradeableProxy",
viaAdminContract: {
name: "DefaultProxyAdmin",
artifact: defaultProxyAdmin,
},
},
skipIfAlreadyDeployed: true,
});

await deploy("weETHOneJumpChainlinkOracle", {
contract: "OneJumpOracle",
from: deployer,
log: true,
deterministicDeployment: false,
args: [weETH, WETH, resilientOracle.address, chainlinkOracle.address],
proxy: {
owner: proxyOwnerAddress,
proxyContract: "OptimizedTransparentUpgradeableProxy",
viaAdminContract: {
name: "DefaultProxyAdmin",
artifact: defaultProxyAdmin,
},
},
skipIfAlreadyDeployed: true,
});
};

func.skip = async () => hre.network.name !== "arbitrumone" && hre.network.name !== "arbitrumsepolia";
func.tags = ["wstETH_weETH_OneJumpOracles_arbitrum"];
export default func;
Loading
Loading