Skip to content

Commit

Permalink
feat: fix forge-std lib and update readme (#31)
Browse files Browse the repository at this point in the history
* init

* feat: remove ETHERSCAN_API_KEY and update submodule

* feat: remove etherscan api from makefile

* feat: update periphery lib
  • Loading branch information
0xValJohn authored Mar 27, 2024
1 parent 8a686fa commit 6c0deeb
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 19 deletions.
5 changes: 2 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
ETH_RPC_URL=
ETH_RPC_URL=https://rpc.ankr.com/eth
FTM_RPC_URL=https://rpcapi.fantom.network
ARBI_RPC_URL=https://arb1.arbitrum.io/rpc
GC_RPC_URL=https://xdai.poanetwork.dev
BSC_RPC_URL=https://bsc-dataseed.binance.org
MATIC_RPC_URL=
ETHERSCAN_API_KEY=
MATIC_RPC_URL=https://rpc.ankr.com/polygon
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
branch = v1.5.3
branch = master
[submodule "lib/tokenized-strategy"]
path = lib/tokenized-strategy
url = https://github.com/yearn/tokenized-strategy
Expand Down
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ inspect :; forge inspect ${contract} storage-layout --pretty
FORK_URL := ${ETH_RPC_URL}

# local tests without fork
test :; forge test -vv --fork-url ${FORK_URL} --etherscan-api-key ${ETHERSCAN_API_KEY}
trace :; forge test -vvv --fork-url ${FORK_URL} --etherscan-api-key ${ETHERSCAN_API_KEY}
gas :; forge test --fork-url ${FORK_URL} --etherscan-api-key ${ETHERSCAN_API_KEY} --gas-report
test-contract :; forge test -vv --match-contract $(contract) --fork-url ${FORK_URL} --etherscan-api-key ${ETHERSCAN_API_KEY}
test-contract-gas :; forge test --gas-report --match-contract ${contract} --fork-url ${FORK_URL} --etherscan-api-key ${ETHERSCAN_API_KEY}
trace-contract :; forge test -vvv --match-contract $(contract) --fork-url ${FORK_URL} --etherscan-api-key ${ETHERSCAN_API_KEY}
test-test :; forge test -vv --match-test $(test) --fork-url ${FORK_URL} --etherscan-api-key ${ETHERSCAN_API_KEY}
trace-test :; forge test -vvv --match-test $(test) --fork-url ${FORK_URL} --etherscan-api-key ${ETHERSCAN_API_KEY}
snapshot :; forge snapshot -vv --fork-url ${FORK_URL} --etherscan-api-key ${ETHERSCAN_API_KEY}
snapshot-diff :; forge snapshot --diff -vv --fork-url ${FORK_URL} --etherscan-api-key ${ETHERSCAN_API_KEY}
test :; forge test -vv --fork-url ${FORK_URL}
trace :; forge test -vvv --fork-url ${FORK_URL}
gas :; forge test --fork-url ${FORK_URL} --gas-report
test-contract :; forge test -vv --match-contract $(contract) --fork-url ${FORK_URL}
test-contract-gas :; forge test --gas-report --match-contract ${contract} --fork-url ${FORK_URL}
trace-contract :; forge test -vvv --match-contract $(contract) --fork-url ${FORK_URL}
test-test :; forge test -vv --match-test $(test) --fork-url ${FORK_URL}
trace-test :; forge test -vvv --match-test $(test) --fork-url ${FORK_URL}
snapshot :; forge snapshot -vv --fork-url ${FORK_URL}
snapshot-diff :; forge snapshot --diff -vv --fork-url ${FORK_URL}


clean :; forge clean
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ For a more complete overview of how the Tokenized Strategies work please visit t

### Requirements

First you will need to install [Foundry](https://book.getfoundry.sh/getting-started/installation).
- 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/)

### Clone this repository

Expand All @@ -25,8 +26,7 @@ yarn

### Set your environment Variables

Sign up for [Infura](https://infura.io/) and generate an API key and copy your RPC url. Store it in the `ETH_RPC_URL` environment variable.
NOTE: you can use other services.
Use the `.env.example` template to create a `.env` file and store the environement variables. You will need to populate the `RPC_URL` for the desired network(s). RPC url can be obtained from various providers, including [Ankr](https://www.ankr.com/rpc/) (no sign-up required) and [Infura](https://infura.io/).

Use .env file

Expand Down
2 changes: 1 addition & 1 deletion lib/tokenized-strategy-periphery

0 comments on commit 6c0deeb

Please sign in to comment.