generated from PaulRBerg/hardhat-template
-
Notifications
You must be signed in to change notification settings - Fork 17
[VPD-404] Add PT-clisBNB-25JUN2026 Pendle oracle deployment #304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
611d17d
feat: add clisBNB pendle oracle deployment script
Debugger022 5244422
feat: add PT-clisBNB-25JUN2026 pendle oracle deployments
Debugger022 e52cc70
feat: updating deployment files
Debugger022 a3b8923
feat: add PT-clisBNB-25JUN2026 oracle for mainnet
Debugger022 07da32e
feat: updating deployment files
Debugger022 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,79 @@ | ||
| import { ethers } from "hardhat"; | ||
| import { DeployFunction } from "hardhat-deploy/dist/types"; | ||
| import { HardhatRuntimeEnvironment } from "hardhat/types"; | ||
|
|
||
| import { ADDRESSES } from "../helpers/deploymentConfig"; | ||
| import { isMainnet } from "../helpers/deploymentUtils"; | ||
|
|
||
| enum PendleRateKind { | ||
| PT_TO_ASSET = 0, | ||
| PT_TO_SY = 1, | ||
| } | ||
|
|
||
| const func: DeployFunction = async ({ getNamedAccounts, deployments, network }: HardhatRuntimeEnvironment) => { | ||
| const { deploy } = deployments; | ||
| const { deployer } = await getNamedAccounts(); | ||
|
|
||
| const resilientOracle = await ethers.getContract("ResilientOracle"); | ||
| const addresses = ADDRESSES[network.name]; | ||
| const ptOracleAddress = addresses.PTOracle || (await ethers.getContract("MockPendlePtOracle")).address; | ||
|
|
||
| const commonParams = { | ||
| from: deployer, | ||
| log: true, | ||
| deterministicDeployment: false, | ||
| skipIfAlreadyDeployed: true, | ||
| waitConfirmations: 1, | ||
| }; | ||
|
|
||
| await deploy("PendleOracle-PT-clisBNB-25JUN2026", { | ||
| contract: "PendleOracle", | ||
| args: [ | ||
| { | ||
| market: addresses["PT-clisBNB-25JUN2026_Market"] || "0x0000000000000000000000000000000000000004", | ||
| ptOracle: ptOracleAddress, | ||
| rateKind: PendleRateKind.PT_TO_SY, | ||
| ptToken: addresses["PT-clisBNB-25JUN2026"], | ||
| underlyingToken: addresses.slisBNB, | ||
| resilientOracle: resilientOracle.address, | ||
| twapDuration: 1800, | ||
| annualGrowthRate: 0, | ||
| snapshotInterval: 0, | ||
| initialSnapshotMaxExchangeRate: 0, | ||
| initialSnapshotTimestamp: 0, | ||
| accessControlManager: addresses.acm, | ||
| snapshotGap: 0, | ||
| }, | ||
| ], | ||
| ...commonParams, | ||
| }); | ||
|
|
||
| if (isMainnet(network)) { | ||
| await deploy("PendleOracle-PT-clisBNB-25JUN2026_Reference_PtToAsset", { | ||
| contract: "PendleOracle", | ||
| args: [ | ||
| { | ||
| market: addresses["PT-clisBNB-25JUN2026_Market"] || "0x0000000000000000000000000000000000000002", | ||
GitGuru7 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ptOracle: ptOracleAddress, | ||
| rateKind: PendleRateKind.PT_TO_ASSET, | ||
| ptToken: addresses["PT-clisBNB-25JUN2026"], | ||
| underlyingToken: addresses.slisBNB, | ||
| resilientOracle: resilientOracle.address, | ||
| twapDuration: 1800, | ||
| annualGrowthRate: 0, | ||
| snapshotInterval: 0, | ||
| initialSnapshotMaxExchangeRate: 0, | ||
| initialSnapshotTimestamp: 0, | ||
| accessControlManager: addresses.acm, | ||
| snapshotGap: 0, | ||
| }, | ||
| ], | ||
| ...commonParams, | ||
| }); | ||
| } | ||
| }; | ||
|
|
||
| export default func; | ||
| func.tags = ["PT-clisBNB-2026"]; | ||
| func.skip = async (hre: HardhatRuntimeEnvironment) => | ||
| hre.network.name !== "bsctestnet" && hre.network.name !== "bscmainnet"; | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.