forked from yearn/tokenized-strategy-foundry-mix
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create deploy-strategy-hardhat-sepolia.yaml
- Loading branch information
Showing
1 changed file
with
91 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,91 @@ | ||
name: "[sepolia-deploy] deploy strategy (hardhat)" | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
asset: | ||
description: 'Asset address' | ||
required: true | ||
default: '0x' | ||
strategyName: | ||
description: 'Yearn strategy name' | ||
required: true | ||
default: '0x' | ||
strategyManagementAddress: | ||
description: 'Strategy management address' | ||
required: true | ||
default: '0x' | ||
feeRecipient: | ||
description: 'FeeRecipient address' | ||
required: false | ||
default: '0x' | ||
timeToMaturityThreshold: | ||
description: 'Time to maturity threshold' | ||
required: false | ||
default: '0' | ||
repoTokenConcentrationLimit: | ||
description: 'Repo token concentration limit' | ||
required: false | ||
default: '0.01' | ||
requiredReserveRatio: | ||
description: 'Required reserve ratio' | ||
required: false | ||
default: '0.01' | ||
profitMaxUnlock: | ||
description: 'Profit max unlock time' | ||
required: false | ||
default: '0' | ||
collateralTokens: | ||
description: 'Collateral tokens comma separated' | ||
required: false | ||
default: '0x' | ||
minCollateralRatios: | ||
description: 'Minimum collateral ratio comma separated' | ||
required: false | ||
default: '0.01' | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: sepolia | ||
url: https://term-finance.github.io/yearn-v3-term-vault/ | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
- id: nodeversion | ||
run: echo "version=$(grep nodejs .tool-versions | sed -e 's/[^[:space:]]*[[:space:]]*//')" >> $GITHUB_OUTPUT | ||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ steps.nodeversion.outputs.version }} | ||
cache: yarn | ||
- run: yarn install | ||
- run: yarn sepolia:deploy-strategy | ||
env: | ||
ASSET_ADDRESS: ${{ github.event.inputs.asset }} | ||
YEARN_VAULT_ADDRESS: ${{ vars.YEARN_VAULT_ADDRESS }} | ||
DISCOUNT_RATE_ADAPTER_ADDRESS: ${{ vars.DISCOUNT_RATE_ADAPTER_ADDRESS }} | ||
TERM_CONTROLLER_ADDRESS: ${{ vars.TERM_CONTROLLER_ADDRESS }} | ||
DISCOUNT_RATE_MARKUP: ${{ vars.DISCOUNT_RATE_MARKUP }} | ||
TIME_TO_MATURITY_THRESHOLD: ${{ github.event.inputs.timeToMaturityThreshold }} | ||
REPOTOKEN_CONCENTRATION_LIMIT: ${{ github.event.inputs.repoTokenConcentrationLimit }} | ||
NEW_REQUIRED_RESERVE_RATIO: ${{ github.event.inputs.requiredReserveRatio }} | ||
ADMIN_ADDRESS: ${{ vars.ADMIN_ADDRESS }} | ||
DEVOPS_ADDRESS: ${{ vars.DEVOPS_ADDRESS }} | ||
STRATEGY_NAME: ${{ github.event.inputs.strategyName }} | ||
PROFIT_MAX_UNLOCK_TIME: ${{ github.event.inputs.profitMaxUnlock }} | ||
STRATEGY_MANAGEMENT_ADDRESS: ${{ github.event.inputs.strategyManagementAddress }} | ||
KEEPER_ADDRESS: ${{ vars.KEEPER }} | ||
FEE_RECIPIENT: ${{ github.event.inputs.feeRecipient }} | ||
COLLATERAL_TOKEN_ADDRESSES: ${{ github.event.inputs.collateralTokens }} | ||
MIN_COLLATERAL_RATIOS: ${{ github.event.inputs.minCollateralRatios }} | ||
GOVERNOR_ROLE_ADDRESS: ${{ vars.GOVERNANCE_FACTORY }} | ||
SEPOLIA_RPC_URL: ${{ secrets.RPC_URL }} | ||
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | ||
|
||
# TODO(andrew please confirm): I don't think these are used for this workflow | ||
# GOVERNOR_DEPLOYER_KEY: ${{ secrets.GOVERNANCE_DEPLOYER_KEY }} | ||
# ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} | ||
# IS_TEST: true | ||
|