Skip to content
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

chore: old role manager #56

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
- run: pip install -r requirements.txt
- run: black --check --include "(tests|scripts)" .
48 changes: 25 additions & 23 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
name: tests
name: test

on:
workflow_dispatch:
push:
branches:
- master
- develop
- master
- develop
pull_request:

env:
FOUNDRY_PROFILE: ci

jobs:
tests:
check:
strategy:
fail-fast: true

name: Foundry project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: ApeWorX/[email protected]
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
python-version: '3.10'
ape-version-pin: "==0.6.27"
ape-plugins-list: 'solidity==0.6.11 vyper==0.6.13 infura==0.6.5 hardhat==0.6.13 etherscan==0.6.11'
version: nightly

- name: install vyper
run: pip install git+https://github.com/vyperlang/vyper

- run: ape compile --force --size
- run: npm install hardhat

- run: ape test
timeout-minutes: 40
env:
WEB3_ALCHEMY_PROJECT_ID: ${{ secrets.WEB3_ALCHEMY_PROJECT_ID }}
WEB3_INFURA_PROJECT_ID: ${{ secrets.WEB3_INFURA_PROJECT_ID }}
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
- name: Run Forge build
run: |
forge --version
forge build --sizes
id: build

- name: Run Forge tests
run: |
forge test -vvv --fork-url ${{ secrets.ETH_RPC_URL }}
id: test
39 changes: 23 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
pyenv.cfg
vyper_git_commithash.txt
bin/
lib/
share/
build/
include/
.build
node_modules
# Compiler files
cache/
out/

# Ignores development broadcast logs
!/broadcast
/broadcast/*/31337/
/broadcast/**/dry-run/

# Docs
docs/

# Dotenv file
.env

node_modules/
.gas-snapshot

yarn.lock
.DS_Store

.vscode

**/__pycache__
.pytest_cache
**/.cache
venv/
.hypothesis/
.idea
.vscode
yarn.lock
env
**/.cache
19 changes: 19 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[submodule "lib/yearn-vaults-v3"]
path = lib/yearn-vaults-v3
url = https://github.com/yearn/yearn-vaults-v3
branch = v3.0.3
[submodule "lib/tokenized-strategy"]
path = lib/tokenized-strategy
url = https://github.com/yearn/tokenized-strategy
branch = v3.0.3
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
branch = v4.9.5
[submodule "lib/tokenized-strategy-periphery"]
path = lib/tokenized-strategy-periphery
url = https://github.com/yearn/tokenized-strategy-periphery
branch = master
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
8 changes: 7 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
.build/
.cache/
venv/
venv/
.build/
.cache/
venv/
lib/
out/
cache/
33 changes: 33 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-include .env

# deps
update:; forge update
build :; forge build
size :; forge build --sizes

# storage inspection
inspect :; forge inspect ${contract} storage-layout --pretty

# if we want to run only matching tests, set that here
test := test_

# local tests without fork
test :; forge test -vv --ffi
trace :; forge test -vvv --ffi
gas :; forge test --ffi --gas-report
test-contract :; forge test -vv --match-contract $(contract) --ffi
test-contract-gas :; forge test --gas-report --match-contract ${contract} --ffi
trace-contract :; forge test -vvv --match-contract $(contract) --ffi
test-test :; forge test -vv --match-test $(test) --ffi
test-test-trace :; forge test -vvv --match-test $(test) --ffi
trace-test :; forge test -vvvvv --match-test $(test) --ffi
snapshot :; forge snapshot -vv --ffi
snapshot-diff :; forge snapshot --diff -vv --ffi
trace-setup :; forge test -vvvv --ffi
trace-max :; forge test -vvvvv --ffi
coverage :; forge coverage --ffi
coverage-report :; forge coverage --report lcov --ffi
coverage-debug :; forge coverage --report debug --ffi


clean :; forge clean
29 changes: 6 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,17 @@
## How to start

### Requirements
Python >=3.8.0, <=3.10
Yarn
Node.js >=14
Hardhat

### Fork this repository

git clone https://github.com/user/tokenized-strategy-ape-mix

cd tokenized-strategy-ape-mix
- First you will need to install [Foundry](https://book.getfoundry.sh/getting-started/installation).
NOTE: If you are on a windows machine it is recommended to use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install)
- Install [Node.js](https://nodejs.org/en/download/package-manager/)

### Set up your virtual environment

python3 -m venv venv
### Fork this repository

source venv/bin/activate
git clone https://github.com/yearn/vault-periphery

### Install Ape and all dependencies
cd vault-periphery

pip install -r requirements.txt

yarn

ape plugins install .

ape compile

ape test

### Deployment

Expand Down
52 changes: 0 additions & 52 deletions ape-config.yaml

This file was deleted.

Loading
Loading