generated from PaulRBerg/hardhat-template
-
Notifications
You must be signed in to change notification settings - Fork 14
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 #214 from VenusProtocol/feat/VEN-2712
[VEN-2712] OneJumpOracle deployment script and files for wstETH and weETH on arbitrum sepolia
- Loading branch information
Showing
11 changed files
with
2,796 additions
and
1 deletion.
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,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: { | ||
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; |
Oops, something went wrong.