forked from yearn/tokenized-strategy-foundry-mix
-
Notifications
You must be signed in to change notification settings - Fork 1
86 lines (84 loc) · 3.27 KB
/
deploy-mainnet-strategy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: "[mainnet-deploy] deploy strategy"
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: mainnet
url: https://term-finance.github.io/yearn-v3-term-vault/
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
submodules: recursive
- uses: foundry-rs/foundry-toolchain@v1
- run: forge install
- run: forge build
- run: forge tree
- run: forge script script/Strategy.s.sol:DeployStrategy --rpc-url $RPC_URL --broadcast --verify --verbosity 4
env:
RPC_URL: ${{ secrets.RPC_URL }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
GOVERNOR_DEPLOYER_KEY: ${{ secrets.GOVERNANCE_DEPLOYER_KEY }}
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
ASSET_ADDRESS: ${{ github.event.inputs.asset }}
YEARN_VAULT_ADDRESS: ${{ vars.YEARN_VAULT_ADDRESS }}
IS_TEST: true
STRATEGY_NAME: ${{ github.event.inputs.strategyName }}
TERM_CONTROLLER_ADDRESS: ${{ vars.TERM_CONTROLLER_ADDRESS }}
DISCOUNT_RATE_ADAPTER_ADDRESS: ${{ vars.DISCOUNT_RATE_ADAPTER_ADDRESS }}
DISCOUNT_RATE_MARKUP: ${{ vars.DISCOUNT_RATE_MARKUP }}
TIME_TO_MATURITY_THRESHOLD: ${{ github.event.inputs.timeToMaturityThreshold }}
REPOTOKEN_CONCENTRATION_LIMIT: ${{ github.event.inputs.repoTokenConcentrationLimit }}
ADMIN_ADDRESS: ${{ vars.ADMIN_ADDRESS }}
DEVOPS_ADDRESS: ${{ vars.DEVOPS_ADDRESS }}
KEEPER_ADDRESS: ${{ vars.KEEPER }}
GOVERNOR_ROLE_ADDRESS: ${{ vars.GOVERNANCE_FACTORY }}
STRATEGY_MANAGEMENT_ADDRESS: ${{ github.event.inputs.strategyManagementAddress }}
NEW_REQUIRED_RESERVE_RATIO: ${{ github.event.inputs.requiredReserveRatio }}
COLLATERAL_TOKEN_ADDRESSES: ${{ github.event.inputs.collateralTokens }}
MIN_COLLATERAL_RATIOS: ${{ github.event.inputs.minCollateralRatios }}
PROFIT_MAX_UNLOCK_TIME: ${{ github.event.inputs.profitMaxUnlock }}
FEE_RECIPIENT: ${{ github.event.inputs.feeRecipient }}