Skip to content

Commit

Permalink
Merge pull request #221 from VenusProtocol/feat/bnb-chain-lst-eth
Browse files Browse the repository at this point in the history
[VEN-2758]: add LST ETH pool deployment on BNB chain
  • Loading branch information
kkirka authored Sep 24, 2024
2 parents 9181e4d + ab4f42e commit 9cbce41
Show file tree
Hide file tree
Showing 33 changed files with 10,302 additions and 20 deletions.
44 changes: 27 additions & 17 deletions deploy/13-deploy-wstETH-weETH-oracles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ const func: DeployFunction = async function ({
"hardhat-deploy/solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol:ProxyAdmin",
);

await deploy("wstETHOneJumpChainlinkOracle", {
contract: "OneJumpOracle",
const commonParams = {
from: deployer,
log: true,
deterministicDeployment: false,
args: [wstETH, WETH, resilientOracle.address, chainlinkOracle.address],
proxy: {
owner: proxyOwnerAddress,
proxyContract: "OptimizedTransparentUpgradeableProxy",
Expand All @@ -43,26 +41,38 @@ const func: DeployFunction = async function ({
},
},
skipIfAlreadyDeployed: true,
waitConfirmations: 1,
};

await deploy("wstETHOneJumpChainlinkOracle", {
contract: "OneJumpOracle",
args: [wstETH, WETH, resilientOracle.address, chainlinkOracle.address],
...commonParams,
});

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,
...commonParams,
});

if (["bscmainnet", "bsctestnet"].includes(hre.network.name)) {
const redstoneOracle = await hre.ethers.getContract("RedStoneOracle");

await deploy("wstETHOneJumpRedstoneOracle", {
contract: "OneJumpOracle",
args: [wstETH, WETH, resilientOracle.address, redstoneOracle.address],
...commonParams,
});

await deploy("weETHOneJumpRedstoneOracle", {
contract: "OneJumpOracle",
args: [weETH, WETH, resilientOracle.address, redstoneOracle.address],
...commonParams,
});
}
};

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

0 comments on commit 9cbce41

Please sign in to comment.