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.
Merge branch 'master' into runtime-fv
- Loading branch information
Showing
6 changed files
with
315 additions
and
73 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
.github/workflows/actions-sepolia-strategy-management.yaml
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,32 @@ | ||
name: "[sepolia-deploy] manage strategy" | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
strategy: | ||
description: 'strategy address' | ||
required: true | ||
default: '0x' | ||
|
||
|
||
jobs: | ||
acceptManagement: | ||
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 | ||
submodules: recursive | ||
- uses: foundry-rs/foundry-toolchain@v1 | ||
- run: forge install | ||
- run: forge build | ||
- run: forge tree | ||
- run: forge script script/StrategyManagement.s.sol:StrategyManagement --rpc-url $RPC_URL --broadcast --gas-price 500000000000 --verify --verbosity 4 | ||
env: | ||
RPC_URL: ${{ secrets.RPC_URL }} | ||
STRATEGY_MANAGEMENT_ADDRESS: ${{ secrets.STRATEGY_MANAGEMENT_ADDRESS }} | ||
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} | ||
STRATEGY: ${{ github.event.inputs.strategy }} | ||
|
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
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
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,22 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import "forge-std/Script.sol"; | ||
import "@tokenized-strategy/interfaces/ITokenizedStrategy.sol"; | ||
|
||
contract StrategyManagement is Script { | ||
function run() external { | ||
uint256 strategyManagement = vm.envUint("STRATEGY_MANAGEMENT_ADDRESS"); | ||
address strategy = vm.envAddress("STRATEGY"); | ||
|
||
// Set up the RPC URL (optional if you're using the default foundry config) | ||
string memory rpcUrl = vm.envString("RPC_URL"); | ||
|
||
vm.startBroadcast(strategyManagement); | ||
ITokenizedStrategy(strategy).acceptManagement(); | ||
console.log("accepted management"); | ||
vm.stopBroadcast(); | ||
|
||
|
||
} | ||
} |
Oops, something went wrong.