Skip to content

Commit

Permalink
feat: add LST ETH pool deployment on BNB chain
Browse files Browse the repository at this point in the history
  • Loading branch information
kkirka committed Sep 10, 2024
1 parent ea0f2a7 commit b1fbeab
Show file tree
Hide file tree
Showing 29 changed files with 6,556 additions and 18 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 @@ -22,12 +22,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 @@ -37,26 +35,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;

Large diffs are not rendered by default.

306 changes: 306 additions & 0 deletions deployments/bscmainnet/weETHOneJumpChainlinkOracle.json

Large diffs are not rendered by default.

204 changes: 204 additions & 0 deletions deployments/bscmainnet/weETHOneJumpChainlinkOracle_Implementation.json

Large diffs are not rendered by default.

224 changes: 224 additions & 0 deletions deployments/bscmainnet/weETHOneJumpChainlinkOracle_Proxy.json

Large diffs are not rendered by default.

306 changes: 306 additions & 0 deletions deployments/bscmainnet/weETHOneJumpRedstoneOracle.json

Large diffs are not rendered by default.

204 changes: 204 additions & 0 deletions deployments/bscmainnet/weETHOneJumpRedstoneOracle_Implementation.json

Large diffs are not rendered by default.

224 changes: 224 additions & 0 deletions deployments/bscmainnet/weETHOneJumpRedstoneOracle_Proxy.json

Large diffs are not rendered by default.

306 changes: 306 additions & 0 deletions deployments/bscmainnet/wstETHOneJumpChainlinkOracle.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

224 changes: 224 additions & 0 deletions deployments/bscmainnet/wstETHOneJumpChainlinkOracle_Proxy.json

Large diffs are not rendered by default.

306 changes: 306 additions & 0 deletions deployments/bscmainnet/wstETHOneJumpRedstoneOracle.json

Large diffs are not rendered by default.

204 changes: 204 additions & 0 deletions deployments/bscmainnet/wstETHOneJumpRedstoneOracle_Implementation.json

Large diffs are not rendered by default.

224 changes: 224 additions & 0 deletions deployments/bscmainnet/wstETHOneJumpRedstoneOracle_Proxy.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

306 changes: 306 additions & 0 deletions deployments/bsctestnet/weETHOneJumpChainlinkOracle.json

Large diffs are not rendered by default.

204 changes: 204 additions & 0 deletions deployments/bsctestnet/weETHOneJumpChainlinkOracle_Implementation.json

Large diffs are not rendered by default.

224 changes: 224 additions & 0 deletions deployments/bsctestnet/weETHOneJumpChainlinkOracle_Proxy.json

Large diffs are not rendered by default.

306 changes: 306 additions & 0 deletions deployments/bsctestnet/weETHOneJumpRedstoneOracle.json

Large diffs are not rendered by default.

204 changes: 204 additions & 0 deletions deployments/bsctestnet/weETHOneJumpRedstoneOracle_Implementation.json

Large diffs are not rendered by default.

224 changes: 224 additions & 0 deletions deployments/bsctestnet/weETHOneJumpRedstoneOracle_Proxy.json

Large diffs are not rendered by default.

306 changes: 306 additions & 0 deletions deployments/bsctestnet/wstETHOneJumpChainlinkOracle.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

224 changes: 224 additions & 0 deletions deployments/bsctestnet/wstETHOneJumpChainlinkOracle_Proxy.json

Large diffs are not rendered by default.

306 changes: 306 additions & 0 deletions deployments/bsctestnet/wstETHOneJumpRedstoneOracle.json

Large diffs are not rendered by default.

204 changes: 204 additions & 0 deletions deployments/bsctestnet/wstETHOneJumpRedstoneOracle_Implementation.json

Large diffs are not rendered by default.

224 changes: 224 additions & 0 deletions deployments/bsctestnet/wstETHOneJumpRedstoneOracle_Proxy.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions helpers/deploymentConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ export const ADDRESSES: PreconfiguredAddresses = {
BNBx: "0x327d6E6FAC0228070884e913263CFF9eFed4a2C8",
slisBNBStakeManager: "0xbF0Db0d1340fdd5DF245613E280856aEAFbF54d1",
slisBNB: "0xd2aF6A916Bc77764dc63742BC30f71AF4cF423F4",
WETH: "0x98f7A83361F7Ac8765CcEBAB1425da6b341958a7",
wstETH: "0x4349016259FCd8eE452f696b2a7beeE31667D129",
weETH: "0x7df9372096c8ca2401f30B3dF931bEFF493f1FdC",
},
bscmainnet: {
vBNBAddress: mainnetDeployments.contracts.vBNB.address,
Expand All @@ -101,6 +104,9 @@ export const ADDRESSES: PreconfiguredAddresses = {
slisBNB: "0xB0b84D294e0C75A6abe60171b70edEb2EFd14A1B",
wBETH: "0xa2e3356610840701bdf5611a53974510ae27e2e1",
ankrBNB: "0x52f24a5e03aee338da5fd9df68d2b6fae1178827",
WETH: "0x2170Ed0880ac9A755fd29B2688956BD959F933F8",
wstETH: "0x26c5e01524d2E6280A48F2c50fF6De7e52E9611C",
weETH: "0x04c0599ae5a44757c0af6f9ec3b93da8976c150a",
},
sepolia: {
vBNBAddress: ethers.constants.AddressZero,
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"esModuleInterop": true,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"lib": ["es6"],
"lib": ["es2020"],
"module": "commonjs",
"moduleResolution": "node",
"noImplicitAny": true,
Expand Down

0 comments on commit b1fbeab

Please sign in to comment.