Skip to content

Commit

Permalink
Merge pull request #228 from VenusProtocol/feat/pufeth
Browse files Browse the repository at this point in the history
[VEN-2845]: Add oracle deployments for pufETH
  • Loading branch information
kkirka authored Nov 18, 2024
2 parents bc150d9 + 958a9a1 commit 40a0690
Show file tree
Hide file tree
Showing 14 changed files with 3,044 additions and 0 deletions.
32 changes: 32 additions & 0 deletions deploy/14-deploy-pufETH-oracle.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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 }: HardhatRuntimeEnvironment) {
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();
const proxyOwnerAddress = ADDRESSES[network.name].timelock;
const { pufETH, WETH } = ADDRESSES[network.name];

const redStoneOracle = await hre.ethers.getContract("RedStoneOracle");
const resilientOracle = await hre.ethers.getContract("ResilientOracle");

await deploy("pufETHOneJumpRedStoneOracle", {
contract: "OneJumpOracle",
from: deployer,
log: true,
deterministicDeployment: false,
args: [pufETH, WETH, resilientOracle.address, redStoneOracle.address],
proxy: {
owner: proxyOwnerAddress,
proxyContract: "OptimizedTransparentProxy",
},
skipIfAlreadyDeployed: true,
});
};

func.skip = async () => hre.network.name !== "ethereum" && hre.network.name !== "sepolia";
func.tags = ["pufETHOneJumpRedStoneOracle"];
export default func;
Loading

0 comments on commit 40a0690

Please sign in to comment.