generated from PaulRBerg/hardhat-template
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #228 from VenusProtocol/feat/pufeth
[VEN-2845]: Add oracle deployments for pufETH
- Loading branch information
Showing
14 changed files
with
3,044 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
Oops, something went wrong.