Skip to content

Commit

Permalink
vault reporting role add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
aazhou1 committed Nov 11, 2024
1 parent a7878fd commit b12f8ed
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/actions-sepolia-vault-keeper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "[sepolia-deploy] manage vault keeper"
on:
workflow_dispatch:
inputs:
keeper:
description: 'keeper address'
required: true
default: '0x'
vault:
description: 'vault 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/VaultReportingManagement.s.sol:VaultReportingManagement --rpc-url $RPC_URL --broadcast --gas-price 500000000000 --verify --verbosity 4
env:
RPC_URL: ${{ secrets.RPC_URL }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
KEEPER_ADDRESS: ${{ github.event.inputs.keeper }}
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
VAULT: ${{ github.event.inputs.vault }}

23 changes: 23 additions & 0 deletions script/VaultReportingManagement.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "forge-std/Script.sol";
import "@yearn-vaults/interfaces/IVault.sol";


contract VaultReportingManagement is Script {
function run() external {
uint256 deployerPK = vm.envUint("PRIVATE_KEY");

address keeperAddress = vm.envAddress("KEEPER_ADDRESS");
address vault = vm.envAddress("VAULT");

// Set up the RPC URL (optional if you're using the default foundry config)
string memory rpcUrl = vm.envString("RPC_URL");

vm.startBroadcast(deployerPK);
IVault(vault).add_role(keeperAddress, 32);
console.log("keeper given reporting role");
vm.stopBroadcast();
}
}

0 comments on commit b12f8ed

Please sign in to comment.